com.amazon.carbonado.repo.jdbc
Interface JDBCStorableProperty<S extends Storable>

All Superinterfaces:
Appender, Serializable, StorableProperty<S>

public interface JDBCStorableProperty<S extends Storable>
extends StorableProperty<S>

Contains all the metadata describing a property of a specific Storable type as needed by JDBCRepository.

Author:
Brian S O'Neill
See Also:
JDBCStorableIntrospector

Method Summary
 StorablePropertyAdapter getAppliedAdapter()
          Returns the adapter that needs to be applied to properties returned from ResultSets and set into PreparedStatements.
 Integer getCharOctetLength()
          Returns the maximum amount of bytes for property value.
 String getColumnName()
          Returns the table column for this property.
 Integer getColumnSize()
          The column size is either the maximum number of characters or the numeric precision.
 Integer getDataType()
          Returns the data type as defined by Types.
 String getDataTypeName()
          Returns the data type name.
 Integer getDecimalDigits()
          Returns the amount of fractional decimal digits.
 JDBCStorableProperty<?> getExternalJoinElement(int index)
          Returns a specific property in the joined class that participates in the join.
 JDBCStorableProperty<?>[] getExternalJoinElements()
          Returns a new array with all the external join elements in it.
 JDBCStorableProperty<S> getInternalJoinElement(int index)
          Returns a specific property in this property's class that participates in the join.
 JDBCStorableProperty<S>[] getInternalJoinElements()
          Returns a new array with all the internal join elements in it.
 Integer getOrdinalPosition()
          Returns the one-based index of the column in the table.
 Method getPreparedStatementSetMethod()
          Returns the method to use to set this property (by index) into a PreparedStatement.
 Method getResultSetGetMethod()
          Returns the method to use to access this property (by index) from a ResultSet.
 boolean isAutoIncrement()
          Returns true if property is declared as @Automatic and column is designated as auto-increment.
 boolean isColumnNullable()
           
 boolean isSelectable()
          Returns true if property is both supported and not a join.
 boolean isSupported()
          Returns false only if property is independent and no matching column was found.
 
Methods inherited from interface com.amazon.carbonado.info.StorableProperty
getAdapter, getAlias, getAliasCount, getAliases, getBeanName, getConstraint, getConstraintCount, getConstraints, getCovariantTypes, getDerivedFromProperties, getDerivedToProperties, getEnclosingType, getJoinedType, getJoinElementCount, getName, getNumber, getReadMethod, getReadMethodName, getSequenceName, getType, getWriteMethod, getWriteMethodName, isAlternateKeyMember, isAutomatic, isDerived, isIndependent, isJoin, isNullable, isOneToOneJoin, isPrimaryKeyMember, isQuery, isVersion, shouldCopyDerived, toString
 
Methods inherited from interface com.amazon.carbonado.util.Appender
appendTo
 

Method Detail

isSupported

boolean isSupported()
Returns false only if property is independent and no matching column was found.


isSelectable

boolean isSelectable()
Returns true if property is both supported and not a join. Simply put, it can appear in a select statement.


isAutoIncrement

boolean isAutoIncrement()
Returns true if property is declared as @Automatic and column is designated as auto-increment.

Since:
1.2

getColumnName

String getColumnName()
Returns the table column for this property.

Returns:
null if property is unsupported

getDataType

Integer getDataType()
Returns the data type as defined by Types.

Returns:
null if property is unsupported

getDataTypeName

String getDataTypeName()
Returns the data type name.

Returns:
null if property is unsupported

isColumnNullable

boolean isColumnNullable()
Returns:
true if column is nullable
Since:
1.2

getResultSetGetMethod

Method getResultSetGetMethod()
Returns the method to use to access this property (by index) from a ResultSet.

Returns:
null if property is unsupported

getPreparedStatementSetMethod

Method getPreparedStatementSetMethod()
Returns the method to use to set this property (by index) into a PreparedStatement.

Returns:
null if property is unsupported

getAppliedAdapter

StorablePropertyAdapter getAppliedAdapter()
Returns the adapter that needs to be applied to properties returned from ResultSets and set into PreparedStatements. Is null if not needed.

Returns:
null if property is unsupported or if adapter not needed.

getColumnSize

Integer getColumnSize()
The column size is either the maximum number of characters or the numeric precision.

Returns:
null if property is unsupported

getDecimalDigits

Integer getDecimalDigits()
Returns the amount of fractional decimal digits.

Returns:
null if property is unsupported

getCharOctetLength

Integer getCharOctetLength()
Returns the maximum amount of bytes for property value.

Returns:
null if property is unsupported

getOrdinalPosition

Integer getOrdinalPosition()
Returns the one-based index of the column in the table.

Returns:
null if property is unsupported

getInternalJoinElement

JDBCStorableProperty<S> getInternalJoinElement(int index)
Description copied from interface: StorableProperty
Returns a specific property in this property's class that participates in the join.

Specified by:
getInternalJoinElement in interface StorableProperty<S extends Storable>

getInternalJoinElements

JDBCStorableProperty<S>[] getInternalJoinElements()
Description copied from interface: StorableProperty
Returns a new array with all the internal join elements in it.

Specified by:
getInternalJoinElements in interface StorableProperty<S extends Storable>

getExternalJoinElement

JDBCStorableProperty<?> getExternalJoinElement(int index)
Description copied from interface: StorableProperty
Returns a specific property in the joined class that participates in the join.

Specified by:
getExternalJoinElement in interface StorableProperty<S extends Storable>

getExternalJoinElements

JDBCStorableProperty<?>[] getExternalJoinElements()
Description copied from interface: StorableProperty
Returns a new array with all the external join elements in it.

Specified by:
getExternalJoinElements in interface StorableProperty<S extends Storable>


Copyright © 2006-2009 Amazon Technologies, Inc.. All Rights Reserved.