Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.modeshape.jdbc
Class JcrResultSetMetaData

    java.lang.Object
      org.modeshape.jdbc.JcrResultSetMetaData

All Implemented Interfaces:
  ResultSetMetaData, Wrapper

    public class JcrResultSetMetaData

extends Object
implements ResultSetMetaData

This driver's `ResultSetMetaData` implementation that obtains the metadata information from the JCR query result and (where possible) the column's corresponding property definitions.

Field Summary

Fields inherited from interface java.sql.ResultSetMetaData
`columnNoNulls, columnNullable, columnNullableUnknown`

Constructor Summary
`protected` | `JcrResultSetMetaData(JcrConnection connection, QueryResult results)`

Method Summary
`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)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### JcrResultSetMetaData

    protected JcrResultSetMetaData(JcrConnection connection,
                                   QueryResult results)

Method Detail

### getCatalogName

    public String getCatalogName(int column)

  All columns come from the same repository (i.e., catalog).

  Specified by:
    `getCatalogName` in interface `ResultSetMetaData`
  See Also:
    `ResultSetMetaData.getCatalogName(int)`

### getColumnClassName

    public String getColumnClassName(int column)

  Specified by:
    `getColumnClassName` in interface `ResultSetMetaData`
  See Also:
    `ResultSetMetaData.getColumnClassName(int)`

### getColumnCount

    public int getColumnCount()
                       throws SQLException

  Specified by:
    `getColumnCount` in interface `ResultSetMetaData`
  Throws:
    `SQLException`
  See Also:
    `ResultSetMetaData.getColumnCount()`

### getColumnDisplaySize

    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.

  Specified by:
    `getColumnDisplaySize` in interface `ResultSetMetaData`
  See Also:
    `ResultSetMetaData.getColumnDisplaySize(int)`

### getColumnLabel

    public String getColumnLabel(int column)
                          throws SQLException

  Specified by:
    `getColumnLabel` in interface `ResultSetMetaData`
  Throws:
    `SQLException`
  See Also:
    `ResultSetMetaData.getColumnLabel(int)`

### getColumnName

    public String getColumnName(int column)
                         throws SQLException

  Specified by:
    `getColumnName` in interface `ResultSetMetaData`
  Throws:
    `SQLException`
  See Also:
    `ResultSetMetaData.getColumnName(int)`

### getColumnType

    public int getColumnType(int column)

  Specified by:
    `getColumnType` in interface `ResultSetMetaData`
  See Also:
    `ResultSetMetaData.getColumnType(int)`

### getColumnTypeName

    public String getColumnTypeName(int column)

  Specified by:
    `getColumnTypeName` in interface `ResultSetMetaData`
  See Also:
    `ResultSetMetaData.getColumnTypeName(int)`

### getPrecision

    public int getPrecision(int column)

  This method always returns the nominal display size for the type.

  Specified by:
    `getPrecision` in interface `ResultSetMetaData`
  See Also:
    `ResultSetMetaData.getPrecision(int)`

### getScale

    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.

  Specified by:
    `getScale` in interface `ResultSetMetaData`
  See Also:
    `ResultSetMetaData.getScale(int)`

### getSchemaName

    public String getSchemaName(int column)

  This method always returns the workspace name.

  Specified by:
    `getSchemaName` in interface `ResultSetMetaData`
  See Also:
    `ResultSetMetaData.getSchemaName(int)`

### getTableName

    public String getTableName(int column)
                        throws SQLException

  Specified by:
    `getTableName` in interface `ResultSetMetaData`
  Throws:
    `SQLException`
  See Also:
    `ResultSetMetaData.getTableName(int)`

### isAutoIncrement

    public boolean isAutoIncrement(int column)

  This method always returns false, since this JCR property types don't represent auto-incremented values.

  Specified by:
    `isAutoIncrement` in interface `ResultSetMetaData`
  See Also:
    `ResultSetMetaData.isAutoIncrement(int)`

### isCaseSensitive

    public boolean isCaseSensitive(int column)

  Specified by:
    `isCaseSensitive` in interface `ResultSetMetaData`
  See Also:
    `ResultSetMetaData.isCaseSensitive(int)`

### isCurrency

    public boolean isCurrency(int column)

  This method always returns false, since no JCR property types (directly) represent currency.

  Specified by:
    `isCurrency` in interface `ResultSetMetaData`
  See Also:
    `ResultSetMetaData.isCurrency(int)`

### isDefinitelyWritable

    public boolean isDefinitelyWritable(int column)

  This method always returns false, since this JDBC driver does not support writes.

  Specified by:
    `isDefinitelyWritable` in interface `ResultSetMetaData`
  See Also:
    `ResultSetMetaData.isDefinitelyWritable(int)`

### isNullable

    public int isNullable(int column)
                   throws SQLException

  Specified by:
    `isNullable` in interface `ResultSetMetaData`
  Throws:
    `SQLException`
  See Also:
    `ResultSetMetaData.isNullable(int)`

### isReadOnly

    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.

  Specified by:
    `isReadOnly` in interface `ResultSetMetaData`
  See Also:
    `ResultSetMetaData.isReadOnly(int)`

### isSearchable

    public boolean isSearchable(int column)

  In JCR-SQL2, every property can be used in a WHERE clause. Therefore, this method always returns true.

  Specified by:
    `isSearchable` in interface `ResultSetMetaData`
  See Also:
    `ResultSetMetaData.isSearchable(int)`

### isSigned

    public boolean isSigned(int column)

  This method returns true if the column is a `PropertyType.DOUBLE`, `PropertyType.LONG` or `PropertyType.DATE`.

  Specified by:
    `isSigned` in interface `ResultSetMetaData`
  See Also:
    `ResultSetMetaData.isSigned(int)`

### isWritable

    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.

  Specified by:
    `isWritable` in interface `ResultSetMetaData`
  See Also:
    `ResultSetMetaData.isWritable(int)`

### isWrapperFor

    public boolean isWrapperFor(Class<?> iface)

  Specified by:
    `isWrapperFor` in interface `Wrapper`
  See Also:
    `Wrapper.isWrapperFor(java.lang.Class)`

### unwrap

    public <T> T unwrap(Class<T> iface)
             throws SQLException

  Specified by:
    `unwrap` in interface `Wrapper`
  Throws:
    `SQLException`
  See Also:
    `Wrapper.unwrap(java.lang.Class)`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2008-2012 JBoss, a division of Red Hat. All Rights Reserved.