Interface ColumnMapping
-
- All Known Implementing Classes:
AbstractColumnMapping,AbstractLargeBinaryColumnMapping,ArrayColumnMapping,BigIntColumnMapping,BinaryColumnMapping,BinaryStreamColumnMapping,BitColumnMapping,BlobColumnMapping,BooleanColumnMapping,CharColumnMapping,ClobColumnMapping,DateColumnMapping,DB2DatalinkColumnMapping,DecimalColumnMapping,DoubleColumnMapping,FloatColumnMapping,IntegerColumnMapping,LongVarBinaryColumnMapping,LongVarcharColumnMapping,NCharColumnMapping,NumericColumnMapping,NVarcharColumnMapping,OtherColumnMapping,RealColumnMapping,SmallIntColumnMapping,SqlXmlColumnMapping,TimeColumnMapping,TimestampColumnMapping,TimesTenVarBinaryColumnMapping,TinyIntColumnMapping,VarBinaryColumnMapping,VarCharColumnMapping
public interface ColumnMappingRepresentation of the mapping of a column.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleangetBoolean(java.sql.ResultSet resultSet, int exprIndex)Obtains a value fromresultSetat position specified byexprIndex.bytegetByte(java.sql.ResultSet resultSet, int exprIndex)Obtains a value fromresultSetat position specified byexprIndex.chargetChar(java.sql.ResultSet resultSet, int exprIndex)Obtains a value fromresultSetat position specified byexprIndex.ColumngetColumn()Accessor for the column that this represents.doublegetDouble(java.sql.ResultSet resultSet, int exprIndex)Obtains a value fromresultSetat position specified byexprIndex.floatgetFloat(java.sql.ResultSet resultSet, int exprIndex)Obtains a value fromresultSetat position specified byexprIndex.java.lang.StringgetInsertionInputParameter()Accessor for the string to put in any retrieval datastore statement for this field.intgetInt(java.sql.ResultSet resultSet, int exprIndex)Obtains a value fromresultSetat position specified byexprIndex.JavaTypeMappinggetJavaTypeMapping()The mapping for the java type that this column mapping is used by.longgetLong(java.sql.ResultSet resultSet, int exprIndex)Obtains a value fromresultSetat position specified byexprIndex.java.lang.ObjectgetObject(java.sql.ResultSet resultSet, int exprIndex)Obtains a value fromresultSetat position specified byexprIndex.shortgetShort(java.sql.ResultSet resultSet, int exprIndex)Obtains a value fromresultSetat position specified byexprIndex.java.lang.StringgetString(java.sql.ResultSet resultSet, int exprIndex)Obtains a value fromresultSetat position specified byexprIndex.java.lang.StringgetUpdateInputParameter()Accessor for the string to put in any update datastore statements for this field.booleaninsertValuesOnInsert()Accessor for whether this mapping requires values inserting on an INSERT.booleanisBitBased()Accessor for whether the mapping is bit-based.booleanisBooleanBased()Accessor for whether the mapping is boolean-based.booleanisDecimalBased()Accessor for whether the mapping is decimal-based.booleanisIntegerBased()Accessor for whether the mapping is integer-based.booleanisNullable()Whether the column is nullable.booleanisStringBased()Accessor for whether the mapping is string-based.voidsetBoolean(java.sql.PreparedStatement ps, int paramIndex, boolean value)Sets avalueintopsat position specified byparamIndex.voidsetByte(java.sql.PreparedStatement ps, int paramIndex, byte value)Sets avalueintopsat position specified byparamIndex.voidsetChar(java.sql.PreparedStatement ps, int paramIndex, char value)Sets avalueintopsat position specified byparamIndex.voidsetDouble(java.sql.PreparedStatement ps, int paramIndex, double value)Sets avalueintopsat position specified byparamIndex.voidsetFloat(java.sql.PreparedStatement ps, int paramIndex, float value)Sets avalueintopsat position specified byparamIndex.voidsetInt(java.sql.PreparedStatement ps, int paramIndex, int value)Sets avalueintopsat position specified byparamIndex.voidsetLong(java.sql.PreparedStatement ps, int paramIndex, long value)Sets avalueintopsat position specified byparamIndex.voidsetObject(java.sql.PreparedStatement ps, int paramIndex, java.lang.Object value)Sets avalueintopsat position specified byparamIndex.voidsetShort(java.sql.PreparedStatement ps, int paramIndex, short value)Sets avalueintopsat position specified byparamIndex.voidsetString(java.sql.PreparedStatement ps, int paramIndex, java.lang.String value)Sets avalueintopsat position specified byparamIndex.
-
-
-
Method Detail
-
isNullable
boolean isNullable()
Whether the column is nullable.- Returns:
- true if is nullable
-
getColumn
Column getColumn()
Accessor for the column that this represents.- Returns:
- The Column
-
getJavaTypeMapping
JavaTypeMapping getJavaTypeMapping()
The mapping for the java type that this column mapping is used by. This will return null if this simply maps a column in the datastore and has no associated java type in a class.- Returns:
- the JavaTypeMapping
-
insertValuesOnInsert
boolean insertValuesOnInsert()
Accessor for whether this mapping requires values inserting on an INSERT.- Returns:
- Whether values are to be inserted into this mapping on an INSERT
-
getInsertionInputParameter
java.lang.String getInsertionInputParameter()
Accessor for the string to put in any retrieval datastore statement for this field. This is typically a ? to be used in JDBC statements.- Returns:
- The input parameter
-
getUpdateInputParameter
java.lang.String getUpdateInputParameter()
Accessor for the string to put in any update datastore statements for this field. This is typically a ? to be used in JDBC statements.- Returns:
- The input parameter.
-
isDecimalBased
boolean isDecimalBased()
Accessor for whether the mapping is decimal-based.- Returns:
- Whether the mapping is decimal based
-
isIntegerBased
boolean isIntegerBased()
Accessor for whether the mapping is integer-based.- Returns:
- Whether the mapping is integer based
-
isStringBased
boolean isStringBased()
Accessor for whether the mapping is string-based.- Returns:
- Whether the mapping is string based
-
isBitBased
boolean isBitBased()
Accessor for whether the mapping is bit-based.- Returns:
- Whether the mapping is bit based
-
isBooleanBased
boolean isBooleanBased()
Accessor for whether the mapping is boolean-based.- Returns:
- Whether the mapping is boolean based
-
setBoolean
void setBoolean(java.sql.PreparedStatement ps, int paramIndex, boolean value)Sets avalueintopsat position specified byparamIndex.- Parameters:
ps- PreparedStatementparamIndex- the position of the value in the statementvalue- the value
-
setChar
void setChar(java.sql.PreparedStatement ps, int paramIndex, char value)Sets avalueintopsat position specified byparamIndex.- Parameters:
ps- PreparedStatementparamIndex- the position of the value in the statementvalue- the value
-
setByte
void setByte(java.sql.PreparedStatement ps, int paramIndex, byte value)Sets avalueintopsat position specified byparamIndex.- Parameters:
ps- PreparedStatementparamIndex- the position of the value in the statementvalue- the value
-
setShort
void setShort(java.sql.PreparedStatement ps, int paramIndex, short value)Sets avalueintopsat position specified byparamIndex.- Parameters:
ps- PreparedStatementparamIndex- the position of the value in the statementvalue- the value
-
setInt
void setInt(java.sql.PreparedStatement ps, int paramIndex, int value)Sets avalueintopsat position specified byparamIndex.- Parameters:
ps- PreparedStatementparamIndex- the position of the value in the statementvalue- the value
-
setLong
void setLong(java.sql.PreparedStatement ps, int paramIndex, long value)Sets avalueintopsat position specified byparamIndex.- Parameters:
ps- PreparedStatementparamIndex- the position of the value in the statementvalue- the value
-
setFloat
void setFloat(java.sql.PreparedStatement ps, int paramIndex, float value)Sets avalueintopsat position specified byparamIndex.- Parameters:
ps- PreparedStatementparamIndex- the position of the value in the statementvalue- the value
-
setDouble
void setDouble(java.sql.PreparedStatement ps, int paramIndex, double value)Sets avalueintopsat position specified byparamIndex.- Parameters:
ps- PreparedStatementparamIndex- the position of the value in the statementvalue- the value
-
setString
void setString(java.sql.PreparedStatement ps, int paramIndex, java.lang.String value)Sets avalueintopsat position specified byparamIndex.- Parameters:
ps- PreparedStatementparamIndex- the position of the value in the statementvalue- the value
-
setObject
void setObject(java.sql.PreparedStatement ps, int paramIndex, java.lang.Object value)Sets avalueintopsat position specified byparamIndex.- Parameters:
ps- PreparedStatementparamIndex- the position of the value in the statementvalue- the value
-
getBoolean
boolean getBoolean(java.sql.ResultSet resultSet, int exprIndex)Obtains a value fromresultSetat position specified byexprIndex.- Parameters:
resultSet- ResultSetexprIndex- the position of the value in the result- Returns:
- the value
-
getChar
char getChar(java.sql.ResultSet resultSet, int exprIndex)Obtains a value fromresultSetat position specified byexprIndex.- Parameters:
resultSet- ResultSetexprIndex- the position of the value in the result- Returns:
- the value
-
getByte
byte getByte(java.sql.ResultSet resultSet, int exprIndex)Obtains a value fromresultSetat position specified byexprIndex.- Parameters:
resultSet- ResultSetexprIndex- the position of the value in the result- Returns:
- the value
-
getShort
short getShort(java.sql.ResultSet resultSet, int exprIndex)Obtains a value fromresultSetat position specified byexprIndex.- Parameters:
resultSet- ResultSetexprIndex- the position of the value in the result- Returns:
- the value
-
getInt
int getInt(java.sql.ResultSet resultSet, int exprIndex)Obtains a value fromresultSetat position specified byexprIndex.- Parameters:
resultSet- ResultSetexprIndex- the position of the value in the result- Returns:
- the value
-
getLong
long getLong(java.sql.ResultSet resultSet, int exprIndex)Obtains a value fromresultSetat position specified byexprIndex.- Parameters:
resultSet- ResultSetexprIndex- the position of the value in the result- Returns:
- the value
-
getFloat
float getFloat(java.sql.ResultSet resultSet, int exprIndex)Obtains a value fromresultSetat position specified byexprIndex.- Parameters:
resultSet- ResultSetexprIndex- the position of the value in the result- Returns:
- the value
-
getDouble
double getDouble(java.sql.ResultSet resultSet, int exprIndex)Obtains a value fromresultSetat position specified byexprIndex.- Parameters:
resultSet- ResultSetexprIndex- the position of the value in the result- Returns:
- the value
-
getString
java.lang.String getString(java.sql.ResultSet resultSet, int exprIndex)Obtains a value fromresultSetat position specified byexprIndex.- Parameters:
resultSet- ResultSetexprIndex- the position of the value in the result- Returns:
- the value
-
getObject
java.lang.Object getObject(java.sql.ResultSet resultSet, int exprIndex)Obtains a value fromresultSetat position specified byexprIndex.- Parameters:
resultSet- ResultSetexprIndex- the position of the value in the result- Returns:
- the value
-
-