| java.lang.Object org.geotools.metadata.sql.MetadataResult
MetadataResult | final class MetadataResult (Code) | | The result of a query for metadata attributes. This object
once for ever for a given table. When a particular record in this
table is fetched, the
ResultSet is automatically constructed. If many attributes
are fetched consecutivly for the same record, then the same
ResultSet is reused.
version: $Id: MetadataResult.java 27862 2007-11-12 19:51:19Z desruisseaux $ author: Martin Desruisseaux since: 2.1 |
Constructor Summary | |
public | MetadataResult(Connection connection, String query, String tableName) Constructs a metadata result from the specified connection.
Parameters: connection - The connection to the database. Parameters: query - The SQL query. |
Method Summary | |
public void | close() Close this statement and free all resources. | public Object | getArray(String identifier, String columnName) Returns the attribute value in the given column for the given record.
Parameters: identifier - The object identifier, usually the primary key value. Parameters: columnName - The column name of the attribute to search. | public int | getInt(String identifier, String columnName) Returns the attribute value in the given column for the given record.
Parameters: identifier - The object identifier, usually the primary key value. Parameters: columnName - The column name of the attribute to search. | public Object | getObject(String identifier, String columnName) Returns the attribute value in the given column for the given record.
Parameters: identifier - The object identifier, usually the primary key value. Parameters: columnName - The column name of the attribute to search. | public String | getString(String identifier, String columnName) Returns the attribute value in the given column for the given record.
Parameters: identifier - The object identifier, usually the primary key value. Parameters: columnName - The column name of the attribute to search. | public String | getString(String code) Returns the string value in the first column of the given record.
This is used for fetching the name of a code list element.
Parameters: code - The object identifier, usually the primary key value. | public boolean | wasNull() Returns
true if the last value returned by a
getFoo method was null. |
MetadataResult | public MetadataResult(Connection connection, String query, String tableName) throws SQLException(Code) | | Constructs a metadata result from the specified connection.
Parameters: connection - The connection to the database. Parameters: query - The SQL query. The first question mark will be replacedby the table name. Parameters: tableName - The table name. throws: SQLException - if the statement can't be created. |
close | public void close() throws SQLException(Code) | | Close this statement and free all resources.
After this method has been invoked, this object can't be used anymore.
throws: SQLException - if an SQL operation failed. |
getArray | public Object getArray(String identifier, String columnName) throws SQLException(Code) | | Returns the attribute value in the given column for the given record.
Parameters: identifier - The object identifier, usually the primary key value. Parameters: columnName - The column name of the attribute to search. The attribute value. throws: SQLException - if an SQL operation failed. |
getInt | public int getInt(String identifier, String columnName) throws SQLException(Code) | | Returns the attribute value in the given column for the given record.
Parameters: identifier - The object identifier, usually the primary key value. Parameters: columnName - The column name of the attribute to search. The attribute value. throws: SQLException - if an SQL operation failed. |
getObject | public Object getObject(String identifier, String columnName) throws SQLException(Code) | | Returns the attribute value in the given column for the given record.
Parameters: identifier - The object identifier, usually the primary key value. Parameters: columnName - The column name of the attribute to search. The attribute value. throws: SQLException - if an SQL operation failed. |
getString | public String getString(String identifier, String columnName) throws SQLException(Code) | | Returns the attribute value in the given column for the given record.
Parameters: identifier - The object identifier, usually the primary key value. Parameters: columnName - The column name of the attribute to search. The attribute value. throws: SQLException - if an SQL operation failed. |
getString | public String getString(String code) throws SQLException(Code) | | Returns the string value in the first column of the given record.
This is used for fetching the name of a code list element.
Parameters: code - The object identifier, usually the primary key value. The string value found in the first column. throws: SQLException - if an SQL operation failed. |
wasNull | public boolean wasNull() throws SQLException(Code) | | Returns
true if the last value returned by a
getFoo method was null.
|
|
|