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 ColumnMapping
Representation of the mapping of a column.
-
Method Summary
Modifier and TypeMethodDescriptionbooleangetBoolean(ResultSet resultSet, int exprIndex) Obtains a value fromresultSetat position specified byexprIndex.byteObtains a value fromresultSetat position specified byexprIndex.charObtains a value fromresultSetat position specified byexprIndex.Accessor for the column that this represents.doubleObtains a value fromresultSetat position specified byexprIndex.floatObtains a value fromresultSetat position specified byexprIndex.Accessor for the string to put in any retrieval datastore statement for this field.intObtains a value fromresultSetat position specified byexprIndex.The mapping for the java type that this column mapping is used by.longObtains a value fromresultSetat position specified byexprIndex.Obtains a value fromresultSetat position specified byexprIndex.shortObtains a value fromresultSetat position specified byexprIndex.Obtains a value fromresultSetat position specified byexprIndex.Accessor for the string to put in any update datastore statements for this field.booleanAccessor for whether this mapping requires values inserting on an INSERT.booleanAccessor for whether the mapping is bit-based.booleanAccessor for whether the mapping is boolean-based.booleanAccessor for whether the mapping is decimal-based.booleanAccessor for whether the mapping is integer-based.booleanWhether the column is nullable.booleanAccessor for whether the mapping is string-based.voidsetBoolean(PreparedStatement ps, int paramIndex, boolean value) Sets avalueintopsat position specified byparamIndex.voidsetByte(PreparedStatement ps, int paramIndex, byte value) Sets avalueintopsat position specified byparamIndex.voidsetChar(PreparedStatement ps, int paramIndex, char value) Sets avalueintopsat position specified byparamIndex.voidsetDouble(PreparedStatement ps, int paramIndex, double value) Sets avalueintopsat position specified byparamIndex.voidsetFloat(PreparedStatement ps, int paramIndex, float value) Sets avalueintopsat position specified byparamIndex.voidsetInt(PreparedStatement ps, int paramIndex, int value) Sets avalueintopsat position specified byparamIndex.voidsetLong(PreparedStatement ps, int paramIndex, long value) Sets avalueintopsat position specified byparamIndex.voidsetObject(PreparedStatement ps, int paramIndex, Object value) Sets avalueintopsat position specified byparamIndex.voidsetShort(PreparedStatement ps, int paramIndex, short value) Sets avalueintopsat position specified byparamIndex.voidsetString(PreparedStatement ps, int paramIndex, String value) Sets avalueintopsat position specified byparamIndex.
-
Method Details
-
isNullable
boolean isNullable()Whether the column is nullable.- Returns:
- true if is nullable
-
getColumn
-
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
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
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
Sets avalueintopsat position specified byparamIndex.- Parameters:
ps- PreparedStatementparamIndex- the position of the value in the statementvalue- the value
-
setChar
Sets avalueintopsat position specified byparamIndex.- Parameters:
ps- PreparedStatementparamIndex- the position of the value in the statementvalue- the value
-
setByte
Sets avalueintopsat position specified byparamIndex.- Parameters:
ps- PreparedStatementparamIndex- the position of the value in the statementvalue- the value
-
setShort
Sets avalueintopsat position specified byparamIndex.- Parameters:
ps- PreparedStatementparamIndex- the position of the value in the statementvalue- the value
-
setInt
Sets avalueintopsat position specified byparamIndex.- Parameters:
ps- PreparedStatementparamIndex- the position of the value in the statementvalue- the value
-
setLong
Sets avalueintopsat position specified byparamIndex.- Parameters:
ps- PreparedStatementparamIndex- the position of the value in the statementvalue- the value
-
setFloat
Sets avalueintopsat position specified byparamIndex.- Parameters:
ps- PreparedStatementparamIndex- the position of the value in the statementvalue- the value
-
setDouble
Sets avalueintopsat position specified byparamIndex.- Parameters:
ps- PreparedStatementparamIndex- the position of the value in the statementvalue- the value
-
setString
Sets avalueintopsat position specified byparamIndex.- Parameters:
ps- PreparedStatementparamIndex- the position of the value in the statementvalue- the value
-
setObject
Sets avalueintopsat position specified byparamIndex.- Parameters:
ps- PreparedStatementparamIndex- the position of the value in the statementvalue- the value
-
getBoolean
Obtains a value fromresultSetat position specified byexprIndex.- Parameters:
resultSet- ResultSetexprIndex- the position of the value in the result- Returns:
- the value
-
getChar
Obtains a value fromresultSetat position specified byexprIndex.- Parameters:
resultSet- ResultSetexprIndex- the position of the value in the result- Returns:
- the value
-
getByte
Obtains a value fromresultSetat position specified byexprIndex.- Parameters:
resultSet- ResultSetexprIndex- the position of the value in the result- Returns:
- the value
-
getShort
Obtains a value fromresultSetat position specified byexprIndex.- Parameters:
resultSet- ResultSetexprIndex- the position of the value in the result- Returns:
- the value
-
getInt
Obtains a value fromresultSetat position specified byexprIndex.- Parameters:
resultSet- ResultSetexprIndex- the position of the value in the result- Returns:
- the value
-
getLong
Obtains a value fromresultSetat position specified byexprIndex.- Parameters:
resultSet- ResultSetexprIndex- the position of the value in the result- Returns:
- the value
-
getFloat
Obtains a value fromresultSetat position specified byexprIndex.- Parameters:
resultSet- ResultSetexprIndex- the position of the value in the result- Returns:
- the value
-
getDouble
Obtains a value fromresultSetat position specified byexprIndex.- Parameters:
resultSet- ResultSetexprIndex- the position of the value in the result- Returns:
- the value
-
getString
-
getObject
-