public class JcrResultSetMetaData extends Object implements ResultSetMetaData
ResultSetMetaData implementation that obtains the metadata information from the JCR query result and
(where possible) the column's corresponding property definitions.columnNoNulls, columnNullable, columnNullableUnknown| Modifier | Constructor and Description |
|---|---|
protected |
JcrResultSetMetaData(JcrConnection connection,
QueryResult results) |
| Modifier and Type | Method and Description |
|---|---|
String |
getCatalogName(int column)
All columns come from the same repository (i.e., catalog).
|
String |
getColumnClassName(int column) |
int |
getColumnCount() |
int |
getColumnDisplaySize(int column)
This method returns the nominal display size based upon the column's type.
|
String |
getColumnLabel(int column) |
String |
getColumnName(int column) |
int |
getColumnType(int column) |
String |
getColumnTypeName(int column) |
int |
getPrecision(int column)
This method always returns the nominal display size for the type.
|
int |
getScale(int column)
This method returns the number of digits behind the decimal point, which is assumed to be 3 if the type is
PropertyType.DOUBLE or 0 otherwise. |
String |
getSchemaName(int column)
This method always returns the workspace name.
|
String |
getTableName(int column) |
boolean |
isAutoIncrement(int column)
This method always returns false, since this JCR property types don't represent auto-incremented values.
|
boolean |
isCaseSensitive(int column) |
boolean |
isCurrency(int column)
This method always returns false, since no JCR property types (directly) represent currency.
|
boolean |
isDefinitelyWritable(int column)
This method always returns false, since this JDBC driver does not support writes.
|
int |
isNullable(int column) |
boolean |
isReadOnly(int column)
Even though the value may be writable in the JCR repository, this JDBC driver does not support writes.
|
boolean |
isSearchable(int column)
In JCR-SQL2, every property can be used in a WHERE clause.
|
boolean |
isSigned(int column)
This method returns true if the column is a
PropertyType.DOUBLE, PropertyType.LONG or
PropertyType.DATE. |
boolean |
isWrapperFor(Class<?> iface) |
boolean |
isWritable(int column)
Even though the value may be writable in the JCR repository, this JDBC driver does not support writes.
|
<T> T |
unwrap(Class<T> iface) |
protected JcrResultSetMetaData(JcrConnection connection, QueryResult results)
public String getCatalogName(int column)
All columns come from the same repository (i.e., catalog).
getCatalogName in interface ResultSetMetaDataResultSetMetaData.getCatalogName(int)public String getColumnClassName(int column)
getColumnClassName in interface ResultSetMetaDatapublic int getColumnCount()
throws SQLException
getColumnCount in interface ResultSetMetaDataSQLExceptionpublic int getColumnDisplaySize(int column)
This method returns the nominal display size based upon the column's type. Therefore, the value may not reflect the optimal display size for any given value.
getColumnDisplaySize in interface ResultSetMetaDataResultSetMetaData.getColumnDisplaySize(int)public String getColumnLabel(int column) throws SQLException
getColumnLabel in interface ResultSetMetaDataSQLExceptionpublic String getColumnName(int column) throws SQLException
getColumnName in interface ResultSetMetaDataSQLExceptionpublic int getColumnType(int column)
getColumnType in interface ResultSetMetaDatapublic String getColumnTypeName(int column)
getColumnTypeName in interface ResultSetMetaDatapublic int getPrecision(int column)
This method always returns the nominal display size for the type.
getPrecision in interface ResultSetMetaDataResultSetMetaData.getPrecision(int)public int getScale(int column)
This method returns the number of digits behind the decimal point, which is assumed to be 3 if the type is
PropertyType.DOUBLE or 0 otherwise.
getScale in interface ResultSetMetaDataResultSetMetaData.getScale(int)public String getSchemaName(int column)
This method always returns the workspace name.
getSchemaName in interface ResultSetMetaDataResultSetMetaData.getSchemaName(int)public String getTableName(int column) throws SQLException
getTableName in interface ResultSetMetaDataSQLExceptionpublic boolean isAutoIncrement(int column)
This method always returns false, since this JCR property types don't represent auto-incremented values.
isAutoIncrement in interface ResultSetMetaDataResultSetMetaData.isAutoIncrement(int)public boolean isCaseSensitive(int column)
isCaseSensitive in interface ResultSetMetaDatapublic boolean isCurrency(int column)
This method always returns false, since no JCR property types (directly) represent currency.
isCurrency in interface ResultSetMetaDataResultSetMetaData.isCurrency(int)public boolean isDefinitelyWritable(int column)
This method always returns false, since this JDBC driver does not support writes.
isDefinitelyWritable in interface ResultSetMetaDataResultSetMetaData.isDefinitelyWritable(int)public int isNullable(int column)
throws SQLException
isNullable in interface ResultSetMetaDataSQLExceptionpublic boolean isReadOnly(int column)
Even though the value may be writable in the JCR repository, this JDBC driver does not support writes. Therefore, this method always returns true.
isReadOnly in interface ResultSetMetaDataResultSetMetaData.isReadOnly(int)public boolean isSearchable(int column)
In JCR-SQL2, every property can be used in a WHERE clause. Therefore, this method always returns true.
isSearchable in interface ResultSetMetaDataResultSetMetaData.isSearchable(int)public boolean isSigned(int column)
This method returns true if the column is a PropertyType.DOUBLE, PropertyType.LONG or
PropertyType.DATE.
isSigned in interface ResultSetMetaDataResultSetMetaData.isSigned(int)public boolean isWritable(int column)
Even though the value may be writable in the JCR repository, this JDBC driver does not support writes. Therefore, this method always returns false.
isWritable in interface ResultSetMetaDataResultSetMetaData.isWritable(int)public boolean isWrapperFor(Class<?> iface)
isWrapperFor in interface Wrapperpublic <T> T unwrap(Class<T> iface) throws SQLException
unwrap in interface WrapperSQLExceptionCopyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.