public final class MetadataResultSet extends Object implements AutoCloseable
| Constructor and Description |
|---|
MetadataResultSet(Query query,
Statement statement,
Map<String,InclusionRule> limitMap) |
MetadataResultSet(ResultSet resultSet,
String description) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Releases this
ResultSet object's database and JDBC resources immediately instead
of waiting for this to happen when it is automatically closed. |
Map<String,Object> |
getAttributes()
Gets unread (and therefore unmapped) columns from the database metadata result-set, and makes
them available as additional attributes.
|
BigInteger |
getBigInteger(String columnName) |
boolean |
getBoolean(String columnName)
Checks if the value of a column from the result set evaluates to true.
|
String[] |
getColumnNames() |
<E extends Enum<E>> |
getEnum(String columnName,
E defaultValue)
Reads the value of a column from the result set as an enum.
|
<E extends Enum<E> & IdentifiedEnum> |
getEnumFromId(String columnName,
E defaultValue)
Reads the value of a column from the result set as an enum.
|
<E extends Enum<E> & IdentifiedEnum> |
getEnumFromShortId(String columnName,
E defaultValue)
Reads the value of a column from the result set as an enum.
|
int |
getInt(String columnName,
int defaultValue)
Reads the value of a column from the result set as an integer.
|
long |
getLong(String columnName,
long defaultValue)
Reads the value of a column from the result set as a long.
|
short |
getShort(String columnName,
short defaultValue)
Reads the value of a column from the result set as a short.
|
String |
getString(String columnName)
Reads the value of a column from the result set as a string.
|
boolean |
next()
Moves the cursor down one row from its current position.
|
List<Object> |
row() |
void |
setShowLobs(boolean showLobs) |
public MetadataResultSet(Query query, Statement statement, Map<String,InclusionRule> limitMap) throws SQLException
SQLExceptionpublic MetadataResultSet(ResultSet resultSet, String description) throws SQLException
SQLExceptionpublic void close()
throws SQLException
ResultSet object's database and JDBC resources immediately instead
of waiting for this to happen when it is automatically closed.close in interface AutoCloseableSQLException - On an exceptionpublic Map<String,Object> getAttributes()
public BigInteger getBigInteger(String columnName)
public boolean getBoolean(String columnName)
columnName - Column name to checkpublic String[] getColumnNames()
public <E extends Enum<E>> E getEnum(String columnName, E defaultValue)
columnName - Column namedefaultValue - Default enum value to returnpublic <E extends Enum<E> & IdentifiedEnum> E getEnumFromId(String columnName, E defaultValue)
columnName - Column namedefaultValue - Default enum value to returnpublic <E extends Enum<E> & IdentifiedEnum> E getEnumFromShortId(String columnName, E defaultValue)
columnName - Column namedefaultValue - Default enum value to returnpublic int getInt(String columnName, int defaultValue)
columnName - Column namedefaultValue - Default valuepublic long getLong(String columnName, long defaultValue)
columnName - Column namedefaultValue - Default valuepublic short getShort(String columnName, short defaultValue)
columnName - Column namedefaultValue - Default valuepublic String getString(String columnName)
columnName - Column namepublic boolean next()
throws SQLException
ResultSet cursor is
initially positioned before the first row; the first call to the method next makes
the first row the current row; the second call makes the second row the current row, and so on.true if the new current row is valid; false if there are no
more rowsSQLException - On a database access errorpublic List<Object> row() throws SQLException
SQLExceptionpublic void setShowLobs(boolean showLobs)
Copyright © 2000-2024 Sualeh Fatehi. All rights reserved.