|
||||||||||
| 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
public abstract class SingleFieldMapping
Simple mapping for a java field mapping to a single datastore field.
| Field Summary |
|---|
| Fields inherited from class org.datanucleus.store.mapped.mapping.JavaTypeMapping |
|---|
datastoreContainer, datastoreMappings, LOCALISER, mmd, referenceMapping, roleForMember, storeMgr, type |
| Constructor Summary | |
|---|---|
SingleFieldMapping()
|
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object obj)
Equality operator |
boolean |
getBoolean(ExecutionContext ec,
java.lang.Object resultSet,
int[] exprIndex)
Obtains a value from datastoreResults
at position specified by exprIndex. |
byte |
getByte(ExecutionContext ec,
java.lang.Object resultSet,
int[] exprIndex)
Obtains a value from datastoreResults
at position specified by exprIndex. |
char |
getChar(ExecutionContext ec,
java.lang.Object resultSet,
int[] exprIndex)
Obtains a value from datastoreResults
at position specified by exprIndex. |
int |
getDefaultLength(int index)
Accessor for the default length for this type in the datastore (if applicable). |
double |
getDouble(ExecutionContext ec,
java.lang.Object resultSet,
int[] exprIndex)
Obtains a value from datastoreResults
at position specified by exprIndex. |
float |
getFloat(ExecutionContext ec,
java.lang.Object resultSet,
int[] exprIndex)
Obtains a value from datastoreResults
at position specified by exprIndex. |
int |
getInt(ExecutionContext ec,
java.lang.Object resultSet,
int[] exprIndex)
Obtains a value from datastoreResults
at position specified by exprIndex. |
java.lang.String |
getJavaTypeForDatastoreMapping(int index)
Accessor for the name of the java-type actually used when mapping the particular datastore field. |
long |
getLong(ExecutionContext ec,
java.lang.Object resultSet,
int[] exprIndex)
Obtains a value from datastoreResults
at position specified by exprIndex. |
java.lang.Object |
getObject(ExecutionContext ec,
java.lang.Object resultSet,
int[] exprIndex)
Obtains a value from datastoreResults
at position specified by exprIndex. |
short |
getShort(ExecutionContext ec,
java.lang.Object resultSet,
int[] exprIndex)
Obtains a value from datastoreResults
at position specified by exprIndex. |
java.lang.String |
getString(ExecutionContext ec,
java.lang.Object resultSet,
int[] exprIndex)
Obtains a value from datastoreResults
at position specified by exprIndex. |
java.lang.Object[] |
getValidValues(int index)
Accessor for an array of valid values that this type can take. |
void |
initialize(AbstractMemberMetaData fmd,
DatastoreContainerObject container,
ClassLoaderResolver clr)
Initialize this JavaTypeMapping with the given DatastoreAdapter for the given FieldMetaData. |
protected void |
prepareDatastoreMapping()
Method to prepare a field mapping for use in the datastore. |
void |
setBoolean(ExecutionContext ec,
java.lang.Object preparedStatement,
int[] exprIndex,
boolean value)
Sets a value into datastoreStatement
at position specified by exprIndex. |
void |
setByte(ExecutionContext ec,
java.lang.Object preparedStatement,
int[] exprIndex,
byte value)
Sets a value into datastoreStatement
at position specified by exprIndex. |
void |
setChar(ExecutionContext ec,
java.lang.Object preparedStatement,
int[] exprIndex,
char value)
Sets a value into datastoreStatement
at position specified by exprIndex. |
void |
setDouble(ExecutionContext ec,
java.lang.Object preparedStatement,
int[] exprIndex,
double value)
Sets a value into datastoreStatement
at position specified by exprIndex. |
void |
setFloat(ExecutionContext ec,
java.lang.Object preparedStatement,
int[] exprIndex,
float value)
Sets a value into datastoreStatement
at position specified by exprIndex. |
void |
setInt(ExecutionContext ec,
java.lang.Object preparedStatement,
int[] exprIndex,
int value)
Sets a value into datastoreStatement
at position specified by exprIndex. |
void |
setLong(ExecutionContext ec,
java.lang.Object preparedStatement,
int[] exprIndex,
long value)
Sets a value into datastoreStatement
at position specified by exprIndex. |
void |
setObject(ExecutionContext ec,
java.lang.Object preparedStatement,
int[] exprIndex,
java.lang.Object value)
Sets a value into datastoreStatement
at position specified by exprIndex. |
void |
setShort(ExecutionContext ec,
java.lang.Object preparedStatement,
int[] exprIndex,
short value)
Sets a value into datastoreStatement
at position specified by exprIndex. |
void |
setString(ExecutionContext ec,
java.lang.Object preparedStatement,
int[] exprIndex,
java.lang.String value)
Sets a value into datastoreStatement
at position specified by exprIndex. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SingleFieldMapping()
| Method Detail |
|---|
public void initialize(AbstractMemberMetaData fmd,
DatastoreContainerObject container,
ClassLoaderResolver clr)
initialize in class JavaTypeMappingcontainer - The datastore container storing this mapping (if any)clr - the ClassLoaderResolverfmd - FieldMetaData for the field to be mapped (if any)protected void prepareDatastoreMapping()
public int getDefaultLength(int index)
index - requested datastore field index.
public java.lang.Object[] getValidValues(int index)
index - requested datastore field index.
public java.lang.String getJavaTypeForDatastoreMapping(int index)
getJavaTypeForDatastoreMapping in class JavaTypeMappingindex - requested datastore field index.
public boolean equals(java.lang.Object obj)
equals in class JavaTypeMappingobj - The object to compare with
public void setBoolean(ExecutionContext ec,
java.lang.Object preparedStatement,
int[] exprIndex,
boolean value)
JavaTypeMappingvalue into datastoreStatement
at position specified by exprIndex.
setBoolean in class JavaTypeMappingec - 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,
java.lang.Object resultSet,
int[] exprIndex)
JavaTypeMappingdatastoreResults
at position specified by exprIndex.
getBoolean in class JavaTypeMappingec - ExecutionContextresultSet - an object returned from the datastore with valuesexprIndex - the position of the value in the result
public void setChar(ExecutionContext ec,
java.lang.Object preparedStatement,
int[] exprIndex,
char value)
JavaTypeMappingvalue into datastoreStatement
at position specified by exprIndex.
setChar in class JavaTypeMappingec - 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,
java.lang.Object resultSet,
int[] exprIndex)
JavaTypeMappingdatastoreResults
at position specified by exprIndex.
getChar in class JavaTypeMappingec - ExecutionContextresultSet - an object returned from the datastore with valuesexprIndex - the position of the value in the result
public void setByte(ExecutionContext ec,
java.lang.Object preparedStatement,
int[] exprIndex,
byte value)
JavaTypeMappingvalue into datastoreStatement
at position specified by exprIndex.
setByte in class JavaTypeMappingec - 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,
java.lang.Object resultSet,
int[] exprIndex)
JavaTypeMappingdatastoreResults
at position specified by exprIndex.
getByte in class JavaTypeMappingec - ExecutionContextresultSet - an object returned from the datastore with valuesexprIndex - the position of the value in the result
public void setShort(ExecutionContext ec,
java.lang.Object preparedStatement,
int[] exprIndex,
short value)
JavaTypeMappingvalue into datastoreStatement
at position specified by exprIndex.
setShort in class JavaTypeMappingec - 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,
java.lang.Object resultSet,
int[] exprIndex)
JavaTypeMappingdatastoreResults
at position specified by exprIndex.
getShort in class JavaTypeMappingec - ExecutionContextresultSet - an object returned from the datastore with valuesexprIndex - the position of the value in the result
public void setInt(ExecutionContext ec,
java.lang.Object preparedStatement,
int[] exprIndex,
int value)
JavaTypeMappingvalue into datastoreStatement
at position specified by exprIndex.
setInt in class JavaTypeMappingec - 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,
java.lang.Object resultSet,
int[] exprIndex)
JavaTypeMappingdatastoreResults
at position specified by exprIndex.
getInt in class JavaTypeMappingec - ExecutionContextresultSet - an object returned from the datastore with valuesexprIndex - the position of the value in the result
public void setLong(ExecutionContext ec,
java.lang.Object preparedStatement,
int[] exprIndex,
long value)
JavaTypeMappingvalue into datastoreStatement
at position specified by exprIndex.
setLong in class JavaTypeMappingec - 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,
java.lang.Object resultSet,
int[] exprIndex)
JavaTypeMappingdatastoreResults
at position specified by exprIndex.
getLong in class JavaTypeMappingec - ExecutionContextresultSet - an object returned from the datastore with valuesexprIndex - the position of the value in the result
public void setFloat(ExecutionContext ec,
java.lang.Object preparedStatement,
int[] exprIndex,
float value)
JavaTypeMappingvalue into datastoreStatement
at position specified by exprIndex.
setFloat in class JavaTypeMappingec - 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,
java.lang.Object resultSet,
int[] exprIndex)
JavaTypeMappingdatastoreResults
at position specified by exprIndex.
getFloat in class JavaTypeMappingec - ExecutionContextresultSet - an object returned from the datastore with valuesexprIndex - the position of the value in the result
public void setDouble(ExecutionContext ec,
java.lang.Object preparedStatement,
int[] exprIndex,
double value)
JavaTypeMappingvalue into datastoreStatement
at position specified by exprIndex.
setDouble in class JavaTypeMappingec - 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,
java.lang.Object resultSet,
int[] exprIndex)
JavaTypeMappingdatastoreResults
at position specified by exprIndex.
getDouble in class JavaTypeMappingec - ExecutionContextresultSet - an object returned from the datastore with valuesexprIndex - the position of the value in the result
public void setString(ExecutionContext ec,
java.lang.Object preparedStatement,
int[] exprIndex,
java.lang.String value)
JavaTypeMappingvalue into datastoreStatement
at position specified by exprIndex.
setString in class JavaTypeMappingec - ExecutionContextpreparedStatement - a datastore object that executes statements in the databaseexprIndex - the position of the value in the statementvalue - the value
public java.lang.String getString(ExecutionContext ec,
java.lang.Object resultSet,
int[] exprIndex)
JavaTypeMappingdatastoreResults
at position specified by exprIndex.
getString in class JavaTypeMappingec - ExecutionContextresultSet - an object returned from the datastore with valuesexprIndex - the position of the value in the result
public void setObject(ExecutionContext ec,
java.lang.Object preparedStatement,
int[] exprIndex,
java.lang.Object value)
JavaTypeMappingvalue into datastoreStatement
at position specified by exprIndex.
setObject in class JavaTypeMappingec - ExecutionContextpreparedStatement - a datastore object that executes statements in the databaseexprIndex - the position of the value in the statementvalue - the value
public java.lang.Object getObject(ExecutionContext ec,
java.lang.Object resultSet,
int[] exprIndex)
JavaTypeMappingdatastoreResults
at position specified by exprIndex.
getObject in class JavaTypeMappingec - 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 | |||||||||