Class BigIntColumnMapping
java.lang.Object
org.datanucleus.store.rdbms.mapping.column.AbstractColumnMapping
org.datanucleus.store.rdbms.mapping.column.BigIntColumnMapping
- All Implemented Interfaces:
ColumnMapping
Mapping of a Big Integer column.
-
Field Summary
Fields inherited from class org.datanucleus.store.rdbms.mapping.column.AbstractColumnMapping
column, mapping, storeMgr
-
Constructor Summary
ConstructorsConstructorDescriptionBigIntColumnMapping
(JavaTypeMapping mapping, RDBMSStoreManager storeMgr, Column col) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionint
Obtains a value fromresultSet
at position specified byexprIndex
.int
Method to return the java.sql.Types type that this relates to.long
Obtains a value fromresultSet
at position specified byexprIndex
.Method to retrieve a Big int from a ResultSet.Obtains a value fromresultSet
at position specified byexprIndex
.private void
void
setInt
(PreparedStatement ps, int param, int value) Sets avalue
intops
at position specified byparamIndex
.void
setLong
(PreparedStatement ps, int param, long value) Sets avalue
intops
at position specified byparamIndex
.void
setObject
(PreparedStatement ps, int param, Object value) Setter for a parameter in a PreparedStatementvoid
setString
(PreparedStatement ps, int exprIndex, String value) Sets avalue
intops
at position specified byparamIndex
.Methods inherited from class org.datanucleus.store.rdbms.mapping.column.AbstractColumnMapping
equals, failureMessage, failureMessage, failureMessage, getBoolean, getByte, getChar, getColumn, getDatastoreAdapter, getDouble, getFloat, getInsertionInputParameter, getJavaTypeMapping, getShort, getTypeInfo, getUpdateInputParameter, hashCode, includeInFetchStatement, initTypeInfo, insertValuesOnInsert, isBitBased, isBooleanBased, isDecimalBased, isIntegerBased, isNullable, isStringBased, setBoolean, setByte, setChar, setDouble, setFloat, setShort, useDefaultWhenNull
-
Constructor Details
-
BigIntColumnMapping
Constructor.- Parameters:
mapping
- Java type mappingstoreMgr
- Store Managercol
- Column
-
-
Method Details
-
initialize
private void initialize() -
getJDBCType
public int getJDBCType()Description copied from class:AbstractColumnMapping
Method to return the java.sql.Types type that this relates to.- Specified by:
getJDBCType
in classAbstractColumnMapping
- Returns:
- The JDBC "type"
-
setInt
Description copied from interface:ColumnMapping
Sets avalue
intops
at position specified byparamIndex
.- Specified by:
setInt
in interfaceColumnMapping
- Overrides:
setInt
in classAbstractColumnMapping
- Parameters:
ps
- PreparedStatementparam
- the position of the value in the statementvalue
- the value
-
getInt
Description copied from interface:ColumnMapping
Obtains a value fromresultSet
at position specified byexprIndex
.- Specified by:
getInt
in interfaceColumnMapping
- Overrides:
getInt
in classAbstractColumnMapping
- Parameters:
rs
- ResultSetparam
- the position of the value in the result- Returns:
- the value
-
setLong
Description copied from interface:ColumnMapping
Sets avalue
intops
at position specified byparamIndex
.- Specified by:
setLong
in interfaceColumnMapping
- Overrides:
setLong
in classAbstractColumnMapping
- Parameters:
ps
- PreparedStatementparam
- the position of the value in the statementvalue
- the value
-
getLong
Description copied from interface:ColumnMapping
Obtains a value fromresultSet
at position specified byexprIndex
.- Specified by:
getLong
in interfaceColumnMapping
- Overrides:
getLong
in classAbstractColumnMapping
- Parameters:
rs
- ResultSetparam
- the position of the value in the result- Returns:
- the value
-
setString
Description copied from interface:ColumnMapping
Sets avalue
intops
at position specified byparamIndex
.- Specified by:
setString
in interfaceColumnMapping
- Overrides:
setString
in classAbstractColumnMapping
- Parameters:
ps
- PreparedStatementexprIndex
- the position of the value in the statementvalue
- the value
-
getString
Description copied from interface:ColumnMapping
Obtains a value fromresultSet
at position specified byexprIndex
.- Specified by:
getString
in interfaceColumnMapping
- Overrides:
getString
in classAbstractColumnMapping
- Parameters:
resultSet
- ResultSetexprIndex
- the position of the value in the result- Returns:
- the value
-
setObject
Setter for a parameter in a PreparedStatement- Specified by:
setObject
in interfaceColumnMapping
- Overrides:
setObject
in classAbstractColumnMapping
- Parameters:
ps
- The PreparedStatementparam
- The parameter number to setvalue
- The value to set it to.
-
getObject
Method to retrieve a Big int from a ResultSet.- Specified by:
getObject
in interfaceColumnMapping
- Overrides:
getObject
in classAbstractColumnMapping
- Parameters:
rs
- ResultSetparam
- The Parameter number in the result set- Returns:
- The BIGINT object
-