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 ResultSetMetaData
ResultSetMetaData.getCatalogName(int)
public String getColumnClassName(int column)
getColumnClassName
in interface ResultSetMetaData
public int getColumnCount() throws SQLException
getColumnCount
in interface ResultSetMetaData
SQLException
public 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 ResultSetMetaData
ResultSetMetaData.getColumnDisplaySize(int)
public String getColumnLabel(int column) throws SQLException
getColumnLabel
in interface ResultSetMetaData
SQLException
public String getColumnName(int column) throws SQLException
getColumnName
in interface ResultSetMetaData
SQLException
public int getColumnType(int column)
getColumnType
in interface ResultSetMetaData
public String getColumnTypeName(int column)
getColumnTypeName
in interface ResultSetMetaData
public int getPrecision(int column)
This method always returns the nominal display size for the type.
getPrecision
in interface ResultSetMetaData
ResultSetMetaData.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 ResultSetMetaData
ResultSetMetaData.getScale(int)
public String getSchemaName(int column)
This method always returns the workspace name.
getSchemaName
in interface ResultSetMetaData
ResultSetMetaData.getSchemaName(int)
public String getTableName(int column) throws SQLException
getTableName
in interface ResultSetMetaData
SQLException
public boolean isAutoIncrement(int column)
This method always returns false, since this JCR property types don't represent auto-incremented values.
isAutoIncrement
in interface ResultSetMetaData
ResultSetMetaData.isAutoIncrement(int)
public boolean isCaseSensitive(int column)
isCaseSensitive
in interface ResultSetMetaData
public boolean isCurrency(int column)
This method always returns false, since no JCR property types (directly) represent currency.
isCurrency
in interface ResultSetMetaData
ResultSetMetaData.isCurrency(int)
public boolean isDefinitelyWritable(int column)
This method always returns false, since this JDBC driver does not support writes.
isDefinitelyWritable
in interface ResultSetMetaData
ResultSetMetaData.isDefinitelyWritable(int)
public int isNullable(int column) throws SQLException
isNullable
in interface ResultSetMetaData
SQLException
public 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 ResultSetMetaData
ResultSetMetaData.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 ResultSetMetaData
ResultSetMetaData.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 ResultSetMetaData
ResultSetMetaData.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 ResultSetMetaData
ResultSetMetaData.isWritable(int)
public boolean isWrapperFor(Class<?> iface)
isWrapperFor
in interface Wrapper
public <T> T unwrap(Class<T> iface) throws SQLException
unwrap
in interface Wrapper
SQLException
Copyright © 2008–2016 JBoss, a division of Red Hat. All rights reserved.