From 64089cc9f030d8ef7972adb5d117e0b23f47d62b Mon Sep 17 00:00:00 2001 From: mark Date: Thu, 18 May 2006 17:29:21 +0000 Subject: Imported GNU Classpath 0.90 * scripts/makemake.tcl: LocaleData.java moved to gnu/java/locale. * sources.am: Regenerated. * gcj/javaprims.h: Regenerated. * Makefile.in: Regenerated. * gcj/Makefile.in: Regenerated. * include/Makefile.in: Regenerated. * testsuite/Makefile.in: Regenerated. * gnu/java/lang/VMInstrumentationImpl.java: New override. * gnu/java/net/local/LocalSocketImpl.java: Likewise. * gnu/classpath/jdwp/VMMethod.java: Likewise. * gnu/classpath/jdwp/VMVirtualMachine.java: Update to latest interface. * java/lang/Thread.java: Add UncaughtExceptionHandler. * java/lang/reflect/Method.java: Implements GenericDeclaration and isSynthetic(), * java/lang/reflect/Field.java: Likewise. * java/lang/reflect/Constructor.java * java/lang/Class.java: Implements Type, GenericDeclaration, getSimpleName() and getEnclosing*() methods. * java/lang/Class.h: Add new public methods. * java/lang/Math.java: Add signum(), ulp() and log10(). * java/lang/natMath.cc (log10): New function. * java/security/VMSecureRandom.java: New override. * java/util/logging/Logger.java: Updated to latest classpath version. * java/util/logging/LogManager.java: New override. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@113887 138bc75d-0d04-0410-961f-82ee72b054a4 --- libjava/classpath/java/sql/DatabaseMetaData.java | 166 +++++++++++++++-------- 1 file changed, 111 insertions(+), 55 deletions(-) (limited to 'libjava/classpath/java/sql/DatabaseMetaData.java') diff --git a/libjava/classpath/java/sql/DatabaseMetaData.java b/libjava/classpath/java/sql/DatabaseMetaData.java index d34c4e2f927..48c2d9afcd8 100644 --- a/libjava/classpath/java/sql/DatabaseMetaData.java +++ b/libjava/classpath/java/sql/DatabaseMetaData.java @@ -1,5 +1,5 @@ /* DatabaseMetaData.java -- Information about the database itself. - Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc. + Copyright (C) 1999, 2000, 2001, 2002, 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -256,10 +256,19 @@ public interface DatabaseMetaData */ short tableIndexOther = 3; + /** + * A NULL value is not allowed for this attribute. + */ short attributeNoNulls = 0; + /** + * A NULL value is allowed for this attribute. + */ short attributeNullable = 1; + /** + * It is unknown whether or not NULL values are allowed for this attribute. + */ short attributeNullableUnknown = 2; int sqlStateXOpen = 1; @@ -1395,12 +1404,12 @@ public interface DatabaseMetaData * or "" to return procedures from all catalogs. * @param schemaPattern A schema pattern for the schemas to return stored * procedures from, or "" to return procedures from all schemas. - * @param namePattern The pattern of procedures names to return. + * @param procedurePattern The pattern of procedure names to return. * @returns A ResultSet with all the requested procedures. * @exception SQLException If an error occurs. */ ResultSet getProcedures(String catalog, String schemaPattern, String - procedureNamePattern) throws SQLException; + procedurePattern) throws SQLException; /** * This method returns a list of the parameter and result columns for @@ -1436,13 +1445,13 @@ public interface DatabaseMetaData * or "" to return procedures from all catalogs. * @param schemaPattern A schema pattern for the schemas to return stored * procedures from, or "" to return procedures from all schemas. - * @param namePattern The pattern of procedures names to return. + * @param procedurePattern The pattern of procedures names to return. * @param columnPattern The pattern of column names to return. * @returns A ResultSet with all the requested procedures. * @exception SQLException If an error occurs. */ ResultSet getProcedureColumns(String catalog, String schemaPattern, - String procedureNamePattern, String columnNamePattern) throws + String procedurePattern, String columnPattern) throws SQLException; /** @@ -1462,13 +1471,13 @@ public interface DatabaseMetaData * or "" to return tables from all catalogs. * @param schemaPattern A schema pattern for the schemas to return tables * from, or "" to return tables from all schemas. - * @param namePattern The pattern of table names to return. + * @param tablePattern The pattern of table names to return. * @param types The list of table types to include; null returns all types. * @returns A ResultSet with all the requested tables. * @exception SQLException If an error occurs. */ ResultSet getTables(String catalog, String schemaPattern, String - tableNamePattern, String[] types) throws SQLException; + tablePattern, String[] types) throws SQLException; /** * This method returns the list of database schemas as a @@ -1536,13 +1545,13 @@ public interface DatabaseMetaData * or "" to return tables from all catalogs. * @param schemaPattern A schema pattern for the schemas to return * tables from, or "" to return tables from all schemas. - * @param namePattern The pattern of tables names to return. + * @param tablePattern The pattern of table names to return. * @param columnPattern The pattern of column names to return. * @returns A ResultSet with all the requested tables. * @exception SQLException If an error occurs. */ ResultSet getColumns(String catalog, String schemaPattern, String - tableNamePattern, String columnNamePattern) throws SQLException; + tablePattern, String columnPattern) throws SQLException; /** * This method returns the access rights that have been granted to the @@ -1568,13 +1577,13 @@ public interface DatabaseMetaData * to return information from all catalogs. * @param schema The schema to retrieve information from, or the empty string * to return entities not associated with a schema. - * @param table The table name to return information for. + * @param tableName The table name to return information for. * @param columnPattern A pattern of column names to return information for. * @return A ResultSet with all the requested privileges. * @exception SQLException If an error occurs. */ ResultSet getColumnPrivileges(String catalog, String schema, String - table, String columnNamePattern) throws SQLException; + tableName, String columnPattern) throws SQLException; /** * This method returns the access rights that have been granted to the @@ -1597,7 +1606,7 @@ public interface DatabaseMetaData * @param catalog The catalog to retrieve information from, or the empty string * to return entities not associated with a catalog, or null * to return information from all catalogs. - * @param schema The schema to retrieve information from, or the empty string + * @param schemaPattern The schema to retrieve information from, or the empty string * to return entities not associated with a schema. * @param tablePattern The table name pattern of tables to return * information for. @@ -1605,7 +1614,7 @@ public interface DatabaseMetaData * @exception SQLException If an error occurs. */ ResultSet getTablePrivileges(String catalog, String schemaPattern, - String tableNamePattern) throws SQLException; + String tablePattern) throws SQLException; /** * This method returns the best set of columns for uniquely identifying @@ -1634,8 +1643,7 @@ public interface DatabaseMetaData * to return information from all catalogs. * @param schema The schema to retrieve information from, or the empty string * to return entities not associated with a schema. - * @param table The table name to return information for. - * @param columnPattern A pattern of column names to return information for. + * @param tableName The table name to return information for. * @param scope One of the best row id scope constants from this class. * @param nullable true to include columns that are nullable, * false otherwise. @@ -1643,7 +1651,7 @@ public interface DatabaseMetaData * @exception SQLException If an error occurs. */ ResultSet getBestRowIdentifier(String catalog, String schema, - String table, int scope, boolean nullable) throws SQLException; + String tableName, int scope, boolean nullable) throws SQLException; /** * This method returns the set of columns that are automatically updated @@ -1670,13 +1678,12 @@ public interface DatabaseMetaData * to return information from all catalogs. * @param schema The schema to retrieve information from, or the empty string * to return entities not associated with a schema. - * @param table The table name to return information for. - * @param columnPattern A pattern of column names to return information for. + * @param tableName The table name to return information for * @return A ResultSet with the version columns. * @exception SQLException If an error occurs. */ ResultSet getVersionColumns(String catalog, String schema, - String table) throws SQLException; + String tableName) throws SQLException; /** * This method returns a list of a table's primary key columns. These @@ -1696,12 +1703,11 @@ public interface DatabaseMetaData * to return information from all catalogs. * @param schema The schema to retrieve information from, or the empty string * to return entities not associated with a schema. - * @param table The table name to return information for. - * @param columnPattern A pattern of column names to return information for. + * @param tableName The table name to return information for. * @return A ResultSet with the primary key columns. * @exception SQLException If an error occurs. */ - ResultSet getPrimaryKeys(String catalog, String schema, String table) + ResultSet getPrimaryKeys(String catalog, String schema, String tableName) throws SQLException; /** @@ -1740,14 +1746,12 @@ public interface DatabaseMetaData * to return information from all catalogs. * @param schema The schema to retrieve information from, or the empty string * to return entities not associated with a schema. - * @param table The table name to return information for. - * + * @param tableName The table name to return information for. * @return A ResultSet with the foreign key columns. - * * @exception SQLException If an error occurs. */ ResultSet getImportedKeys(String catalog, String schema, - String table) throws SQLException; + String tableName) throws SQLException; /** * This method returns a list of the table's which use this table's @@ -1786,12 +1790,12 @@ public interface DatabaseMetaData * to return information from all catalogs. * @param schema The schema to retrieve information from, or the empty string * to return entities not associated with a schema. - * @param table The table name to return information for. + * @param tableName The table name to return information for. * @return A ResultSet with the requested information * @exception SQLException If an error occurs. */ ResultSet getExportedKeys(String catalog, String schema, - String table) throws SQLException; + String tableName) throws SQLException; /** * This method returns a description of how one table imports another @@ -1825,26 +1829,30 @@ public interface DatabaseMetaData * importedKeyNotDeferrable). * * - * @param primCatalog The catalog to retrieve information from, or the empty string - * to return entities not associated with a catalog, or null - * to return information from all catalogs, on the exporting side. - * @param primSchema The schema to retrieve information from, or the empty string - * to return entities not associated with a schema, on the exporting side. - * @param primTable The table name to return information for, on the exporting - * side. - * @param forCatalog The catalog to retrieve information from, or the empty string - * to return entities not associated with a catalog, or null - * to return information from all catalogs, on the importing side. - * @param forSchema The schema to retrieve information from, or the empty string - * to return entities not associated with a schema on the importing side. - * @param forTable The table name to return information for on the importing - * side. + * @param primaryCatalog The catalog to retrieve information from, or the + * empty string to return entities not associated with a catalog, or + * null to return information from all catalogs, on the + * exporting side. + * @param primarySchema The schema to retrieve information from, or the empty + * string to return entities not associated with a schema, on the + * exporting side. + * @param primaryTableName The table name to return information for, on the + * exporting side. + * @param foreignCatalog The catalog to retrieve information from, or the + * empty string to return entities not associated with a catalog, + * or null to return information from all catalogs, on + * the importing side. + * @param foreignSchema The schema to retrieve information from, or the + * empty string to return entities not associated with a schema on + * the importing side. + * @param foreignTableName The table name to return information for on the + * importing side. * @return A ResultSet with the requested information * @exception SQLException If an error occurs. */ ResultSet getCrossReference(String primaryCatalog, String - primarySchema, String primaryTable, String foreignCatalog, String - foreignSchema, String foreignTable) throws SQLException; + primarySchema, String primaryTableName, String foreignCatalog, String + foreignSchema, String foreignTableName) throws SQLException; /** * This method returns a list of the SQL types supported by this @@ -1921,15 +1929,15 @@ public interface DatabaseMetaData * null to return information from all catalogs. * @param schema The schema to retrieve information from, or the empty string * to return entities not associated with a schema. - * @param table The table name to return information for. + * @param tableName The table name to return information for. * @param unique true to return only unique indexes, * false otherwise. - * @param approx true if data values can be approximations, + * @param approximate true if data values can be approximations, * false otherwise. * @return A ResultSet with the requested index information * @exception SQLException If an error occurs. */ - ResultSet getIndexInfo(String catalog, String schema, String table, + ResultSet getIndexInfo(String catalog, String schema, String tableName, boolean unique, boolean approximate) throws SQLException; /** @@ -1954,8 +1962,8 @@ public interface DatabaseMetaData * * @param type The desired result type, which is one of the constants * defined in ResultSet. - * @param concur The desired concurrency type, which is one of the constants - * defined in ResultSet. + * @param concurrency The desired concurrency type, which is one of the + * constants defined in ResultSet. * @return true if the result set type is supported, * false otherwise. * @exception SQLException If an error occurs. @@ -2108,8 +2116,8 @@ public interface DatabaseMetaData * @param catalog The catalog to retrieve information from, or the empty string * to return entities not associated with a catalog, or null * to return information from all catalogs. - * @param schema The schema to retrieve information from, or the empty string - * to return entities not associated with a schema. + * @param schemaPattern The schema to retrieve information from, or the + * empty string to return entities not associated with a schema. * @param typePattern The type name pattern to match. * @param types The type identifier patterns (from Types) to * match. @@ -2117,7 +2125,7 @@ public interface DatabaseMetaData * @exception SQLException If an error occurs. */ ResultSet getUDTs(String catalog, String schemaPattern, String - typeNamePattern, int[] types) throws SQLException; + typePattern, int[] types) throws SQLException; /** * This method returns the Connection object that was used @@ -2129,16 +2137,33 @@ public interface DatabaseMetaData Connection getConnection() throws SQLException; /** + * This method tests whether the databse supports savepoints. + * + * @return true if the database supports savepoints, + * false if it does not. + * @exception SQLException If an error occurs. + * @see Savepoint * @since 1.4 */ boolean supportsSavepoints() throws SQLException; /** + * This method tests whether the database supports named parameters. + * + * @return true if the database supports named parameters, + * false if it does not. + * @exception SQLException If an error occurs. * @since 1.4 */ boolean supportsNamedParameters() throws SQLException; /** + * This method tests whether the database supports returning multiple + * ResultSetS from a CallableStatement at once. + * + * @return true if the database supports returnig multiple + * results at once, false if it does not. + * @exception SQLException If an error occurs. * @since 1.4 */ boolean supportsMultipleOpenResults() throws SQLException; @@ -2152,47 +2177,78 @@ public interface DatabaseMetaData * @since 1.4 */ ResultSet getSuperTypes(String catalog, String schemaPattern, - String typeNamePattern) throws SQLException; + String typePattern) throws SQLException; /** * @since 1.4 */ ResultSet getSuperTables(String catalog, String schemaPattern, - String tableNamePattern) throws SQLException; + String tablePattern) throws SQLException; /** * @since 1.4 */ ResultSet getAttributes(String catalog, String schemaPattern, String - typeNamePattern, String attributeNamePattern) throws SQLException; + typePattern, String attributePattern) throws SQLException; /** + * This method tests if the database supports the specified holdability type. + * Valid values for this parameter are specified in the + * ResultSet class. + * + * @param holdability The holdability type to test. + * @return true if the database supports the holdability type, + * false if it does not. + * @exception SQLException If an error occurs. + * @see ResultSet * @since 1.4 */ boolean supportsResultSetHoldability(int holdability) throws SQLException; /** + * This method returns the default holdability type of ResultSetS + * retrieved from this database. The possible values are specified in the + * ResultSet class. + * + * @return The default holdability type. + * @exception SQLException If an error occurs. * @since 1.4 */ int getResultSetHoldability() throws SQLException; /** + * This method returns the major version number of the database. + * + * @return The major version number of the database. + * @exception SQLException If an error occurs. * @since 1.4 */ int getDatabaseMajorVersion() throws SQLException; /** + * This method returns the minor version number of the database. + * + * @return The minor version number of the database. + * @exception SQLException If an error occurs. * @since 1.4 */ int getDatabaseMinorVersion() throws SQLException; /** + * This method returns the major version number of the JDBC driver. + * + * @return The major version number of the JDBC driver. + * @exception SQLException If an error occurs. * @since 1.4 */ int getJDBCMajorVersion() throws SQLException; /** + * This method returns the minor version number of the JDBC driver. + * + * @return The minor version number of the database. + * @exception SQLException If an error occurs. * @since 1.4 */ int getJDBCMinorVersion() throws SQLException; -- cgit v1.2.1