Home | History | Annotate | Download | only in sql
      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 
     18 package java.sql;
     19 
     20 public class SQLRecoverableException extends SQLException {
     21 
     22     private static final long serialVersionUID = -4144386502923131579L;
     23 
     24     /**
     25      * Creates an SQLRecoverableException object. The Reason string is set to
     26      * null, the SQLState string is set to null and the Error Code is set to 0.
     27      */
     28     public SQLRecoverableException() {
     29         super();
     30     }
     31 
     32     /**
     33      * Creates an SQLRecoverableException object. The Reason string is set to
     34      * the given reason string, the SQLState string is set to null and the Error
     35      * Code is set to 0.
     36      *
     37      * @param reason
     38      *            the string to use as the Reason string
     39      */
     40     public SQLRecoverableException(String reason) {
     41         super(reason, null, 0);
     42     }
     43 
     44     /**
     45      * Creates an SQLRecoverableException object. The Reason string is set to
     46      * the given reason string, the SQLState string is set to the given SQLState
     47      * 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 SQLRecoverableException(String reason, String sqlState) {
     55         super(reason, sqlState, 0);
     56     }
     57 
     58     /**
     59      * Creates an SQLRecoverableException object. The Reason string is set to
     60      * the given reason string, the SQLState string is set to the given SQLState
     61      * 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 SQLRecoverableException(String reason, String sqlState,
     71             int vendorCode) {
     72         super(reason, sqlState, vendorCode);
     73     }
     74 
     75     /**
     76      * Creates an SQLRecoverableException object. The Reason string is set to
     77      * the null if cause == null or cause.toString() if cause!=null,and the
     78      * 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 SQLRecoverableException(Throwable cause) {
     85         super(cause);
     86     }
     87 
     88     /**
     89      * Creates an SQLRecoverableException object. The Reason string is set to
     90      * 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 SQLRecoverableException(String reason, Throwable cause) {
    100         super(reason, cause);
    101     }
    102 
    103     /**
    104      * Creates an SQLRecoverableException object. The Reason string is set to
    105      * the given reason string, the SQLState string is set to the given SQLState
    106      * string and the cause Throwable object is set to the given cause Throwable
    107      * 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 SQLRecoverableException(String reason, String sqlState,
    118             Throwable cause) {
    119         super(reason, sqlState, cause);
    120     }
    121 
    122     /**
    123      * Creates an SQLRecoverableException object. The Reason string is set to
    124      * the given reason string, the SQLState string is set to the given SQLState
    125      * string , the Error Code is set to the given error code value, and the
    126      * cause Throwable object is set to the given cause Throwable object.
    127      *
    128      * @param reason
    129      *            the string to use as the Reason string
    130      * @param sqlState
    131      *            the string to use as the SQLState string
    132      * @param vendorCode
    133      *            the integer value for the error code
    134      * @param cause
    135      *            the Throwable object for the underlying reason this
    136      *            SQLException
    137      */
    138     public SQLRecoverableException(String reason, String sqlState,
    139             int vendorCode, Throwable cause) {
    140         super(reason, sqlState, vendorCode, cause);
    141     }
    142 }