|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jpox.store.mapped.mapping.JavaTypeMapping
org.jpox.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.jpox.store.mapped.mapping.JavaTypeMapping |
|---|
datastoreContainer, datastoreMappings, dba, fmd, LOCALISER, MAPPING_ARRAY_ELEMENT, MAPPING_COLLECTION_ELEMENT, MAPPING_FIELD, MAPPING_MAP_KEY, MAPPING_MAP_VALUE, referenceMapping, roleForField, type |
| Constructor Summary | |
|---|---|
SingleFieldMapping()
|
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object obj)
Equality operator |
boolean |
getBoolean(ObjectManager om,
java.lang.Object resultSet,
int[] exprIndex)
Obtains a value from datastoreResults
at position specified by exprIndex. |
byte |
getByte(ObjectManager om,
java.lang.Object resultSet,
int[] exprIndex)
Obtains a value from datastoreResults
at position specified by exprIndex. |
char |
getChar(ObjectManager om,
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(ObjectManager om,
java.lang.Object resultSet,
int[] exprIndex)
Obtains a value from datastoreResults
at position specified by exprIndex. |
float |
getFloat(ObjectManager om,
java.lang.Object resultSet,
int[] exprIndex)
Obtains a value from datastoreResults
at position specified by exprIndex. |
int |
getInt(ObjectManager om,
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(ObjectManager om,
java.lang.Object resultSet,
int[] exprIndex)
Obtains a value from datastoreResults
at position specified by exprIndex. |
java.lang.Object |
getObject(ObjectManager om,
java.lang.Object resultSet,
int[] exprIndex)
Obtains a value from datastoreResults
at position specified by exprIndex. |
short |
getShort(ObjectManager om,
java.lang.Object resultSet,
int[] exprIndex)
Obtains a value from datastoreResults
at position specified by exprIndex. |
java.lang.String |
getString(ObjectManager om,
java.lang.Object resultSet,
int[] exprIndex)
Obtains a value from datastoreResults
at position specified by exprIndex. |
ScalarExpression[] |
getValidValues(int index)
Accessor for an array of valid values that this type can take. |
void |
initialize(DatastoreAdapter dba,
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(ObjectManager om,
java.lang.Object preparedStatement,
int[] exprIndex,
boolean value)
Sets a value into datastoreStatement
at position specified by exprIndex. |
void |
setByte(ObjectManager om,
java.lang.Object preparedStatement,
int[] exprIndex,
byte value)
Sets a value into datastoreStatement
at position specified by exprIndex. |
void |
setChar(ObjectManager om,
java.lang.Object preparedStatement,
int[] exprIndex,
char value)
Sets a value into datastoreStatement
at position specified by exprIndex. |
void |
setDouble(ObjectManager om,
java.lang.Object preparedStatement,
int[] exprIndex,
double value)
Sets a value into datastoreStatement
at position specified by exprIndex. |
void |
setFloat(ObjectManager om,
java.lang.Object preparedStatement,
int[] exprIndex,
float value)
Sets a value into datastoreStatement
at position specified by exprIndex. |
void |
setInt(ObjectManager om,
java.lang.Object preparedStatement,
int[] exprIndex,
int value)
Sets a value into datastoreStatement
at position specified by exprIndex. |
void |
setLong(ObjectManager om,
java.lang.Object preparedStatement,
int[] exprIndex,
long value)
Sets a value into datastoreStatement
at position specified by exprIndex. |
void |
setObject(ObjectManager om,
java.lang.Object preparedStatement,
int[] exprIndex,
java.lang.Object value)
Sets a value into datastoreStatement
at position specified by exprIndex. |
void |
setShort(ObjectManager om,
java.lang.Object preparedStatement,
int[] exprIndex,
short value)
Sets a value into datastoreStatement
at position specified by exprIndex. |
void |
setString(ObjectManager om,
java.lang.Object preparedStatement,
int[] exprIndex,
java.lang.String value)
Sets a value into datastoreStatement
at position specified by exprIndex. |
| Methods inherited from class org.jpox.store.mapped.mapping.JavaTypeMapping |
|---|
addDataStoreMapping, failureMessage, getDatastoreContainer, getDataStoreMapping, getDataStoreMappings, getFieldMetaData, getJavaType, getNumberOfDatastoreFields, getObject, getReferenceMapping, getRoleForField, getSampleValue, getType, includeInFetchStatement, includeInInsertStatement, includeInUpdateStatement, initialize, isNullable, isSerialised, newLiteral, newScalarExpression, setDefault, setFieldInformation, setObject, setReferenceMapping, setRoleForField |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SingleFieldMapping()
| Method Detail |
|---|
public void initialize(DatastoreAdapter dba,
AbstractMemberMetaData fmd,
DatastoreContainerObject container,
ClassLoaderResolver clr)
initialize in class JavaTypeMappingdba - The Datastore Adapter that this Mapping should use.fmd - FieldMetaData for the field to be mapped (if any)container - The datastore container storing this mapping (if any)clr - the ClassLoaderResolverprotected void prepareDatastoreMapping()
public int getDefaultLength(int index)
index - requested datastore field index.
public ScalarExpression[] 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 java.lang.Objectobj - The object to compare with
public void setBoolean(ObjectManager om,
java.lang.Object preparedStatement,
int[] exprIndex,
boolean value)
JavaTypeMappingvalue into datastoreStatement
at position specified by exprIndex.
setBoolean in class JavaTypeMappingom - the ObjectManagerpreparedStatement - a datastore object that executes statements in the databaseexprIndex - the position of the value in the statementvalue - the value
public boolean getBoolean(ObjectManager om,
java.lang.Object resultSet,
int[] exprIndex)
JavaTypeMappingdatastoreResults
at position specified by exprIndex.
getBoolean in class JavaTypeMappingom - the ObjectManagerresultSet - an object returned from the datastore with valuesexprIndex - the position of the value in the result
public void setChar(ObjectManager om,
java.lang.Object preparedStatement,
int[] exprIndex,
char value)
JavaTypeMappingvalue into datastoreStatement
at position specified by exprIndex.
setChar in class JavaTypeMappingom - the ObjectManagerpreparedStatement - a datastore object that executes statements in the databaseexprIndex - the position of the value in the statementvalue - the value
public char getChar(ObjectManager om,
java.lang.Object resultSet,
int[] exprIndex)
JavaTypeMappingdatastoreResults
at position specified by exprIndex.
getChar in class JavaTypeMappingom - the ObjectManagerresultSet - an object returned from the datastore with valuesexprIndex - the position of the value in the result
public void setByte(ObjectManager om,
java.lang.Object preparedStatement,
int[] exprIndex,
byte value)
JavaTypeMappingvalue into datastoreStatement
at position specified by exprIndex.
setByte in class JavaTypeMappingom - the ObjectManagerpreparedStatement - a datastore object that executes statements in the databaseexprIndex - the position of the value in the statementvalue - the value
public byte getByte(ObjectManager om,
java.lang.Object resultSet,
int[] exprIndex)
JavaTypeMappingdatastoreResults
at position specified by exprIndex.
getByte in class JavaTypeMappingom - the ObjectManagerresultSet - an object returned from the datastore with valuesexprIndex - the position of the value in the result
public void setShort(ObjectManager om,
java.lang.Object preparedStatement,
int[] exprIndex,
short value)
JavaTypeMappingvalue into datastoreStatement
at position specified by exprIndex.
setShort in class JavaTypeMappingom - the ObjectManagerpreparedStatement - a datastore object that executes statements in the databaseexprIndex - the position of the value in the statementvalue - the value
public short getShort(ObjectManager om,
java.lang.Object resultSet,
int[] exprIndex)
JavaTypeMappingdatastoreResults
at position specified by exprIndex.
getShort in class JavaTypeMappingom - the ObjectManagerresultSet - an object returned from the datastore with valuesexprIndex - the position of the value in the result
public void setInt(ObjectManager om,
java.lang.Object preparedStatement,
int[] exprIndex,
int value)
JavaTypeMappingvalue into datastoreStatement
at position specified by exprIndex.
setInt in class JavaTypeMappingom - the ObjectManagerpreparedStatement - a datastore object that executes statements in the databaseexprIndex - the position of the value in the statementvalue - the value
public int getInt(ObjectManager om,
java.lang.Object resultSet,
int[] exprIndex)
JavaTypeMappingdatastoreResults
at position specified by exprIndex.
getInt in class JavaTypeMappingom - the ObjectManagerresultSet - an object returned from the datastore with valuesexprIndex - the position of the value in the result
public void setLong(ObjectManager om,
java.lang.Object preparedStatement,
int[] exprIndex,
long value)
JavaTypeMappingvalue into datastoreStatement
at position specified by exprIndex.
setLong in class JavaTypeMappingom - the ObjectManagerpreparedStatement - a datastore object that executes statements in the databaseexprIndex - the position of the value in the statementvalue - the value
public long getLong(ObjectManager om,
java.lang.Object resultSet,
int[] exprIndex)
JavaTypeMappingdatastoreResults
at position specified by exprIndex.
getLong in class JavaTypeMappingom - the ObjectManagerresultSet - an object returned from the datastore with valuesexprIndex - the position of the value in the result
public void setFloat(ObjectManager om,
java.lang.Object preparedStatement,
int[] exprIndex,
float value)
JavaTypeMappingvalue into datastoreStatement
at position specified by exprIndex.
setFloat in class JavaTypeMappingom - the ObjectManagerpreparedStatement - a datastore object that executes statements in the databaseexprIndex - the position of the value in the statementvalue - the value
public float getFloat(ObjectManager om,
java.lang.Object resultSet,
int[] exprIndex)
JavaTypeMappingdatastoreResults
at position specified by exprIndex.
getFloat in class JavaTypeMappingom - the ObjectManagerresultSet - an object returned from the datastore with valuesexprIndex - the position of the value in the result
public void setDouble(ObjectManager om,
java.lang.Object preparedStatement,
int[] exprIndex,
double value)
JavaTypeMappingvalue into datastoreStatement
at position specified by exprIndex.
setDouble in class JavaTypeMappingom - the ObjectManagerpreparedStatement - a datastore object that executes statements in the databaseexprIndex - the position of the value in the statementvalue - the value
public double getDouble(ObjectManager om,
java.lang.Object resultSet,
int[] exprIndex)
JavaTypeMappingdatastoreResults
at position specified by exprIndex.
getDouble in class JavaTypeMappingom - the ObjectManagerresultSet - an object returned from the datastore with valuesexprIndex - the position of the value in the result
public void setString(ObjectManager om,
java.lang.Object preparedStatement,
int[] exprIndex,
java.lang.String value)
JavaTypeMappingvalue into datastoreStatement
at position specified by exprIndex.
setString in class JavaTypeMappingom - the ObjectManagerpreparedStatement - a datastore object that executes statements in the databaseexprIndex - the position of the value in the statementvalue - the value
public java.lang.String getString(ObjectManager om,
java.lang.Object resultSet,
int[] exprIndex)
JavaTypeMappingdatastoreResults
at position specified by exprIndex.
getString in class JavaTypeMappingom - the ObjectManagerresultSet - an object returned from the datastore with valuesexprIndex - the position of the value in the result
public void setObject(ObjectManager om,
java.lang.Object preparedStatement,
int[] exprIndex,
java.lang.Object value)
JavaTypeMappingvalue into datastoreStatement
at position specified by exprIndex.
setObject in class JavaTypeMappingom - the ObjectManagerpreparedStatement - a datastore object that executes statements in the databaseexprIndex - the position of the value in the statementvalue - the value
public java.lang.Object getObject(ObjectManager om,
java.lang.Object resultSet,
int[] exprIndex)
JavaTypeMappingdatastoreResults
at position specified by exprIndex.
getObject in class JavaTypeMappingom - the ObjectManagerresultSet - 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 | |||||||||