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 SQLNonTransientException extends SQLException {
     21 
     22     private static final long serialVersionUID = -9104382843534716547L;
     23 
     24     /**
     25      * Creates an SQLNonTransientException 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 SQLNonTransientException() {
     29     }
     30 
     31     /**
     32      * Creates an SQLNonTransientException object. The Reason string is set to
     33      * the given reason string, the SQLState string is set to null and the Error
     34      * Code is set to 0.
     35      *
     36      * @param reason
     37      *            the string to use as the Reason string
     38      */
     39     public SQLNonTransientException(String reason) {
     40         super(reason, null, 0);
     41     }
     42 
     43     /**
     44      * Creates an SQLNonTransientException object. The Reason string is set to
     45      * the given reason string, the SQLState string is set to the given SQLState
     46      * string and the Error Code is set to 0.
     47      *
     48      * @param reason
     49      *            the string to use as the Reason string
     50      * @param sqlState
     51      *            the string to use as the SQLState string
     52      */
     53     public SQLNonTransientException(String reason, String sqlState) {
     54         super(reason, sqlState, 0);
     55     }
     56 
     57     /**
     58      * Creates an SQLNonTransientException object. The Reason string is set to
     59      * the given reason string, the SQLState string is set to the given SQLState
     60      * string and the Error Code is set to the given error code value.
     61      *
     62      * @param reason
     63      *            the string to use as the Reason string
     64      * @param sqlState
     65      *            the string to use as the SQLState string
     66      * @param vendorCode
     67      *            the integer value for the error code
     68      */
     69     public SQLNonTransientException(String reason, String sqlState,
     70             int vendorCode) {
     71         super(reason, sqlState, vendorCode);
     72     }
     73 
     74     /**
     75      * Creates an SQLNonTransientException object. The Reason string is set to
     76      * the null if cause == null or cause.toString() if cause!=null,and the
     77      * cause Throwable object is set to the given cause Throwable object.
     78      *
     79      * @param cause
     80      *            the Throwable object for the underlying reason this
     81      *            SQLException
     82      */
     83     public SQLNonTransientException(Throwable cause) {
     84         super(cause);
     85     }
     86 
     87     /**
     88      * Creates an SQLNonTransientException object. The Reason string is set to
     89      * the given and the cause Throwable object is set to the given cause
     90      * Throwable object.
     91      *
     92      * @param reason
     93      *            the string to use as the Reason string
     94      * @param cause
     95      *            the Throwable object for the underlying reason this
     96      *            SQLException
     97      */
     98     public SQLNonTransientException(String reason, Throwable cause) {
     99         super(reason, cause);
    100     }
    101 
    102     /**
    103      * Creates an SQLNonTransientException object. The Reason string is set to
    104      * the given reason string, the SQLState string is set to the given SQLState
    105      * string and the cause Throwable object is set to the given cause Throwable
    106      * object.
    107      *
    108      * @param reason
    109      *            the string to use as the Reason string
    110      * @param sqlState
    111      *            the string to use as the SQLState string
    112      * @param cause
    113      *            the Throwable object for the underlying reason this
    114      *            SQLException
    115      */
    116     public SQLNonTransientException(String reason, String sqlState,
    117             Throwable cause) {
    118         super(reason, sqlState, cause);
    119     }
    120 
    121     /**
    122      * Creates an SQLNonTransientException object. The Reason string is set to
    123      * the given reason string, the SQLState string is set to the given SQLState
    124      * string , the Error Code is set to the given error code value, and the
    125      * cause Throwable object is set to the given cause Throwable object.
    126      *
    127      * @param reason
    128      *            the string to use as the Reason string
    129      * @param sqlState
    130      *            the string to use as the SQLState string
    131      * @param vendorCode
    132      *            the integer value for the error code
    133      * @param cause
    134      *            the Throwable object for the underlying reason this
    135      *            SQLException
    136      */
    137     public SQLNonTransientException(String reason, String sqlState,
    138             int vendorCode, Throwable cause) {
    139         super(reason, sqlState, vendorCode, cause);
    140     }
    141 }
    142