KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > java > sql > SQLTimeoutException


1 /*
2  * @(#)SQLTimeoutException.java 1.5 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  * <P>The subclass of {@link SQLException} thrown when the timeout specified by <code>Statement</code>
12  * has expired.
13  * <P> This exception does not correspond to a standard SQLState.
14  *
15  * @since 1.6
16  */

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

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

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

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

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

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

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

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

148     public SQLTimeoutException(String JavaDoc reason, String JavaDoc SQLState, int vendorCode, Throwable JavaDoc cause) {
149         super(reason, SQLState, vendorCode, cause);
150     }
151
152     private static final long serialVersionUID = -4487171280562520262L;
153 }
154
155
Popular Tags