|
||||||||||
| 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
org.jpox.store.mapped.mapping.ObjectAsStringMapping
public abstract class ObjectAsStringMapping
Abstract SCO mapping for a java type that will be stored as a String type.
| 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 | |
|---|---|
ObjectAsStringMapping()
|
|
| Method Summary | |
|---|---|
abstract java.lang.Class |
getJavaType()
Method to return the Java type. |
java.lang.String |
getJavaTypeForDatastoreMapping(int index)
Accessor for the name of the java-type actually used when mapping the particular datastore field. |
java.lang.Object |
getObject(ObjectManager om,
java.lang.Object resultSet,
int[] exprIndex)
Method to get the object from the datastore and convert to an object. |
ScalarExpression |
newLiteral(QueryExpression qs,
java.lang.Object value)
Method to create a literal of this type for use in a JDOQL query. |
ScalarExpression |
newScalarExpression(QueryExpression qs,
LogicSetExpression te)
Method to create a new expression for this mapping for use in a JDOQL Query. |
protected abstract java.lang.String |
objectToString(java.lang.Object object)
Method to set the datastore value based on the object value. |
void |
setObject(ObjectManager om,
java.lang.Object preparedStatement,
int[] exprIndex,
java.lang.Object value)
Method to set the object when updating the the datastore. |
protected abstract java.lang.Object |
stringToObject(java.lang.String datastoreValue)
Method to extract the objects value from the datastore object. |
| Methods inherited from class org.jpox.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 org.jpox.store.mapped.mapping.JavaTypeMapping |
|---|
addDataStoreMapping, failureMessage, getDatastoreContainer, getDataStoreMapping, getDataStoreMappings, getFieldMetaData, getNumberOfDatastoreFields, getObject, getReferenceMapping, getRoleForField, getSampleValue, getType, includeInFetchStatement, includeInInsertStatement, includeInUpdateStatement, initialize, isNullable, isSerialised, 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 ObjectAsStringMapping()
| Method Detail |
|---|
public ScalarExpression newLiteral(QueryExpression qs,
java.lang.Object value)
newLiteral in class JavaTypeMappingqs - The QueryExpressionvalue - The value of the literal
public ScalarExpression newScalarExpression(QueryExpression qs,
LogicSetExpression te)
newScalarExpression in class JavaTypeMappingqs - The QueryExpressionte - Expression for the datastore container
public abstract java.lang.Class getJavaType()
getJavaType in class JavaTypeMappingpublic java.lang.String getJavaTypeForDatastoreMapping(int index)
getJavaTypeForDatastoreMapping in class SingleFieldMappingindex - requested datastore field index.
public void setObject(ObjectManager om,
java.lang.Object preparedStatement,
int[] exprIndex,
java.lang.Object value)
setObject in class SingleFieldMappingom - the ObjectManagerpreparedStatement - a datastore object that executes statements in the databaseexprIndex - the position of the value in the statementvalue - the valueSingleFieldMapping.setObject(org.jpox.ObjectManager, java.lang.Object, int[], java.lang.Object)
public java.lang.Object getObject(ObjectManager om,
java.lang.Object resultSet,
int[] exprIndex)
getObject in class SingleFieldMappingom - the ObjectManagerresultSet - an object returned from the datastore with valuesexprIndex - the position of the value in the result
SingleFieldMapping.getObject(org.jpox.ObjectManager, java.lang.Object, int[])protected abstract java.lang.String objectToString(java.lang.Object object)
object - The object
protected abstract java.lang.Object stringToObject(java.lang.String datastoreValue)
datastoreValue - Value obtained from the datastore
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||