KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > java > sql > SQLFeatureNotSupportedException


1 /*
2  * @(#)SQLFeatureNotSupportedException.java 1.3 06/07/10
3  *
4  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7
8 package java.sql;
9
10 /**
11  * The subclass of {@link SQLException} thrown when the SQLState class value is '<i>0A</i>'
12  * ( the value is 'zero' A).
13  * This indicates that the JDBC driver does not support an optional JDBC feature.
14  * Optional JDBC features can fall into the fallowing categories:
15  *<p>
16  *<UL>
17  *<LI>no support for an optional feature
18  *<LI>no support for an optional overloaded method
19  *<LI>no support for an optional mode for a method. The mode for a method is
20  *determined based on constants passed as parameter values to a method
21  *</UL>
22  *
23  * @since 1.6
24  */

25 public class SQLFeatureNotSupportedException extends SQLNonTransientException JavaDoc {
26     
27     /**
28      * Constructs a <code>SQLFeatureNotSupportedException</code> object.
29          * The <code>reason</code>, <code>SQLState</code> are initialized
30          * to <code>null</code> and the vendor code is initialized to 0.
31          *
32          * The <code>cause</code> is not initialized, and may subsequently be
33          * initialized by a call to the
34          * {@link Throwable#initCause(java.lang.Throwable)} method.
35          * <p>
36          * @since 1.6
37      */

38     public SQLFeatureNotSupportedException() {
39         super();
40     }
41     
42     /**
43      * Constructs a <code>SQLFeatureNotSupportedException</code> object
44          * with a given <code>reason</code>. The <code>SQLState</code>
45          * is initialized to <code>null</code> and the vender code is initialized
46          * to 0.
47          *
48          * The <code>cause</code> is not initialized, and may subsequently be
49          * initialized by a call to the
50          * {@link Throwable#initCause(java.lang.Throwable)} method.
51          * <p>
52      * @param reason a description of the exception
53      * @since 1.6
54          */

55     public SQLFeatureNotSupportedException(String JavaDoc reason) {
56         super(reason);
57     }
58     
59     /**
60      * Constructs a <code>SQLFeatureNotSupportedException</code> object
61          * with a given <code>reason</code> and <code>SQLState</code>.
62          *
63          * The <code>cause</code> is not initialized, and may subsequently be
64          * initialized by a call to the
65          * {@link Throwable#initCause(java.lang.Throwable)} method. The vendor code
66          * is initialized to 0.
67          * <p>
68      * @param reason a description of the exception
69      * @param SQLState an XOPEN or SQL:2003 code identifying the exception
70      * @since 1.6
71          */

72     public SQLFeatureNotSupportedException(String JavaDoc reason, String JavaDoc SQLState) {
73         super(reason,SQLState);
74     }
75     
76     /**
77      * Constructs a <code>SQLFeatureNotSupportedException</code> object
78          * with a given <code>reason</code>, <code>SQLState</code> and
79          * <code>vendorCode</code>.
80          *
81          * The <code>cause</code> is not initialized, and may subsequently be
82          * initialized by a call to the
83          * {@link Throwable#initCause(java.lang.Throwable)} method.
84          * <p>
85      * @param reason a description of the exception
86      * @param SQLState an XOPEN or SQL:2003 code identifying the exception
87      * @param vendorCode a database vendor specific exception code
88      * @since 1.6
89          */

90     public SQLFeatureNotSupportedException(String JavaDoc reason, String JavaDoc SQLState, int vendorCode) {
91         super(reason,SQLState,vendorCode);
92     }
93     
94     /**
95      * Constructs a <code>SQLFeatureNotSupportedException</code> object
96      * with a given <code>cause</code>.
97      * The <code>SQLState</code> is initialized
98      * to <code>null</code> and the vendor code is initialized to 0.
99      * The <code>reason</code> is initialized to <code>null</code> if
100      * <code>cause==null</code> or to <code>cause.toString()</code> if
101      * <code>cause!=null</code>.
102      * <p>
103      * @param cause the underlying reason for this <code>SQLException</code> (which is saved for later retrieval bythe <code>getCause()</code> method); may be null indicating
104      * the cause is non-existent or unknown.
105      * @since 1.6
106      */

107     public SQLFeatureNotSupportedException(Throwable JavaDoc cause) {
108         super(cause);
109     }
110
111     /**
112      * Constructs a <code>SQLFeatureNotSupportedException</code> object
113      * with a given
114      * <code>reason</code> and <code>cause</code>.
115      * The <code>SQLState</code> is initialized to <code>null</code>
116      * and the vendor code is initialized to 0.
117      * <p>
118      * @param reason a description of the exception.
119      * @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 indicating
120      * the cause is non-existent or unknown.
121      * @since 1.6
122      */

123     public SQLFeatureNotSupportedException(String JavaDoc reason, Throwable JavaDoc cause) {
124         super(reason,cause);
125     }
126     
127     /**
128      * Constructs a <code>SQLFeatureNotSupportedException</code> object
129      * with a given
130      * <code>reason</code>, <code>SQLState</code> and <code>cause</code>.
131      * The vendor code is initialized to 0.
132      * <p>
133      * @param reason a description of the exception.
134      * @param SQLState an XOPEN or SQL:2003 code identifying the exception
135      * @param cause the (which is saved for later retrieval by the <code>getCause()</code> method); may be null indicating
136      * the cause is non-existent or unknown.
137      * @since 1.6
138      */

139     public SQLFeatureNotSupportedException(String JavaDoc reason, String JavaDoc SQLState, Throwable JavaDoc cause) {
140         super(reason,SQLState,cause);
141     }
142     
143     /**
144      * Constructs a <code>SQLFeatureNotSupportedException</code> object
145      * with a given
146      * <code>reason</code>, <code>SQLState</code>, <code>vendorCode</code>
147      * and <code>cause</code>.
148      * <p>
149      * @param reason a description of the exception
150      * @param SQLState an XOPEN or SQL:2003 code identifying the exception
151      * @param vendorCode a database vendor-specific exception code
152      * @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 indicating
153      * the cause is non-existent or unknown.
154      * @since 1.6
155      */

156     public SQLFeatureNotSupportedException(String JavaDoc reason, String JavaDoc SQLState, int vendorCode, Throwable JavaDoc cause) {
157         super(reason,SQLState,vendorCode,cause);
158     }
159
160     private static final long serialVersionUID = -1026510870282316051L;
161 }
162
Popular Tags