|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.datanucleus.store.mapped.mapping.JavaTypeMapping
org.datanucleus.store.mapped.mapping.SingleFieldMapping
org.datanucleus.store.mapped.mapping.ObjectAsIntegerMapping
public abstract class ObjectAsIntegerMapping
Abstract mapping for a java type that will be stored as a Integer type.
| Field Summary |
|---|
| Fields inherited from class org.datanucleus.store.mapped.mapping.JavaTypeMapping |
|---|
absFieldNumber, datastoreContainer, datastoreMappings, LOCALISER, mmd, referenceMapping, roleForMember, storeMgr, type |
| Constructor Summary | |
|---|---|
ObjectAsIntegerMapping()
|
|
| Method Summary | |
|---|---|
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(ExecutionContext ec,
Object resultSet,
int[] exprIndex)
Method to get the object from the datastore and convert to an object. |
protected abstract Object |
numberToObject(Number datastoreValue)
Method to extract the objects value from the datastore object. |
protected abstract Number |
objectToNumber(Object object)
Method to set the datastore value based on the object value. |
void |
setObject(ExecutionContext ec,
Object preparedStatement,
int[] exprIndex,
Object value)
Method to set the object when updating the the datastore. |
| Methods inherited from class org.datanucleus.store.mapped.mapping.SingleFieldMapping |
|---|
equals, getBoolean, getByte, getChar, getDefaultLength, getDouble, getFloat, getInt, getLong, getShort, getString, getValidValues, initialize, prepareDatastoreMapping, setBoolean, setByte, setChar, setDouble, setFloat, setInt, setLong, setShort, setString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ObjectAsIntegerMapping()
| Method Detail |
|---|
public abstract Class getJavaType()
getJavaType in class JavaTypeMappingpublic String getJavaTypeForDatastoreMapping(int index)
getJavaTypeForDatastoreMapping in class SingleFieldMappingindex - requested datastore field index.
public void setObject(ExecutionContext ec,
Object preparedStatement,
int[] exprIndex,
Object value)
setObject in class SingleFieldMappingec - ExecutionContextpreparedStatement - a datastore object that executes statements in the databaseexprIndex - the position of the value in the statementvalue - the valueSingleFieldMapping.setObject(org.datanucleus.ExecutionContext, java.lang.Object, int[], java.lang.Object)
public Object getObject(ExecutionContext ec,
Object resultSet,
int[] exprIndex)
getObject in class SingleFieldMappingec - ExecutionContextresultSet - an object returned from the datastore with valuesexprIndex - the position of the value in the result
SingleFieldMapping.getObject(org.datanucleus.ExecutionContext, java.lang.Object, int[])protected abstract Number objectToNumber(Object object)
object - The object
protected abstract Object numberToObject(Number datastoreValue)
datastoreValue - Value obtained from the datastore
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||