Path: blob/aarch64-shenandoah-jdk8u272-b10/jdk/src/share/classes/java/sql/SQLFeatureNotSupportedException.java
38829 views
/*1* Copyright (c) 2005, 2013, 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</code> object.46* The <code>reason</code>, <code>SQLState</code> are initialized47* to <code>null</code> and the vendor code is initialized to 0.48*49* The <code>cause</code> is not initialized, and may subsequently be50* initialized by a call to the51* {@link Throwable#initCause(java.lang.Throwable)} method.52* <p>53* @since 1.654*/55public SQLFeatureNotSupportedException() {56super();57}5859/**60* Constructs a <code>SQLFeatureNotSupportedException</code> object61* with a given <code>reason</code>. The <code>SQLState</code>62* is initialized to <code>null</code> and the vendor code is initialized63* to 0.64*65* The <code>cause</code> is not initialized, and may subsequently be66* initialized by a call to the67* {@link Throwable#initCause(java.lang.Throwable)} method.68* <p>69* @param reason a description of the exception70* @since 1.671*/72public SQLFeatureNotSupportedException(String reason) {73super(reason);74}7576/**77* Constructs a <code>SQLFeatureNotSupportedException</code> object78* with a given <code>reason</code> and <code>SQLState</code>.79*80* The <code>cause</code> 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* <p>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</code> object95* with a given <code>reason</code>, <code>SQLState</code> and96* <code>vendorCode</code>.97*98* The <code>cause</code> is not initialized, and may subsequently be99* initialized by a call to the100* {@link Throwable#initCause(java.lang.Throwable)} method.101* <p>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</code> object113* with a given <code>cause</code>.114* The <code>SQLState</code> is initialized115* to <code>null</code> and the vendor code is initialized to 0.116* The <code>reason</code> is initialized to <code>null</code> if117* <code>cause==null</code> or to <code>cause.toString()</code> if118* <code>cause!=null</code>.119* <p>120* @param cause the underlying reason for this <code>SQLException</code> (which is saved for later retrieval by the <code>getCause()</code> 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</code> object130* with a given131* <code>reason</code> and <code>cause</code>.132* The <code>SQLState</code> is initialized to <code>null</code>133* and the vendor code is initialized to 0.134* <p>135* @param reason a description of the exception.136* @param cause the underlying reason for this <code>SQLException</code> (which is saved for later retrieval by the <code>getCause()</code> 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</code> object146* with a given147* <code>reason</code>, <code>SQLState</code> and <code>cause</code>.148* The vendor code is initialized to 0.149* <p>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()</code> 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</code> object162* with a given163* <code>reason</code>, <code>SQLState</code>, <code>vendorCode</code>164* and <code>cause</code>.165* <p>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</code> (which is saved for later retrieval by the <code>getCause()</code> 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