KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > java > sql > SQLNonTransientException


1 /*
2  * %W% %E%
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 an instance where a retry
12  * of the same operation would fail unless the cause of the <code>SQLException</code>
13  * is corrected.
14  *<p>
15  *
16  * @since 1.6
17  */

18 public class SQLNonTransientException extends java.sql.SQLException JavaDoc {
19
20     /**
21      * Constructs a <code>SQLNonTransientException</code> object.
22          * The <code>reason</code>, <code>SQLState</code> are initialized
23          * to <code>null</code> and the vendor code is initialized to 0.
24          *
25          * The <code>cause</code> is not initialized, and may subsequently be
26          * initialized by a call to the
27          * {@link Throwable#initCause(java.lang.Throwable)} method.
28          * <p>
29          *
30      * @since 1.6
31          */

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

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

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

85     public SQLNonTransientException(String JavaDoc reason, String JavaDoc SQLState, int vendorCode) {
86          super(reason,SQLState,vendorCode);
87     }
88     
89     /**
90      * Constructs a <code>SQLNonTransientException</code> object
91      * with a given <code>cause</code>.
92      * The <code>SQLState</code> is initialized
93      * to <code>null</code> and the vendor code is initialized to 0.
94      * The <code>reason</code> is initialized to <code>null</code> if
95      * <code>cause==null</code> or to <code>cause.toString()</code> if
96      * <code>cause!=null</code>.
97      * <p>
98      * @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
99      * the cause is non-existent or unknown.
100      * @since 1.6
101      */

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

118     public SQLNonTransientException(String JavaDoc reason, Throwable JavaDoc cause) {
119         super(reason,cause);
120
121     }
122     
123     /**
124      * Constructs a <code>SQLNonTransientException</code> object
125      * with a given
126      * <code>reason</code>, <code>SQLState</code> and <code>cause</code>.
127      * The vendor code is initialized to 0.
128      * <p>
129      * @param reason a description of the exception.
130      * @param SQLState an XOPEN or SQL:2003 code identifying the exception
131      * @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
132      * the cause is non-existent or unknown.
133      * @since 1.6
134      */

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

152     public SQLNonTransientException(String JavaDoc reason, String JavaDoc SQLState, int vendorCode, Throwable JavaDoc cause) {
153         super(reason,SQLState,vendorCode,cause);
154     }
155
156    private static final long serialVersionUID = -9104382843534716547L;
157 }
158
Popular Tags