Class IntegerColumnMapping
java.lang.Object
org.datanucleus.store.rdbms.mapping.column.AbstractColumnMapping
org.datanucleus.store.rdbms.mapping.column.IntegerColumnMapping
- All Implemented Interfaces:
ColumnMapping
Mapping of a INTEGER column.
-
Field Summary
Fields inherited from class AbstractColumnMapping
column, mapping, storeMgr -
Constructor Summary
ConstructorsConstructorDescriptionIntegerColumnMapping(JavaTypeMapping mapping, RDBMSStoreManager storeMgr, Column col) Constructor. -
Method Summary
Modifier and TypeMethodDescriptioncharObtains a value fromresultSetat position specified byexprIndex.intObtains a value fromresultSetat position specified byexprIndex.intMethod to return the java.sql.Types type that this relates to.longObtains a value fromresultSetat position specified byexprIndex.Obtains a value fromresultSetat position specified byexprIndex.private voidbooleanAccessor for whether the mapping is integer-based.voidsetChar(PreparedStatement ps, int param, char value) Sets avalueintopsat position specified byparamIndex.voidsetInt(PreparedStatement ps, int param, int value) Sets avalueintopsat position specified byparamIndex.voidsetLong(PreparedStatement ps, int param, long value) Sets avalueintopsat position specified byparamIndex.voidsetObject(PreparedStatement ps, int param, Object value) Sets avalueintopsat position specified byparamIndex.Methods inherited from class AbstractColumnMapping
equals, failureMessage, failureMessage, failureMessage, getBoolean, getByte, getColumn, getDatastoreAdapter, getDouble, getFloat, getInsertionInputParameter, getJavaTypeMapping, getShort, getString, getTypeInfo, getUpdateInputParameter, hashCode, includeInFetchStatement, initTypeInfo, insertValuesOnInsert, isBitBased, isBooleanBased, isDecimalBased, isNullable, isStringBased, setBoolean, setByte, setDouble, setFloat, setShort, setString, useDefaultWhenNull
-
Constructor Details
-
IntegerColumnMapping
Constructor.- Parameters:
mapping- Java type mappingstoreMgr- Store Managercol- Column
-
-
Method Details
-
initialize
private void initialize() -
isIntegerBased
public boolean isIntegerBased()Accessor for whether the mapping is integer-based.- Specified by:
isIntegerBasedin interfaceColumnMapping- Overrides:
isIntegerBasedin classAbstractColumnMapping- Returns:
- Whether the mapping is integer based
-
getJDBCType
public int getJDBCType()Description copied from class:AbstractColumnMappingMethod to return the java.sql.Types type that this relates to.- Specified by:
getJDBCTypein classAbstractColumnMapping- Returns:
- The JDBC "type"
-
setChar
Description copied from interface:ColumnMappingSets avalueintopsat position specified byparamIndex.- Specified by:
setCharin interfaceColumnMapping- Overrides:
setCharin classAbstractColumnMapping- Parameters:
ps- PreparedStatementparam- the position of the value in the statementvalue- the value
-
getChar
Description copied from interface:ColumnMappingObtains a value fromresultSetat position specified byexprIndex.- Specified by:
getCharin interfaceColumnMapping- Overrides:
getCharin classAbstractColumnMapping- Parameters:
rs- ResultSetparam- the position of the value in the result- Returns:
- the value
-
setInt
Description copied from interface:ColumnMappingSets avalueintopsat position specified byparamIndex.- Specified by:
setIntin interfaceColumnMapping- Overrides:
setIntin classAbstractColumnMapping- Parameters:
ps- PreparedStatementparam- the position of the value in the statementvalue- the value
-
getInt
Description copied from interface:ColumnMappingObtains a value fromresultSetat position specified byexprIndex.- Specified by:
getIntin interfaceColumnMapping- Overrides:
getIntin classAbstractColumnMapping- Parameters:
rs- ResultSetparam- the position of the value in the result- Returns:
- the value
-
setLong
Description copied from interface:ColumnMappingSets avalueintopsat position specified byparamIndex.- Specified by:
setLongin interfaceColumnMapping- Overrides:
setLongin classAbstractColumnMapping- Parameters:
ps- PreparedStatementparam- the position of the value in the statementvalue- the value
-
getLong
Description copied from interface:ColumnMappingObtains a value fromresultSetat position specified byexprIndex.- Specified by:
getLongin interfaceColumnMapping- Overrides:
getLongin classAbstractColumnMapping- Parameters:
rs- ResultSetparam- the position of the value in the result- Returns:
- the value
-
setObject
Description copied from interface:ColumnMappingSets avalueintopsat position specified byparamIndex.- Specified by:
setObjectin interfaceColumnMapping- Overrides:
setObjectin classAbstractColumnMapping- Parameters:
ps- PreparedStatementparam- the position of the value in the statementvalue- the value
-
getObject
Description copied from interface:ColumnMappingObtains a value fromresultSetat position specified byexprIndex.- Specified by:
getObjectin interfaceColumnMapping- Overrides:
getObjectin classAbstractColumnMapping- Parameters:
rs- ResultSetparam- the position of the value in the result- Returns:
- the value
-