public abstract class ObjectAsLongMapping extends SingleFieldMapping
absFieldNumber, datastoreMappings, LOCALISER, LOCALISER_RDBMS, mmd, referenceMapping, roleForMember, storeMgr, table, type
Constructor and Description |
---|
ObjectAsLongMapping() |
Modifier and Type | Method and Description |
---|---|
abstract Class |
getJavaType()
Method to return the Java type.
|
String |
getJavaTypeForDatastoreMapping(int index)
Accessor for the name of the java-type actually used when mapping the particular datastore
field.
|
Object |
getObject(org.datanucleus.ExecutionContext ec,
ResultSet resultSet,
int[] exprIndex)
Method to get the object from the datastore and convert to an object.
|
protected abstract Object |
longToObject(Long datastoreValue)
Method to extract the objects value from the datastore object.
|
protected abstract Long |
objectToLong(Object object)
Method to set the datastore value based on the object value.
|
void |
setObject(org.datanucleus.ExecutionContext ec,
PreparedStatement ps,
int[] exprIndex,
Object value)
Method to set the object when updating the the datastore.
|
equals, getBoolean, getByte, getChar, getDefaultLength, getDouble, getFloat, getInt, getLong, getShort, getString, getValidValues, initialize, prepareDatastoreMapping, setBoolean, setByte, setChar, setDouble, setFloat, setInt, setLong, setShort, setString
addDatastoreMapping, failureMessage, getAbsoluteFieldNumber, getColumnMetaDataForMember, getDatastoreMapping, getDatastoreMappings, getMemberMetaData, getNumberOfDatastoreMappings, getObject, getReferenceMapping, getRoleForMember, getStoreManager, getTable, getType, getValueForDatastoreMapping, hashCode, hasSimpleDatastoreRepresentation, includeInFetchStatement, includeInInsertStatement, includeInUpdateStatement, initialize, isNullable, isSerialised, representableAsStringLiteralInStatement, setAbsFieldNumber, setMemberMetaData, setObject, setReferenceMapping, setRoleForMember, setTable
public abstract Class getJavaType()
getJavaType
in class JavaTypeMapping
public String getJavaTypeForDatastoreMapping(int index)
getJavaTypeForDatastoreMapping
in class SingleFieldMapping
index
- requested datastore field index.public void setObject(org.datanucleus.ExecutionContext ec, PreparedStatement ps, int[] exprIndex, Object value)
setObject
in class SingleFieldMapping
ec
- ExecutionContextps
- PreparedStatementexprIndex
- the position of the value in the statementvalue
- the valueSingleFieldMapping.setObject(org.datanucleus.ExecutionContext, PreparedStatement, int[], java.lang.Object)
public Object getObject(org.datanucleus.ExecutionContext ec, ResultSet resultSet, int[] exprIndex)
getObject
in class SingleFieldMapping
ec
- ExecutionContextresultSet
- ResultSetexprIndex
- the position of the value in the resultSingleFieldMapping.getObject(org.datanucleus.ExecutionContext, ResultSet, int[])
protected abstract Long objectToLong(Object object)
object
- The objectCopyright © 2023. All rights reserved.