Ignore:
Timestamp:
Apr 27, 2004, 8:39:34 PM (22 years ago)
Author:
bird
Message:

GCC v3.3.3 sources.

Location:
branches/GNU/src/gcc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/GNU/src/gcc

    • Property svn:ignore
      •  

        old new  
        2626configure.vr
        2727configure.vrs
         28
        2829Makefile
        29 dir.info
        3030lost+found
        3131update.out
  • branches/GNU/src/gcc/libjava/java/sql/ResultSetMetaData.java

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11/* ResultSetMetaData.java -- Returns information about the ResultSet
    2    Copyright (C) 1999, 2000 Free Software Foundation, Inc.
     2   Copyright (C) 1999, 2000 Free Software Foundation, Inc.
    33
    44This file is part of GNU Classpath.
     
    4040
    4141/**
    42   * This interface provides a mechanism for obtaining information about
    43   * the columns that are present in a <code>ResultSet</code>.
    44   * <p>
    45   * Note that in this class column indexes start at 1, not 0.
    46   *
    47   * @author Aaron M. Renn ([email protected])
    48   */
    49 public interface ResultSetMetaData
     42 * This interface provides a mechanism for obtaining information about
     43 * the columns that are present in a <code>ResultSet</code>.
     44 * <p>
     45 * Note that in this class column indexes start at 1, not 0.
     46 *
     47 * @author Aaron M. Renn ([email protected])
     48 */
     49public interface ResultSetMetaData
    5050{
    51 
    52 /**
    53   * The column does not allow NULL's.
    54   */
    55 public static final int columnNoNulls = 0;
    56 
    57 /**
    58   * The column allows NULL's.
    59   */
    60 public static final int columnNullable = 1;
    61 
    62 /**
    63   * It is unknown whether or not the column allows NULL's.
    64   */
    65 public static final int columnNullableUnknown = 2;
    66 
    67 /*************************************************************************/
    68 
    69 /**
    70   * This method returns the number of columns in the result set.
    71   *
    72   * @return The number of columns in the result set.
    73   *
    74   * @exception SQLException If an error occurs.
    75   */
    76 public abstract int
    77 getColumnCount() throws SQLException;
    78 
    79 /*************************************************************************/
    80 
    81 /**
    82   * This method test whether or not the column is an auto-increment column.
    83   * Auto-increment columns are read-only.
    84   *
    85   * @param index The index of the column to test.
    86   *
    87   * @return <code>true</code> if the column is auto-increment, <code>false</code>
    88   * otherwise.
    89   *
    90   * @exception SQLException If an error occurs.
    91   */
    92 public abstract boolean
    93 isAutoIncrement(int index) throws SQLException;
    94 
    95 /*************************************************************************/
    96 
    97 /**
    98   * This method tests whether or not a column is case sensitive in its values.
    99   *
    100   * @param index The index of the column to test.
    101   *
    102   * @return <code>true</code> if the column value is case sensitive,
    103   * <code>false</code> otherwise.
    104   *
    105   * @exception SQLException If an error occurs.
    106   */
    107 public abstract boolean
    108 isCaseSensitive(int index) throws SQLException;
    109 
    110 /*************************************************************************/
    111 
    112 /**
    113   * This method tests whether not the specified column can be used in
    114   * a WHERE clause.
    115   *
    116   * @param index The index of the column to test.
    117   *
    118   * @return <code>true</code> if the column may be used in a WHERE clause,
    119   * <code>false</code> otherwise.
    120   *
    121   * @exception SQLException If an error occurs.
    122   */
    123 public abstract boolean
    124 isSearchable(int index) throws SQLException;
    125 
    126 /*************************************************************************/
    127 
    128 /**
    129   * This method tests whether or not the column stores a monetary value.
    130   *
    131   * @param index The index of the column to test.
    132   *
    133   * @return <code>true</code> if the column contains a monetary value,
    134   * <code>false</code> otherwise.
    135   *
    136   * @exception SQLException If an error occurs.
    137   */
    138 public abstract boolean
    139 isCurrency(int index) throws SQLException;
    140 
    141 /*************************************************************************/
    142 
    143 /**
    144   * This method returns a value indicating whether or not the specified
    145   * column may contain a NULL value.
    146   *
    147   * @param index The index of the column to test.
    148   *
    149   * @return A constant indicating whether or not the column can contain NULL,
    150   * which will be one of <code>columnNoNulls</code>,
    151   * <code>columnNullable</code>, or <code>columnNullableUnknown</code>.
    152   *
    153   * @exception SQLException If an error occurs.
    154   */
    155 public abstract int
    156 isNullable(int index) throws SQLException;
    157 
    158 /*************************************************************************/
    159 
    160 /**
    161   * This method tests whether or not the value of the specified column
    162   * is signed or unsigned.
    163   *
    164   * @param index The index of the column to test.
    165   *
    166   * @return <code>true</code> if the column value is signed, <code>false</code>
    167   * otherwise.
    168   *
    169   * @exception SQLException If an error occurs.
    170   */
    171 public abstract boolean
    172 isSigned(int index) throws SQLException;
    173 
    174 /*************************************************************************/
    175 
    176 /**
    177   * This method returns the maximum number of characters that can be used
    178   * to display a value in this column.
    179   *
    180   * @param index The index of the column to check.
    181   *
    182   * @return The maximum number of characters that can be used to display a
    183   * value for this column.
    184   *
    185   * @exception SQLException If an error occurs.
    186   */
    187 public abstract int
    188 getColumnDisplaySize(int index) throws SQLException;
    189 
    190 /*************************************************************************/
    191 
    192 /**
    193   * This method returns a string that should be used as a caption for this
    194   * column for user display purposes.
    195   *
    196   * @param index The index of the column to check.
    197   *
    198   * @return A display string for the column.
    199   *
    200   * @exception SQLException If an error occurs.
    201   */
    202 public abstract String
    203 getColumnLabel(int index) throws SQLException;
    204 
    205 /*************************************************************************/
    206 
    207 /**
    208   * This method returns the name of the specified column.
    209   *
    210   * @param index The index of the column to return the name of.
    211   *
    212   * @return The name of the column.
    213   *
    214   * @exception SQLException If an error occurs.
    215   */
    216 public abstract String
    217 getColumnName(int index) throws SQLException;
    218 
    219 /*************************************************************************/
    220 
    221 /**
    222   * This method returns the name of the schema that contains the specified
    223   * column.
    224   *
    225   * @param index The index of the column to check the schema name for.
    226   *
    227   * @return The name of the schema that contains the column.
    228   *
    229   * @exception SQLException If an error occurs.
    230   */
    231 public abstract String
    232 getSchemaName(int index) throws SQLException;
    233 
    234 /*************************************************************************/
    235 
    236 /**
    237   * This method returns the precision of the specified column, which is the
    238   * number of decimal digits it contains.
    239   *
    240   * @param index The index of the column to check the precision on.
    241   *
    242   * @return The precision of the specified column.
    243   *
    244   * @exception SQLException If an error occurs.
    245   */
    246 public abstract int
    247 getPrecision(int index) throws SQLException;
    248 
    249 /*************************************************************************/
    250 
    251 /**
    252   * This method returns the scale of the specified column, which is the
    253   * number of digits to the right of the decimal point.
    254   *
    255   * @param index The index column to check the scale of.
    256   *
    257   * @return The scale of the column.
    258   *
    259   * @exception SQLException If an error occurs.
    260   */
    261 public abstract int
    262 getScale(int index) throws SQLException;
    263 
    264 /*************************************************************************/
    265 
    266 /**
    267   * This method returns the name of the table containing the specified
    268   * column.
    269   *
    270   * @param index The index of the column to check the table name for.
    271   *
    272   * @return The name of the table containing the column.
    273   *
    274   * @exception SQLException If an error occurs.
    275   */
    276 public abstract String
    277 getTableName(int index) throws SQLException;
    278 
    279 /*************************************************************************/
    280 
    281 /**
    282   * This method returns the name of the catalog containing the specified
    283   * column.
    284   *
    285   * @param index The index of the column to check the catalog name for.
    286   *
    287   * @return The name of the catalog containing the column.
    288   *
    289   * @exception SQLException If an error occurs.
    290   */
    291 public abstract String
    292 getCatalogName(int index) throws SQLException;
    293 
    294 /*************************************************************************/
    295 
    296 /**
    297   * This method returns the SQL type of the specified column.  This will
    298   * be one of the constants from <code>Types</code>.
    299   *
    300   * @param index The index of the column to check the SQL type of.
    301   *
    302   * @return The SQL type for this column.
    303   *
    304   * @exception SQLException If an error occurs.
    305   *
    306   * @see Types
    307   */
    308 public abstract int
    309 getColumnType(int index) throws SQLException;
    310 
    311 /*************************************************************************/
    312 
    313 /**
    314   * This method returns the name of the SQL type for this column.
    315   *
    316   * @param index The index of the column to check the SQL type name for.
    317   *
    318   * @return The name of the SQL type for this column.
    319   *
    320   * @exception SQLException If an error occurs.
    321   */
    322 public abstract String
    323 getColumnTypeName(int index) throws SQLException;
    324 
    325 /*************************************************************************/
    326 
    327 /**
    328   * This method tests whether or not the specified column is read only.
    329   *
    330   * @param index The index of the column to check.
    331   *
    332   * @return <code>true</code> if the column is read only, <code>false</code>
    333   * otherwise.
    334   *
    335   * @exception SQLException If an error occurs.
    336   */
    337 public abstract boolean
    338 isReadOnly(int index) throws SQLException;
    339 
    340 /*************************************************************************/
    341 
    342 /**
    343   * This method tests whether or not the column may be writable.  This
    344   * does not guarantee that a write will be successful.
    345   *
    346   * @param index The index of the column to check for writability.
    347   *
    348   * @return <code>true</code> if the column may be writable,
    349   * <code>false</code> otherwise.
    350   *
    351   * @exception SQLException If an error occurs.
    352   */
    353 public abstract boolean
    354 isWritable(int index) throws SQLException;
    355 
    356 /*************************************************************************/
    357 
    358 /**
    359   * This method tests whether or not the column is writable.  This
    360   * does guarantee that a write will be successful.
    361   *
    362   * @param index The index of the column to check for writability.
    363   *
    364   * @return <code>true</code> if the column is writable,
    365   * <code>false</code> otherwise.
    366   *
    367   * @exception SQLException If an error occurs.
    368   */
    369 public abstract boolean
    370 isDefinitelyWritable(int index) throws SQLException;
    371 
    372 /*************************************************************************/
    373 
    374 /**
    375   * This method returns the name of the Java class which will be used to
    376   * create objects representing the data in this column.
    377   *
    378   * @param index The index of the column to check.
    379   *
    380   * @return The name of the Java class that will be used for values in
    381   * this column.
    382   *
    383   * @exception SQLException If an error occurs.
    384   */
    385 public abstract String
    386 getColumnClassName(int index) throws SQLException;
    387 
    388 } // interface ResultSetMetaData
    389 
     51  /**
     52   * The column does not allow NULL's.
     53   */
     54  public static final int columnNoNulls = 0;
     55
     56  /**
     57   * The column allows NULL's.
     58   */
     59  public static final int columnNullable = 1;
     60
     61  /**
     62   * It is unknown whether or not the column allows NULL's.
     63   */
     64  public static final int columnNullableUnknown = 2;
     65
     66  /**
     67   * This method returns the number of columns in the result set.
     68   *
     69   * @return The number of columns in the result set.
     70   * @exception SQLException If an error occurs.
     71   */
     72  public int getColumnCount() throws SQLException;
     73
     74  /**
     75   * This method test whether or not the column is an auto-increment column.
     76   * Auto-increment columns are read-only.
     77   *
     78   * @param index The index of the column to test.
     79   * @return <code>true</code> if the column is auto-increment, <code>false</code>
     80   *         otherwise.
     81   * @exception SQLException If an error occurs.
     82   */
     83  public boolean isAutoIncrement(int column) throws SQLException;
     84
     85  /**
     86   * This method tests whether or not a column is case sensitive in its values.
     87   *
     88   * @param index The index of the column to test.
     89   * @return <code>true</code> if the column value is case sensitive,
     90   *         <code>false</code> otherwise.
     91   * @exception SQLException If an error occurs.
     92   */
     93  public boolean isCaseSensitive(int column) throws SQLException;
     94
     95  /**
     96   * This method tests whether not the specified column can be used in
     97   * a WHERE clause.
     98   *
     99   * @param index The index of the column to test.
     100   * @return <code>true</code> if the column may be used in a WHERE clause,
     101   *         <code>false</code> otherwise.
     102   * @exception SQLException If an error occurs.
     103   */
     104  public boolean isSearchable(int column) throws SQLException;
     105
     106  /**
     107   * This method tests whether or not the column stores a monetary value.
     108   *
     109   * @param index The index of the column to test.
     110   * @return <code>true</code> if the column contains a monetary value,
     111   *         <code>false</code> otherwise.
     112   * @exception SQLException If an error occurs.
     113   */
     114  public boolean isCurrency(int column) throws SQLException;
     115
     116  /**
     117   * This method returns a value indicating whether or not the specified
     118   * column may contain a NULL value.
     119   *
     120   * @param index The index of the column to test.
     121   * @return A constant indicating whether or not the column can contain NULL,
     122   *         which will be one of <code>columnNoNulls</code>,
     123   *         <code>columnNullable</code>, or <code>columnNullableUnknown</code>.
     124   * @exception SQLException If an error occurs.
     125   */
     126  public int isNullable(int column) throws SQLException;
     127
     128  /**
     129   * This method tests whether or not the value of the specified column
     130   * is signed or unsigned.
     131   *
     132   * @param index The index of the column to test.
     133   * @return <code>true</code> if the column value is signed, <code>false</code>
     134   *         otherwise.
     135   * @exception SQLException If an error occurs.
     136   */
     137  public boolean isSigned(int column) throws SQLException;
     138
     139  /**
     140   * This method returns the maximum number of characters that can be used
     141   * to display a value in this column.
     142   *
     143   * @param index The index of the column to check.
     144   * @return The maximum number of characters that can be used to display a
     145   *         value for this column.
     146   * @exception SQLException If an error occurs.
     147   */
     148  public int getColumnDisplaySize(int column) throws SQLException;
     149
     150  /**
     151   * This method returns a string that should be used as a caption for this
     152   * column for user display purposes.
     153   *
     154   * @param index The index of the column to check.
     155   * @return A display string for the column.
     156   * @exception SQLException If an error occurs.
     157   */
     158  public String getColumnLabel(int column) throws SQLException;
     159
     160  /**
     161   * This method returns the name of the specified column.
     162   *
     163   * @param index The index of the column to return the name of.
     164   * @return The name of the column.
     165   * @exception SQLException If an error occurs.
     166   */
     167  public String getColumnName(int column) throws SQLException;
     168
     169  /**
     170   * This method returns the name of the schema that contains the specified
     171   * column.
     172   *
     173   * @param index The index of the column to check the schema name for.
     174   * @return The name of the schema that contains the column.
     175   * @exception SQLException If an error occurs.
     176   */
     177  public String getSchemaName(int column) throws SQLException;
     178
     179  /**
     180   * This method returns the precision of the specified column, which is the
     181   * number of decimal digits it contains.
     182   *
     183   * @param index The index of the column to check the precision on.
     184   * @return The precision of the specified column.
     185   * @exception SQLException If an error occurs.
     186   */
     187  public int getPrecision(int column) throws SQLException;
     188
     189  /**
     190   * This method returns the scale of the specified column, which is the
     191   * number of digits to the right of the decimal point.
     192   *
     193   * @param index The index column to check the scale of.
     194   * @return The scale of the column.
     195   * @exception SQLException If an error occurs.
     196   */
     197  public int getScale(int column) throws SQLException;
     198
     199  /**
     200   * This method returns the name of the table containing the specified
     201   * column.
     202   *
     203   * @param index The index of the column to check the table name for.
     204   * @return The name of the table containing the column.
     205   * @exception SQLException If an error occurs.
     206   */
     207  public String getTableName(int column) throws SQLException;
     208
     209  /**
     210   * This method returns the name of the catalog containing the specified
     211   * column.
     212   *
     213   * @param index The index of the column to check the catalog name for.
     214   * @return The name of the catalog containing the column.
     215   * @exception SQLException If an error occurs.
     216   */
     217  public String getCatalogName(int column) throws SQLException;
     218
     219  /**
     220   * This method returns the SQL type of the specified column.  This will
     221   * be one of the constants from <code>Types</code>.
     222   *
     223   * @param index The index of the column to check the SQL type of.
     224   * @return The SQL type for this column.
     225   * @exception SQLException If an error occurs.
     226   * @see Types
     227   */
     228  public int getColumnType(int column) throws SQLException;
     229
     230  /**
     231   * This method returns the name of the SQL type for this column.
     232   *
     233   * @param index The index of the column to check the SQL type name for.
     234   * @return The name of the SQL type for this column.
     235   * @exception SQLException If an error occurs.
     236   */
     237  public String getColumnTypeName(int column) throws SQLException;
     238
     239  /**
     240   * This method tests whether or not the specified column is read only.
     241   *
     242   * @param index The index of the column to check.
     243   * @return <code>true</code> if the column is read only, <code>false</code>
     244   *         otherwise.
     245   * @exception SQLException If an error occurs.
     246   */
     247  public boolean isReadOnly(int column) throws SQLException;
     248
     249  /**
     250   * This method tests whether or not the column may be writable.  This
     251   * does not guarantee that a write will be successful.
     252   *
     253   * @param index The index of the column to check for writability.
     254   * @return <code>true</code> if the column may be writable,
     255   *         <code>false</code> otherwise.
     256   * @exception SQLException If an error occurs.
     257   */
     258  public boolean isWritable(int column) throws SQLException;
     259
     260  /**
     261   * This method tests whether or not the column is writable.  This
     262   * does guarantee that a write will be successful.
     263   *
     264   * @param index The index of the column to check for writability.
     265   * @return <code>true</code> if the column is writable,
     266   *         <code>false</code> otherwise.
     267   * @exception SQLException If an error occurs.
     268   */
     269  public boolean isDefinitelyWritable(int column) throws SQLException;
     270
     271  /**
     272   * This method returns the name of the Java class which will be used to
     273   * create objects representing the data in this column.
     274   *
     275   * @param index The index of the column to check.
     276   * @return The name of the Java class that will be used for values in
     277   *         this column.
     278   * @exception SQLException If an error occurs.
     279   */
     280  public String getColumnClassName(int column) throws SQLException;
     281}
Note: See TracChangeset for help on using the changeset viewer.