Save This Page
Home » openjdk-7 » java » sql » [javadoc | source]
    1   /*
    2    * Copyright 2005-2006 Sun Microsystems, Inc.  All Rights Reserved.
    3    * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    4    *
    5    * This code is free software; you can redistribute it and/or modify it
    6    * under the terms of the GNU General Public License version 2 only, as
    7    * published by the Free Software Foundation.  Sun designates this
    8    * particular file as subject to the "Classpath" exception as provided
    9    * by Sun in the LICENSE file that accompanied this code.
   10    *
   11    * This code is distributed in the hope that it will be useful, but WITHOUT
   12    * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   13    * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   14    * version 2 for more details (a copy is included in the LICENSE file that
   15    * accompanied this code).
   16    *
   17    * You should have received a copy of the GNU General Public License version
   18    * 2 along with this work; if not, write to the Free Software Foundation,
   19    * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   20    *
   21    * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
   22    * CA 95054 USA or visit www.sun.com if you need additional information or
   23    * have any questions.
   24    */
   25   
   26   package java.sql;
   27   
   28   /**
   29    * <P> The subclass of {@link SQLException} thrown for the SQLState
   30    * class value '<i>08</i>', representing
   31    * that the connection operation that failed will not succeed when
   32    * the operation is retried without the cause of the failure being corrected.
   33    * <p>
   34    * @since 1.6
   35    */
   36   public class SQLNonTransientConnectionException extends java.sql.SQLNonTransientException {
   37   
   38           /**
   39            * Constructs a <code>SQLNonTransientConnectionException</code> object.
   40            * The <code>reason</code>, <code>SQLState</code> are initialized
   41            * to <code>null</code> and the vendor code is initialized to 0.
   42            *
   43            * The <code>cause</code> is not initialized, and may subsequently be
   44            * initialized by a call to the
   45            * {@link Throwable#initCause(java.lang.Throwable)} method.
   46            * <p>
   47            *
   48            * @since 1.6
   49            */
   50           public SQLNonTransientConnectionException() {
   51                    super();
   52           }
   53   
   54           /**
   55            * Constructs a <code>SQLNonTransientConnectionException</code> object
   56            *  with a given <code>reason</code>. The <code>SQLState</code>
   57            * is initialized to <code>null</code> and the vender code is initialized
   58            * to 0.
   59            *
   60            * The <code>cause</code> is not initialized, and may subsequently be
   61            * initialized by a call to the
   62            * {@link Throwable#initCause(java.lang.Throwable)} method.
   63            * <p>
   64            * @param reason a description of the exception
   65            * @since 1.6
   66            */
   67           public SQLNonTransientConnectionException(String reason) {
   68                   super(reason);
   69           }
   70   
   71           /**
   72            * Constructs a <code>SQLNonTransientConnectionException</code> object
   73            * with a given <code>reason</code> and <code>SQLState</code>.
   74            *
   75            * The <code>cause</code> is not initialized, and may subsequently be
   76            * initialized by a call to the
   77            * {@link Throwable#initCause(java.lang.Throwable)} method. The vendor code
   78            * is initialized to 0.
   79            * <p>
   80            * @param reason a description of the exception
   81            * @param SQLState an XOPEN or SQL:2003 code identifying the exception
   82            * @since 1.6
   83            */
   84           public SQLNonTransientConnectionException(String reason, String SQLState) {
   85                    super(reason,SQLState);
   86           }
   87   
   88           /**
   89            * Constructs a <code>SQLNonTransientConnectionException</code> object
   90            * with a given <code>reason</code>, <code>SQLState</code>  and
   91            * <code>vendorCode</code>.
   92            *
   93            * The <code>cause</code> is not initialized, and may subsequently be
   94            * initialized by a call to the
   95            * {@link Throwable#initCause(java.lang.Throwable)} method.
   96            * <p>
   97            * @param reason a description of the exception
   98            * @param SQLState an XOPEN or SQL:2003 code identifying the exception
   99            * @param vendorCode a database vendor specific exception code
  100            * @since 1.6
  101            */
  102           public SQLNonTransientConnectionException(String reason, String SQLState, int vendorCode) {
  103                   super(reason,SQLState,vendorCode);
  104           }
  105   
  106           /**
  107        * Constructs a <code>SQLNonTransientConnectionException</code> object
  108            * with a given  <code>cause</code>.
  109              * The <code>SQLState</code> is initialized
  110        * to <code>null</code> and the vendor code is initialized to 0.
  111        * The <code>reason</code>  is initialized to <code>null</code> if
  112        * <code>cause==null</code> or to <code>cause.toString()</code> if
  113        * <code>cause!=null</code>.
  114            * <p>
  115        * @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
  116        *     the cause is non-existent or unknown.
  117        * @since 1.6
  118        */
  119       public SQLNonTransientConnectionException(Throwable cause) {
  120           super(cause);
  121       }
  122   
  123       /**
  124        * Constructs a <code>SQLTransientException</code> object
  125        * with a given
  126        * <code>reason</code> and  <code>cause</code>.
  127        * The <code>SQLState</code> is  initialized to <code>null</code>
  128        * and the vendor code is initialized to 0.
  129        * <p>
  130        * @param reason a description of 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 SQLNonTransientConnectionException(String reason, Throwable cause) {
  136           super(reason,cause);
  137       }
  138   
  139       /**
  140        * Constructs a <code>SQLNonTransientConnectionException</code> object
  141        * with a given
  142        * <code>reason</code>, <code>SQLState</code> and  <code>cause</code>.
  143        * The vendor code is initialized to 0.
  144        * <p>
  145        * @param reason a description of the exception.
  146        * @param SQLState an XOPEN or SQL:2003 code identifying the exception
  147        * @param cause the (which is saved for later retrieval by the <code>getCause()</code> method); may be null indicating
  148        *     the cause is non-existent or unknown.
  149        * @since 1.6
  150        */
  151       public SQLNonTransientConnectionException(String reason, String SQLState, Throwable cause) {
  152           super(reason,SQLState,cause);
  153       }
  154   
  155       /**
  156        *  Constructs a <code>SQLNonTransientConnectionException</code> object
  157        * with a given
  158        * <code>reason</code>, <code>SQLState</code>, <code>vendorCode</code>
  159        * and  <code>cause</code>.
  160        * <p>
  161        * @param reason a description of the exception
  162        * @param SQLState an XOPEN or SQL:2003 code identifying the exception
  163        * @param vendorCode a database vendor-specific exception code
  164        * @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
  165        *     the cause is non-existent or unknown.
  166        * @since 1.6
  167        */
  168       public SQLNonTransientConnectionException(String reason, String SQLState, int vendorCode, Throwable cause) {
  169           super(reason,SQLState,vendorCode,cause);
  170       }
  171   
  172       private static final long serialVersionUID = -5852318857474782892L;
  173   
  174   }

Save This Page
Home » openjdk-7 » java » sql » [javadoc | source]