java.sql.ResultSetMetaData, java.sql.Wrapperpublic class VirtuosoResultSetMetaData
extends java.lang.Object
implements java.sql.ResultSetMetaData
ResultSetMetaData metadata = resultset.getMetaData()
ResultSetMetaData,
VirtuosoResultSet.getMetaData()| Modifier and Type | Field | Description |
|---|---|---|
protected java.util.Hashtable<virtuoso.jdbc4.VirtuosoColumn,java.lang.Integer> |
hcolumns |
| Modifier | Constructor | Description |
|---|---|---|
protected |
VirtuosoResultSetMetaData(VirtuosoConnection conn,
java.lang.String[] columns,
int[] dtps) |
Constructs a new VirtuosoResultSetMetaData.
|
| Modifier and Type | Method | Description |
|---|---|---|
protected static java.lang.String |
_getColumnTypeName(int columnType) |
|
void |
close() |
Releases this ResultSetMetaData object's database and
JDBC resources immediately instead of new wait for
this to happen when it is automatically closed.
|
java.lang.String |
getCatalogName(int column) |
Gets a column table's catalog name.
|
java.lang.String |
getColumnClassName(int column) |
Returns the fully-qualified name of the Java class.
|
int |
getColumnCount() |
Returns the number of columns in the ResultSet.
|
int |
getColumnDisplaySize(int column) |
Indicates the column normal max width in chars.
|
protected int |
getColumnDtp(int column) |
|
java.lang.String |
getColumnLabel(int column) |
Gets the suggested column title for use in printouts and
displays.
|
java.lang.String |
getColumnName(int column) |
Gets a column name.
|
int |
getColumnType(int column) |
Retrieves a column SQL type.
|
java.lang.String |
getColumnTypeName(int column) |
Retrieves a column database-specific type name.
|
int |
getPrecision(int column) |
Gets a column number of decimal digits.
|
int |
getScale(int column) |
Gets a column number of digits to right of the decimal point.
|
java.lang.String |
getSchemaName(int column) |
Gets a column table's schema.
|
java.lang.String |
getTableName(int column) |
Gets a column table name.
|
boolean |
isAutoIncrement(int column) |
Indicates whether the column is automatically numbered, thus read-only.
|
boolean |
isCaseSensitive(int column) |
Indicates whether a column case matters.
|
boolean |
isCurrency(int column) |
Indicates whether the column is a cash value.
|
boolean |
isDefinitelyWritable(int column) |
Indicates whether a write on the column will definitely succeed.
|
int |
isNullable(int column) |
Indicates the nullability of values in the designated column.
|
boolean |
isReadOnly(int column) |
Indicates whether a column is definitely not writable.
|
boolean |
isSearchable(int column) |
Indicates whether the column can be used in a where clause.
|
boolean |
isSigned(int column) |
Indicates whether values in the column are signed numbers.
|
boolean |
isWrapperFor(java.lang.Class<?> iface) |
Returns true if this either implements the interface argument or is directly or indirectly a wrapper
for an object that does.
|
boolean |
isWritable(int column) |
Indicates whether it is possible for a write on the column to succeed.
|
protected boolean |
isXml(int column) |
|
void |
setColumnName(int column,
java.lang.String name) |
|
<T> T |
unwrap(java.lang.Class<T> iface) |
Returns an object that implements the given interface to allow access to
non-standard methods, or standard methods not exposed by the proxy.
|
protected java.util.Hashtable<virtuoso.jdbc4.VirtuosoColumn,java.lang.Integer> hcolumns
protected VirtuosoResultSetMetaData(VirtuosoConnection conn, java.lang.String[] columns, int[] dtps)
conn - The connectioncolumns - The column description in the DV format.dtps - The dataTypepublic int getColumnCount()
throws VirtuosoException
getColumnCount in interface java.sql.ResultSetMetaDataVirtuosoException - No errors returned (just an implementation question).ResultSetMetaData.getColumnCount()public boolean isAutoIncrement(int column)
throws VirtuosoException
isAutoIncrement in interface java.sql.ResultSetMetaDatacolumn - the first column is 1, the second is 2, ...VirtuosoException - If an internal error occurred.ResultSetMetaData.isAutoIncrement(int)public boolean isCaseSensitive(int column)
throws VirtuosoException
isCaseSensitive in interface java.sql.ResultSetMetaDatacolumn - the first column is 1, the second is 2, ...VirtuosoException - If an internal error occurred.ResultSetMetaData.isCaseSensitive(int)public boolean isSearchable(int column)
throws VirtuosoException
isSearchable in interface java.sql.ResultSetMetaDatacolumn - the first column is 1, the second is 2, ...VirtuosoException - If an internal error occurred.ResultSetMetaData.isSearchable(int)public boolean isCurrency(int column)
throws VirtuosoException
isCurrency in interface java.sql.ResultSetMetaDatacolumn - the first column is 1, the second is 2, ...VirtuosoException - If an internal error occurred.ResultSetMetaData.isCurrency(int)public int isNullable(int column)
throws VirtuosoException
isNullable in interface java.sql.ResultSetMetaDatacolumn - the first column is 1, the second is 2, ...VirtuosoException - If an internal error occurred.ResultSetMetaData.isNullable(int)public boolean isSigned(int column)
throws VirtuosoException
isSigned in interface java.sql.ResultSetMetaDatacolumn - the first column is 1, the second is 2, ...VirtuosoException - If an internal error occurred.ResultSetMetaData.isSigned(int)public int getColumnDisplaySize(int column)
throws VirtuosoException
getColumnDisplaySize in interface java.sql.ResultSetMetaDatacolumn - the first column is 1, the second is 2, ...VirtuosoException - If an internal error occurred.ResultSetMetaData.getColumnDisplaySize(int)public java.lang.String getColumnLabel(int column)
throws VirtuosoException
getColumnLabel in interface java.sql.ResultSetMetaDatacolumn - the first column is 1, the second is 2, ...VirtuosoException - If an internal error occurred.ResultSetMetaData.getColumnLabel(int)public java.lang.String getColumnName(int column)
throws VirtuosoException
getColumnName in interface java.sql.ResultSetMetaDatacolumn - the first column is 1, the second is 2, ...VirtuosoException - If an internal error occurred.ResultSetMetaData.getColumnName(int)public void setColumnName(int column,
java.lang.String name)
throws VirtuosoException
VirtuosoExceptionpublic int getPrecision(int column)
throws VirtuosoException
getPrecision in interface java.sql.ResultSetMetaDatacolumn - the first column is 1, the second is 2, ...VirtuosoException - If an internal error occurred.ResultSetMetaData.getPrecision(int)public int getScale(int column)
throws VirtuosoException
getScale in interface java.sql.ResultSetMetaDatacolumn - the first column is 1, the second is 2, ...VirtuosoException - If an internal error occurred.ResultSetMetaData.getScale(int)public int getColumnType(int column)
throws VirtuosoException
getColumnType in interface java.sql.ResultSetMetaDatacolumn - the first column is 1, the second is 2, ...VirtuosoException - If an internal error occurred.ResultSetMetaData.getColumnType(int),
Typespublic java.lang.String getColumnTypeName(int column)
throws VirtuosoException
getColumnTypeName in interface java.sql.ResultSetMetaDatacolumn - the first column is 1, the second is 2, ...VirtuosoException - If an internal error occurred.ResultSetMetaData.getColumnTypeName(int)protected static java.lang.String _getColumnTypeName(int columnType)
throws VirtuosoException
VirtuosoExceptionpublic boolean isReadOnly(int column)
throws VirtuosoException
isReadOnly in interface java.sql.ResultSetMetaDatacolumn - the first column is 1, the second is 2, ...VirtuosoException - If an internal error occurred.ResultSetMetaData.isReadOnly(int)public boolean isWritable(int column)
throws VirtuosoException
isWritable in interface java.sql.ResultSetMetaDatacolumn - the first column is 1, the second is 2, ...VirtuosoException - If an internal error occurred.ResultSetMetaData.isWritable(int)public boolean isDefinitelyWritable(int column)
throws VirtuosoException
isDefinitelyWritable in interface java.sql.ResultSetMetaDatacolumn - the first column is 1, the second is 2, ...VirtuosoException - If an internal error occurred.ResultSetMetaData.isDefinitelyWritable(int)public java.lang.String getColumnClassName(int column)
throws VirtuosoException
getColumnClassName in interface java.sql.ResultSetMetaDatacolumn - the first column is 1, the second is 2, ...VirtuosoException - If an internal error occurred.ResultSetMetaData.getColumnClassName(int)public java.lang.String getSchemaName(int column)
throws VirtuosoException
getSchemaName in interface java.sql.ResultSetMetaDatacolumn - the first column is 1, the second is 2, ...VirtuosoException - if a database access error occurspublic java.lang.String getTableName(int column)
throws VirtuosoException
getTableName in interface java.sql.ResultSetMetaDatacolumn - the first column is 1, the second is 2, ...VirtuosoException - if a database access error occurspublic java.lang.String getCatalogName(int column)
throws VirtuosoException
getCatalogName in interface java.sql.ResultSetMetaDatacolumn - the first column is 1, the second is 2, ...VirtuosoException - if a database access error occurspublic void close()
throws VirtuosoException
VirtuosoException - An internal error occurred.protected int getColumnDtp(int column)
protected boolean isXml(int column)
public <T> T unwrap(java.lang.Class<T> iface)
throws java.sql.SQLException
unwrap recursively on the wrapped object
or a proxy for that result. If the receiver is not a
wrapper and does not implement the interface, then an SQLException is thrown.unwrap in interface java.sql.Wrapperiface - A Class defining an interface that the result must implement.java.sql.SQLException - If no object found that implements the interfacepublic boolean isWrapperFor(java.lang.Class<?> iface)
throws java.sql.SQLException
isWrapperFor on the wrapped
object. If this does not implement the interface and is not a wrapper, return false.
This method should be implemented as a low-cost operation compared to unwrap so that
callers can use this method to avoid expensive unwrap calls that may fail. If this method
returns true then calling unwrap with the same argument should succeed.isWrapperFor in interface java.sql.Wrapperiface - a Class defining an interface.java.sql.SQLException - if an error occurs while determining whether this is a wrapper
for an object with the given interface.