src/java.sql/share/classes/java/sql/SQLFeatureNotSupportedException.java
author alanb
Tue, 15 May 2018 09:33:02 +0100
changeset 50109 ea54197f4fe4
parent 47216 71c04702a3d5
permissions -rw-r--r--
8203059: (so) Closing a socket channel registered with Selector and with SO_LINGER set to 0 does not reset connection Reviewed-by: chegar
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
23010
6dadb192ad81 8029235: Update copyright year to match last edit in jdk8 jdk repository for 2013
lana
parents: 21278
diff changeset
     2
 * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
2
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
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
2
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
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    23
 * questions.
2
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>0A</i>'
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
 * ( the value is 'zero' A).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
 * This indicates that the JDBC driver does not support an optional JDBC feature.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
 * Optional JDBC features can fall into the fallowing categories:
20880
1b610151b316 8026812: doclint clean up for java.sql and javax.sql
lancea
parents: 5506
diff changeset
    33
 *
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
 *<UL>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
 *<LI>no support for an optional feature
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
 *<LI>no support for an optional overloaded method
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
 *<LI>no support for an optional mode for a method.  The mode for a method is
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
 *determined based on constants passed as parameter values to a method
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
 *</UL>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
 * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
public class SQLFeatureNotSupportedException extends SQLNonTransientException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
         * Constructs a <code>SQLFeatureNotSupportedException</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
         *  The <code>reason</code>, <code>SQLState</code> are initialized
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
         * to <code>null</code> and the vendor code is initialized to 0.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
         *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
         * The <code>cause</code> is not initialized, and may subsequently be
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
         * initialized by a call to the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
         * {@link Throwable#initCause(java.lang.Throwable)} method.
23590
ffd8b0b70511 8038493: Tidy warnings cleanup for java.sql
yan
parents: 23010
diff changeset
    53
         *
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
         * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
        public SQLFeatureNotSupportedException() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
                super();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
         * Constructs a <code>SQLFeatureNotSupportedException</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
         * with a given <code>reason</code>. The <code>SQLState</code>
21278
ef8a3a2a72f2 8022746: List of spelling errors in API doc
malenkov
parents: 20880
diff changeset
    63
         * is initialized to <code>null</code> and the vendor code is initialized
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
         * to 0.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
         *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
         * The <code>cause</code> is not initialized, and may subsequently be
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
         * initialized by a call to the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
         * {@link Throwable#initCause(java.lang.Throwable)} method.
23590
ffd8b0b70511 8038493: Tidy warnings cleanup for java.sql
yan
parents: 23010
diff changeset
    69
         *
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
         * @param reason a description of the exception
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
         * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
        public SQLFeatureNotSupportedException(String reason) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
                super(reason);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
         * Constructs a <code>SQLFeatureNotSupportedException</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
         * with a given <code>reason</code> and <code>SQLState</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
         *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
         * The <code>cause</code> is not initialized, and may subsequently be
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
         * initialized by a call to the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
         * {@link Throwable#initCause(java.lang.Throwable)} method. The vendor code
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
         * is initialized to 0.
23590
ffd8b0b70511 8038493: Tidy warnings cleanup for java.sql
yan
parents: 23010
diff changeset
    85
         *
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
         * @param reason a description of the exception
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
         * @param SQLState an XOPEN or SQL:2003 code identifying the exception
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
         * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
        public SQLFeatureNotSupportedException(String reason, String SQLState) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
                super(reason,SQLState);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
        /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
         * Constructs a <code>SQLFeatureNotSupportedException</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
         *  with a given <code>reason</code>, <code>SQLState</code>  and
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
         * <code>vendorCode</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
         *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
         * The <code>cause</code> is not initialized, and may subsequently be
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
         * initialized by a call to the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
         * {@link Throwable#initCause(java.lang.Throwable)} method.
23590
ffd8b0b70511 8038493: Tidy warnings cleanup for java.sql
yan
parents: 23010
diff changeset
   102
         *
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
         * @param reason a description of the exception
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
         * @param SQLState an XOPEN or SQL:2003 code identifying the exception
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
         * @param vendorCode a database vendor specific exception code
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
         * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
        public SQLFeatureNotSupportedException(String reason, String SQLState, int vendorCode) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
                super(reason,SQLState,vendorCode);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
     * Constructs a <code>SQLFeatureNotSupportedException</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
     *   with a given  <code>cause</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
     * The <code>SQLState</code> is initialized
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
     * to <code>null</code> and the vendor code is initialized to 0.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
     * The <code>reason</code>  is initialized to <code>null</code> if
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
     * <code>cause==null</code> or to <code>cause.toString()</code> if
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
     * <code>cause!=null</code>.
23590
ffd8b0b70511 8038493: Tidy warnings cleanup for java.sql
yan
parents: 23010
diff changeset
   120
     *
21278
ef8a3a2a72f2 8022746: List of spelling errors in API doc
malenkov
parents: 20880
diff changeset
   121
     * @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
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
     *     the cause is non-existent or unknown.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
    public SQLFeatureNotSupportedException(Throwable cause) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
        super(cause);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
     * Constructs a <code>SQLFeatureNotSupportedException</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
     * with a given
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
     * <code>reason</code> and  <code>cause</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
     * The <code>SQLState</code> is  initialized to <code>null</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
     * and the vendor code is initialized to 0.
23590
ffd8b0b70511 8038493: Tidy warnings cleanup for java.sql
yan
parents: 23010
diff changeset
   135
     *
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
     * @param reason a description of the exception.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
     * @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
   138
     *     the cause is non-existent or unknown.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
    public SQLFeatureNotSupportedException(String reason, Throwable cause) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
        super(reason,cause);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
     * Constructs a <code>SQLFeatureNotSupportedException</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
     * with a given
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
     * <code>reason</code>, <code>SQLState</code> and  <code>cause</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
     * The vendor code is initialized to 0.
23590
ffd8b0b70511 8038493: Tidy warnings cleanup for java.sql
yan
parents: 23010
diff changeset
   150
     *
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
     * @param reason a description of the exception.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
     * @param SQLState an XOPEN or SQL:2003 code identifying the exception
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
     * @param cause the (which is saved for later retrieval by the <code>getCause()</code> method); may be null indicating
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
     *     the cause is non-existent or unknown.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
    public SQLFeatureNotSupportedException(String reason, String SQLState, Throwable cause) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
        super(reason,SQLState,cause);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
     *  Constructs a <code>SQLFeatureNotSupportedException</code> object
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
     * with a given
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
     * <code>reason</code>, <code>SQLState</code>, <code>vendorCode</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
     * and  <code>cause</code>.
23590
ffd8b0b70511 8038493: Tidy warnings cleanup for java.sql
yan
parents: 23010
diff changeset
   166
     *
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
     * @param reason a description of the exception
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
     * @param SQLState an XOPEN or SQL:2003 code identifying the exception
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
     * @param vendorCode a database vendor-specific exception code
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
     * @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
   171
     *     the cause is non-existent or unknown.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
    public SQLFeatureNotSupportedException(String reason, String SQLState, int vendorCode, Throwable cause) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
        super(reason,SQLState,vendorCode,cause);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
    private static final long serialVersionUID = -1026510870282316051L;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
}