Path: blob/master/src/java.sql/share/classes/java/sql/SQLFeatureNotSupportedException.java
41153 views
/*1* Copyright (c) 2005, 2020, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/2425package java.sql;2627/**28* The subclass of {@link SQLException} thrown when the SQLState class value is '<i>0A</i>'29* ( the value is 'zero' A).30* This indicates that the JDBC driver does not support an optional JDBC feature.31* Optional JDBC features can fall into the fallowing categories:32*33*<UL>34*<LI>no support for an optional feature35*<LI>no support for an optional overloaded method36*<LI>no support for an optional mode for a method. The mode for a method is37*determined based on constants passed as parameter values to a method38*</UL>39*40* @since 1.641*/42public class SQLFeatureNotSupportedException extends SQLNonTransientException {4344/**45* Constructs a {@code SQLFeatureNotSupportedException} object.46* The {@code reason}, {@code SQLState} are initialized47* to {@code null} and the vendor code is initialized to 0.48*49* The {@code cause} is not initialized, and may subsequently be50* initialized by a call to the51* {@link Throwable#initCause(java.lang.Throwable)} method.52*53* @since 1.654*/55public SQLFeatureNotSupportedException() {56super();57}5859/**60* Constructs a {@code SQLFeatureNotSupportedException} object61* with a given {@code reason}. The {@code SQLState}62* is initialized to {@code null} and the vendor code is initialized63* to 0.64*65* The {@code cause} is not initialized, and may subsequently be66* initialized by a call to the67* {@link Throwable#initCause(java.lang.Throwable)} method.68*69* @param reason a description of the exception70* @since 1.671*/72public SQLFeatureNotSupportedException(String reason) {73super(reason);74}7576/**77* Constructs a {@code SQLFeatureNotSupportedException} object78* with a given {@code reason} and {@code SQLState}.79*80* The {@code cause} is not initialized, and may subsequently be81* initialized by a call to the82* {@link Throwable#initCause(java.lang.Throwable)} method. The vendor code83* is initialized to 0.84*85* @param reason a description of the exception86* @param SQLState an XOPEN or SQL:2003 code identifying the exception87* @since 1.688*/89public SQLFeatureNotSupportedException(String reason, String SQLState) {90super(reason,SQLState);91}9293/**94* Constructs a {@code SQLFeatureNotSupportedException} object95* with a given {@code reason}, {@code SQLState} and96* {@code vendorCode}.97*98* The {@code cause} is not initialized, and may subsequently be99* initialized by a call to the100* {@link Throwable#initCause(java.lang.Throwable)} method.101*102* @param reason a description of the exception103* @param SQLState an XOPEN or SQL:2003 code identifying the exception104* @param vendorCode a database vendor specific exception code105* @since 1.6106*/107public SQLFeatureNotSupportedException(String reason, String SQLState, int vendorCode) {108super(reason,SQLState,vendorCode);109}110111/**112* Constructs a {@code SQLFeatureNotSupportedException} object113* with a given {@code cause}.114* The {@code SQLState} is initialized115* to {@code null} and the vendor code is initialized to 0.116* The {@code reason} is initialized to {@code null} if117* {@code cause==null} or to {@code cause.toString()} if118* {@code cause!=null}.119*120* @param cause the underlying reason for this {@code SQLException} (which is saved for later retrieval by the {@code getCause()} method); may be null indicating121* the cause is non-existent or unknown.122* @since 1.6123*/124public SQLFeatureNotSupportedException(Throwable cause) {125super(cause);126}127128/**129* Constructs a {@code SQLFeatureNotSupportedException} object130* with a given131* {@code reason} and {@code cause}.132* The {@code SQLState} is initialized to {@code null}133* and the vendor code is initialized to 0.134*135* @param reason a description of the exception.136* @param cause the underlying reason for this {@code SQLException} (which is saved for later retrieval by the {@code getCause()} method); may be null indicating137* the cause is non-existent or unknown.138* @since 1.6139*/140public SQLFeatureNotSupportedException(String reason, Throwable cause) {141super(reason,cause);142}143144/**145* Constructs a {@code SQLFeatureNotSupportedException} object146* with a given147* {@code reason}, {@code SQLState} and {@code cause}.148* The vendor code is initialized to 0.149*150* @param reason a description of the exception.151* @param SQLState an XOPEN or SQL:2003 code identifying the exception152* @param cause the (which is saved for later retrieval by the {@code getCause()} method); may be null indicating153* the cause is non-existent or unknown.154* @since 1.6155*/156public SQLFeatureNotSupportedException(String reason, String SQLState, Throwable cause) {157super(reason,SQLState,cause);158}159160/**161* Constructs a {@code SQLFeatureNotSupportedException} object162* with a given163* {@code reason}, {@code SQLState}, {@code vendorCode}164* and {@code cause}.165*166* @param reason a description of the exception167* @param SQLState an XOPEN or SQL:2003 code identifying the exception168* @param vendorCode a database vendor-specific exception code169* @param cause the underlying reason for this {@code SQLException} (which is saved for later retrieval by the {@code getCause()} method); may be null indicating170* the cause is non-existent or unknown.171* @since 1.6172*/173public SQLFeatureNotSupportedException(String reason, String SQLState, int vendorCode, Throwable cause) {174super(reason,SQLState,vendorCode,cause);175}176177private static final long serialVersionUID = -1026510870282316051L;178}179180181