1/*
2 * Licensed to the Apache Software Foundation (ASF) under one or more
3 * contributor license agreements.  See the NOTICE file distributed with
4 * this work for additional information regarding copyright ownership.
5 * The ASF licenses this file to You under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
7 * the License.  You may obtain a copy of the License at
8 *
9 *     http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
18package java.sql;
19
20public class SQLTransactionRollbackException extends SQLTransientException {
21
22    private static final long serialVersionUID = 5246680841170837229L;
23
24    /**
25     * Creates an SQLTransactionRollbackException object. The Reason string is
26     * set to null, the SQLState string is set to null and the Error Code is set
27     * to 0.
28     */
29    public SQLTransactionRollbackException() {
30    }
31
32    /**
33     * Creates an SQLTransactionRollbackException object. The Reason string is
34     * set to the given reason string, the SQLState string is set to null and
35     * the Error Code is set to 0.
36     *
37     * @param reason
38     *            the string to use as the Reason string
39     */
40    public SQLTransactionRollbackException(String reason) {
41        super(reason, null, 0);
42    }
43
44    /**
45     * Creates an SQLTransactionRollbackException object. The Reason string is
46     * set to the given reason string, the SQLState string is set to the given
47     * SQLState string and the Error Code is set to 0.
48     *
49     * @param reason
50     *            the string to use as the Reason string
51     * @param sqlState
52     *            the string to use as the SQLState string
53     */
54    public SQLTransactionRollbackException(String reason, String sqlState) {
55        super(reason, sqlState, 0);
56    }
57
58    /**
59     * Creates an SQLTransactionRollbackException object. The Reason string is
60     * set to the given reason string, the SQLState string is set to the given
61     * SQLState string and the Error Code is set to the given error code value.
62     *
63     * @param reason
64     *            the string to use as the Reason string
65     * @param sqlState
66     *            the string to use as the SQLState string
67     * @param vendorCode
68     *            the integer value for the error code
69     */
70    public SQLTransactionRollbackException(String reason, String sqlState,
71            int vendorCode) {
72        super(reason, sqlState, vendorCode);
73    }
74
75    /**
76     * Creates an SQLTransactionRollbackException object. The Reason string is
77     * set to the null if cause == null or cause.toString() if cause!=null,and
78     * the cause Throwable object is set to the given cause Throwable object.
79     *
80     * @param cause
81     *            the Throwable object for the underlying reason this
82     *            SQLException
83     */
84    public SQLTransactionRollbackException(Throwable cause) {
85        super(cause);
86    }
87
88    /**
89     * Creates an SQLTransactionRollbackException object. The Reason string is
90     * set to the given and the cause Throwable object is set to the given cause
91     * Throwable object.
92     *
93     * @param reason
94     *            the string to use as the Reason string
95     * @param cause
96     *            the Throwable object for the underlying reason this
97     *            SQLException
98     */
99    public SQLTransactionRollbackException(String reason, Throwable cause) {
100        super(reason, cause);
101    }
102
103    /**
104     * Creates an SQLTransactionRollbackException object. The Reason string is
105     * set to the given reason string, the SQLState string is set to the given
106     * SQLState string and the cause Throwable object is set to the given cause
107     * Throwable object.
108     *
109     * @param reason
110     *            the string to use as the Reason string
111     * @param sqlState
112     *            the string to use as the SQLState string
113     * @param cause
114     *            the Throwable object for the underlying reason this
115     *            SQLException
116     */
117    public SQLTransactionRollbackException(String reason, String sqlState,
118            Throwable cause) {
119        super(reason, sqlState, cause);
120    }
121
122    /**
123     * Creates an SQLTransactionRollbackException object. The Reason string is
124     * set to the given reason string, the SQLState string is set to the given
125     * SQLState string , the Error Code is set to the given error code value,
126     * and the cause Throwable object is set to the given cause Throwable
127     * object.
128     *
129     * @param reason
130     *            the string to use as the Reason string
131     * @param sqlState
132     *            the string to use as the SQLState string
133     * @param vendorCode
134     *            the integer value for the error code
135     * @param cause
136     *            the Throwable object for the underlying reason this
137     *            SQLException
138     */
139    public SQLTransactionRollbackException(String reason, String sqlState,
140            int vendorCode, Throwable cause) {
141        super(reason, sqlState, vendorCode, cause);
142    }
143}
144