jdk/src/share/classes/java/sql/ResultSetMetaData.java
author chegar
Tue, 12 May 2009 16:32:34 +0100
changeset 3450 2f08a8bb9b83
parent 2 90ce3da70b43
child 5506 202f599c92aa
permissions -rw-r--r--
6801071: Remote sites can compromise user privacy and possibly hijack web sessions Reviewed-by: jccollet, hawtin
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 1996-2005 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
 * An object that can be used to get information about the types
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
 * and properties of the columns in a <code>ResultSet</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
 * The following code fragment creates the <code>ResultSet</code> object rs,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
 * creates the <code>ResultSetMetaData</code> object rsmd, and uses rsmd
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
 * to find out how many columns rs has and whether the first column in rs
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
 * can be used in a <code>WHERE</code> clause.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
 * <PRE>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
 *     ResultSet rs = stmt.executeQuery("SELECT a, b, c FROM TABLE2");
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
 *     ResultSetMetaData rsmd = rs.getMetaData();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
 *     int numberOfColumns = rsmd.getColumnCount();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
 *     boolean b = rsmd.isSearchable(1);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
 * </PRE>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
public interface ResultSetMetaData extends Wrapper {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
     * Returns the number of columns in this <code>ResultSet</code> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
     * @return the number of columns
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
     * @exception SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
    int getColumnCount() throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
     * Indicates whether the designated column is automatically numbered.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
     * @param column the first column is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
     * @return <code>true</code> if so; <code>false</code> otherwise
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
     * @exception SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
    boolean isAutoIncrement(int column) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
     * Indicates whether a column's case matters.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
     * @param column the first column is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
     * @return <code>true</code> if so; <code>false</code> otherwise
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
     * @exception SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
    boolean isCaseSensitive(int column) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
     * Indicates whether the designated column can be used in a where clause.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
     * @param column the first column is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
     * @return <code>true</code> if so; <code>false</code> otherwise
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
     * @exception SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
    boolean isSearchable(int column) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
     * Indicates whether the designated column is a cash value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
     * @param column the first column is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
     * @return <code>true</code> if so; <code>false</code> otherwise
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
     * @exception SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
    boolean isCurrency(int column) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
     * Indicates the nullability of values in the designated column.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
     * @param column the first column is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
     * @return the nullability status of the given column; one of <code>columnNoNulls</code>,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
     *          <code>columnNullable</code> or <code>columnNullableUnknown</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
     * @exception SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
    int isNullable(int column) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
     * The constant indicating that a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
     * column does not allow <code>NULL</code> values.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
    int columnNoNulls = 0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
     * The constant indicating that a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
     * column allows <code>NULL</code> values.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
    int columnNullable = 1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
     * The constant indicating that the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
     * nullability of a column's values is unknown.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
    int columnNullableUnknown = 2;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
     * Indicates whether values in the designated column are signed numbers.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
     * @param column the first column is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
     * @return <code>true</code> if so; <code>false</code> otherwise
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
     * @exception SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
    boolean isSigned(int column) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
     * Indicates the designated column's normal maximum width in characters.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
     * @param column the first column is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
     * @return the normal maximum number of characters allowed as the width
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
     *          of the designated column
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
     * @exception SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
    int getColumnDisplaySize(int column) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
     * Gets the designated column's suggested title for use in printouts and
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
     * displays. The suggested title is usually specified by the SQL <code>AS</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
     * clause.  If a SQL <code>AS</code> is not specified, the value returned from
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
     * <code>getColumnLabel</code> will be the same as the value returned by the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
     * <code>getColumnName</code> method.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
     * @param column the first column is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
     * @return the suggested column title
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
     * @exception SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
    String getColumnLabel(int column) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
     * Get the designated column's name.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
     * @param column the first column is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
     * @return column name
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
     * @exception SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
    String getColumnName(int column) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
     * Get the designated column's table's schema.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
     * @param column the first column is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
     * @return schema name or "" if not applicable
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
     * @exception SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
    String getSchemaName(int column) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
     * Get the designated column's specified column size.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
     * For numeric data, this is the maximum precision.  For character data, this is the length in characters.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
     * For datetime datatypes, this is the length in characters of the String representation (assuming the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
     * maximum allowed precision of the fractional seconds component). For binary data, this is the length in bytes.  For the ROWID datatype,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
     * this is the length in bytes. 0 is returned for data types where the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
     * column size is not applicable.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
     * @param column the first column is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
     * @return precision
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
     * @exception SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
    int getPrecision(int column) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
     * Gets the designated column's number of digits to right of the decimal point.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
     * 0 is returned for data types where the scale is not applicable.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
     * @param column the first column is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
     * @return scale
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
     * @exception SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
    int getScale(int column) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
     * Gets the designated column's table name.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
     * @param column the first column is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
     * @return table name or "" if not applicable
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
     * @exception SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
    String getTableName(int column) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
     * Gets the designated column's table's catalog name.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
     * @param column the first column is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
     * @return the name of the catalog for the table in which the given column
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
     *          appears or "" if not applicable
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
     * @exception SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
    String getCatalogName(int column) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
     * Retrieves the designated column's SQL type.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
     * @param column the first column is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
     * @return SQL type from java.sql.Types
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
     * @exception SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
     * @see Types
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
    int getColumnType(int column) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
     * Retrieves the designated column's database-specific type name.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
     * @param column the first column is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
     * @return type name used by the database. If the column type is
90ce3da70b43 Initial load
duke
parents:
diff changeset
   227
     * a user-defined type, then a fully-qualified type name is returned.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
     * @exception SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
   229
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
    String getColumnTypeName(int column) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
90ce3da70b43 Initial load
duke
parents:
diff changeset
   232
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   233
     * Indicates whether the designated column is definitely not writable.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   234
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   235
     * @param column the first column is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
   236
     * @return <code>true</code> if so; <code>false</code> otherwise
90ce3da70b43 Initial load
duke
parents:
diff changeset
   237
     * @exception SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
   238
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   239
    boolean isReadOnly(int column) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   240
90ce3da70b43 Initial load
duke
parents:
diff changeset
   241
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   242
     * Indicates whether it is possible for a write on the designated column to succeed.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   243
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   244
     * @param column the first column is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
   245
     * @return <code>true</code> if so; <code>false</code> otherwise
90ce3da70b43 Initial load
duke
parents:
diff changeset
   246
     * @exception SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
   247
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   248
    boolean isWritable(int column) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   249
90ce3da70b43 Initial load
duke
parents:
diff changeset
   250
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   251
     * Indicates whether a write on the designated column will definitely succeed.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   252
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   253
     * @param column the first column is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
   254
     * @return <code>true</code> if so; <code>false</code> otherwise
90ce3da70b43 Initial load
duke
parents:
diff changeset
   255
     * @exception SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
   256
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   257
    boolean isDefinitelyWritable(int column) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   258
90ce3da70b43 Initial load
duke
parents:
diff changeset
   259
    //--------------------------JDBC 2.0-----------------------------------
90ce3da70b43 Initial load
duke
parents:
diff changeset
   260
90ce3da70b43 Initial load
duke
parents:
diff changeset
   261
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   262
     * <p>Returns the fully-qualified name of the Java class whose instances
90ce3da70b43 Initial load
duke
parents:
diff changeset
   263
     * are manufactured if the method <code>ResultSet.getObject</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   264
     * is called to retrieve a value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   265
     * from the column.  <code>ResultSet.getObject</code> may return a subclass of the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   266
     * class returned by this method.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   267
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   268
     * @param column the first column is 1, the second is 2, ...
90ce3da70b43 Initial load
duke
parents:
diff changeset
   269
     * @return the fully-qualified name of the class in the Java programming
90ce3da70b43 Initial load
duke
parents:
diff changeset
   270
     *         language that would be used by the method
90ce3da70b43 Initial load
duke
parents:
diff changeset
   271
     * <code>ResultSet.getObject</code> to retrieve the value in the specified
90ce3da70b43 Initial load
duke
parents:
diff changeset
   272
     * column. This is the class name used for custom mapping.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   273
     * @exception SQLException if a database access error occurs
90ce3da70b43 Initial load
duke
parents:
diff changeset
   274
     * @since 1.2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   275
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   276
    String getColumnClassName(int column) throws SQLException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   277
}