|
||||||||||
| 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.TypeConverterMapping
public class TypeConverterMapping
Mapping where the member has its value converted to/from some storable datastore type using a TypeConverter.
| Field Summary |
|---|
| Fields inherited from class org.datanucleus.store.mapped.mapping.JavaTypeMapping |
|---|
absFieldNumber, datastoreContainer, datastoreMappings, LOCALISER, mmd, referenceMapping, roleForMember, storeMgr, type |
| Constructor Summary | |
|---|---|
TypeConverterMapping()
|
|
| Method Summary | |
|---|---|
boolean |
getBoolean(ExecutionContext ec,
Object resultSet,
int[] exprIndex)
Obtains a value from datastoreResults
at position specified by exprIndex. |
byte |
getByte(ExecutionContext ec,
Object resultSet,
int[] exprIndex)
Obtains a value from datastoreResults
at position specified by exprIndex. |
char |
getChar(ExecutionContext ec,
Object resultSet,
int[] exprIndex)
Obtains a value from datastoreResults
at position specified by exprIndex. |
double |
getDouble(ExecutionContext ec,
Object resultSet,
int[] exprIndex)
Obtains a value from datastoreResults
at position specified by exprIndex. |
float |
getFloat(ExecutionContext ec,
Object resultSet,
int[] exprIndex)
Obtains a value from datastoreResults
at position specified by exprIndex. |
int |
getInt(ExecutionContext ec,
Object resultSet,
int[] exprIndex)
Obtains a value from datastoreResults
at position specified by exprIndex. |
Class |
getJavaType()
Accessor for the java type being mapped. |
String |
getJavaTypeForDatastoreMapping(int index)
Accessor for the name of the java-type actually used when mapping the particular datastore field. |
long |
getLong(ExecutionContext ec,
Object resultSet,
int[] exprIndex)
Obtains a value from datastoreResults
at position specified by exprIndex. |
Object |
getObject(ExecutionContext ec,
Object resultSet,
int[] exprIndex)
Obtains a value from datastoreResults
at position specified by exprIndex. |
short |
getShort(ExecutionContext ec,
Object resultSet,
int[] exprIndex)
Obtains a value from datastoreResults
at position specified by exprIndex. |
String |
getString(ExecutionContext ec,
Object resultSet,
int[] exprIndex)
Obtains a value from datastoreResults
at position specified by exprIndex. |
void |
initialize(AbstractMemberMetaData fmd,
DatastoreContainerObject container,
ClassLoaderResolver clr)
Initialize this JavaTypeMapping with the given DatastoreAdapter for the given FieldMetaData. |
void |
setBoolean(ExecutionContext ec,
Object preparedStatement,
int[] exprIndex,
boolean value)
Sets a value into datastoreStatement
at position specified by exprIndex. |
void |
setByte(ExecutionContext ec,
Object preparedStatement,
int[] exprIndex,
byte value)
Sets a value into datastoreStatement
at position specified by exprIndex. |
void |
setChar(ExecutionContext ec,
Object preparedStatement,
int[] exprIndex,
char value)
Sets a value into datastoreStatement
at position specified by exprIndex. |
void |
setDouble(ExecutionContext ec,
Object preparedStatement,
int[] exprIndex,
double value)
Sets a value into datastoreStatement
at position specified by exprIndex. |
void |
setFloat(ExecutionContext ec,
Object preparedStatement,
int[] exprIndex,
float value)
Sets a value into datastoreStatement
at position specified by exprIndex. |
void |
setInt(ExecutionContext ec,
Object preparedStatement,
int[] exprIndex,
int value)
Sets a value into datastoreStatement
at position specified by exprIndex. |
void |
setLong(ExecutionContext ec,
Object preparedStatement,
int[] exprIndex,
long value)
Sets a value into datastoreStatement
at position specified by exprIndex. |
void |
setObject(ExecutionContext ec,
Object preparedStatement,
int[] exprIndex,
Object value)
Sets a value into datastoreStatement
at position specified by exprIndex. |
void |
setShort(ExecutionContext ec,
Object preparedStatement,
int[] exprIndex,
short value)
Sets a value into datastoreStatement
at position specified by exprIndex. |
void |
setString(ExecutionContext ec,
Object preparedStatement,
int[] exprIndex,
String value)
Sets a value into datastoreStatement
at position specified by exprIndex. |
| Methods inherited from class org.datanucleus.store.mapped.mapping.SingleFieldMapping |
|---|
equals, getDefaultLength, getValidValues, prepareDatastoreMapping |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TypeConverterMapping()
| Method Detail |
|---|
public void initialize(AbstractMemberMetaData fmd,
DatastoreContainerObject container,
ClassLoaderResolver clr)
SingleFieldMapping
initialize in class SingleFieldMappingfmd - FieldMetaData for the field to be mapped (if any)container - The datastore container storing this mapping (if any)clr - the ClassLoaderResolverpublic String getJavaTypeForDatastoreMapping(int index)
getJavaTypeForDatastoreMapping in class SingleFieldMappingindex - requested datastore field index.
public Class getJavaType()
JavaTypeMapping
getJavaType in class JavaTypeMapping
public void setBoolean(ExecutionContext ec,
Object preparedStatement,
int[] exprIndex,
boolean value)
JavaTypeMappingvalue into datastoreStatement
at position specified by exprIndex.
setBoolean in class SingleFieldMappingec - ExecutionContextpreparedStatement - a datastore object that executes statements in the databaseexprIndex - the position of the value in the statementvalue - the value
public boolean getBoolean(ExecutionContext ec,
Object resultSet,
int[] exprIndex)
JavaTypeMappingdatastoreResults
at position specified by exprIndex.
getBoolean in class SingleFieldMappingec - ExecutionContextresultSet - an object returned from the datastore with valuesexprIndex - the position of the value in the result
public void setByte(ExecutionContext ec,
Object preparedStatement,
int[] exprIndex,
byte value)
JavaTypeMappingvalue into datastoreStatement
at position specified by exprIndex.
setByte in class SingleFieldMappingec - ExecutionContextpreparedStatement - a datastore object that executes statements in the databaseexprIndex - the position of the value in the statementvalue - the value
public byte getByte(ExecutionContext ec,
Object resultSet,
int[] exprIndex)
JavaTypeMappingdatastoreResults
at position specified by exprIndex.
getByte in class SingleFieldMappingec - ExecutionContextresultSet - an object returned from the datastore with valuesexprIndex - the position of the value in the result
public void setChar(ExecutionContext ec,
Object preparedStatement,
int[] exprIndex,
char value)
JavaTypeMappingvalue into datastoreStatement
at position specified by exprIndex.
setChar in class SingleFieldMappingec - ExecutionContextpreparedStatement - a datastore object that executes statements in the databaseexprIndex - the position of the value in the statementvalue - the value
public char getChar(ExecutionContext ec,
Object resultSet,
int[] exprIndex)
JavaTypeMappingdatastoreResults
at position specified by exprIndex.
getChar in class SingleFieldMappingec - ExecutionContextresultSet - an object returned from the datastore with valuesexprIndex - the position of the value in the result
public void setDouble(ExecutionContext ec,
Object preparedStatement,
int[] exprIndex,
double value)
JavaTypeMappingvalue into datastoreStatement
at position specified by exprIndex.
setDouble in class SingleFieldMappingec - ExecutionContextpreparedStatement - a datastore object that executes statements in the databaseexprIndex - the position of the value in the statementvalue - the value
public double getDouble(ExecutionContext ec,
Object resultSet,
int[] exprIndex)
JavaTypeMappingdatastoreResults
at position specified by exprIndex.
getDouble in class SingleFieldMappingec - ExecutionContextresultSet - an object returned from the datastore with valuesexprIndex - the position of the value in the result
public void setFloat(ExecutionContext ec,
Object preparedStatement,
int[] exprIndex,
float value)
JavaTypeMappingvalue into datastoreStatement
at position specified by exprIndex.
setFloat in class SingleFieldMappingec - ExecutionContextpreparedStatement - a datastore object that executes statements in the databaseexprIndex - the position of the value in the statementvalue - the value
public float getFloat(ExecutionContext ec,
Object resultSet,
int[] exprIndex)
JavaTypeMappingdatastoreResults
at position specified by exprIndex.
getFloat in class SingleFieldMappingec - ExecutionContextresultSet - an object returned from the datastore with valuesexprIndex - the position of the value in the result
public void setInt(ExecutionContext ec,
Object preparedStatement,
int[] exprIndex,
int value)
JavaTypeMappingvalue into datastoreStatement
at position specified by exprIndex.
setInt in class SingleFieldMappingec - ExecutionContextpreparedStatement - a datastore object that executes statements in the databaseexprIndex - the position of the value in the statementvalue - the value
public int getInt(ExecutionContext ec,
Object resultSet,
int[] exprIndex)
JavaTypeMappingdatastoreResults
at position specified by exprIndex.
getInt in class SingleFieldMappingec - ExecutionContextresultSet - an object returned from the datastore with valuesexprIndex - the position of the value in the result
public void setLong(ExecutionContext ec,
Object preparedStatement,
int[] exprIndex,
long value)
JavaTypeMappingvalue into datastoreStatement
at position specified by exprIndex.
setLong in class SingleFieldMappingec - ExecutionContextpreparedStatement - a datastore object that executes statements in the databaseexprIndex - the position of the value in the statementvalue - the value
public long getLong(ExecutionContext ec,
Object resultSet,
int[] exprIndex)
JavaTypeMappingdatastoreResults
at position specified by exprIndex.
getLong in class SingleFieldMappingec - ExecutionContextresultSet - an object returned from the datastore with valuesexprIndex - the position of the value in the result
public void setShort(ExecutionContext ec,
Object preparedStatement,
int[] exprIndex,
short value)
JavaTypeMappingvalue into datastoreStatement
at position specified by exprIndex.
setShort in class SingleFieldMappingec - execution contextpreparedStatement - a datastore object that executes statements in the databaseexprIndex - the position of the value in the statementvalue - the value
public short getShort(ExecutionContext ec,
Object resultSet,
int[] exprIndex)
JavaTypeMappingdatastoreResults
at position specified by exprIndex.
getShort in class SingleFieldMappingec - ExecutionContextresultSet - an object returned from the datastore with valuesexprIndex - the position of the value in the result
public void setString(ExecutionContext ec,
Object preparedStatement,
int[] exprIndex,
String value)
JavaTypeMappingvalue into datastoreStatement
at position specified by exprIndex.
setString in class SingleFieldMappingec - ExecutionContextpreparedStatement - a datastore object that executes statements in the databaseexprIndex - the position of the value in the statementvalue - the value
public String getString(ExecutionContext ec,
Object resultSet,
int[] exprIndex)
JavaTypeMappingdatastoreResults
at position specified by exprIndex.
getString in class SingleFieldMappingec - ExecutionContextresultSet - an object returned from the datastore with valuesexprIndex - the position of the value in the result
public void setObject(ExecutionContext ec,
Object preparedStatement,
int[] exprIndex,
Object value)
JavaTypeMappingvalue into datastoreStatement
at position specified by exprIndex.
setObject in class SingleFieldMappingec - ExecutionContextpreparedStatement - a datastore object that executes statements in the databaseexprIndex - the position of the value in the statementvalue - the value
public Object getObject(ExecutionContext ec,
Object resultSet,
int[] exprIndex)
JavaTypeMappingdatastoreResults
at position specified by exprIndex.
getObject in class SingleFieldMappingec - ExecutionContextresultSet - an object returned from the datastore with valuesexprIndex - the position of the value in the result
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||