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