|
||||||||||
| 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.SingleFieldMultiMapping
org.jpox.store.mapped.mapping.GregorianCalendarMapping
public class GregorianCalendarMapping
Maps the class fields of a GregorianCalendar to datastore fields. JPOX traditionally supported this as mapping to 2 datastore fields (timestamp millisecs and timezone). It also supports as mapping to a single datastore field (timestamp).
| 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 | |
|---|---|
GregorianCalendarMapping()
|
|
| Method Summary | |
|---|---|
java.lang.Class |
getJavaType()
Accessor for the java type being mapped. |
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)
Obtains a value from datastoreResults
at position specified by exprIndex. |
java.lang.Object |
getSampleValue(ClassLoaderResolver clr)
Return a sample value of the mapping type to be used for internal evaluation of type and conversion. |
void |
initialize(DatastoreAdapter dba,
AbstractMemberMetaData fmd,
DatastoreContainerObject container,
ClassLoaderResolver clr)
Initialize this JavaTypeMapping with the given DatastoreAdapter for the given FieldMetaData. |
ScalarExpression |
newLiteral(QueryExpression qs,
java.lang.Object value)
Creates a literal from an value. |
ScalarExpression |
newScalarExpression(QueryExpression qs,
LogicSetExpression te)
Creates a expression from a field name/table. |
void |
setObject(ObjectManager om,
java.lang.Object preparedStatement,
int[] exprIndex,
java.lang.Object value)
Sets a value into datastoreStatement
at position specified by exprIndex. |
| Methods inherited from class org.jpox.store.mapped.mapping.SingleFieldMultiMapping |
|---|
addDatastoreField |
| Methods inherited from class org.jpox.store.mapped.mapping.JavaTypeMapping |
|---|
addDataStoreMapping, failureMessage, getBoolean, getByte, getChar, getDatastoreContainer, getDataStoreMapping, getDataStoreMappings, getDouble, getFieldMetaData, getFloat, getInt, getLong, getNumberOfDatastoreFields, getObject, getReferenceMapping, getRoleForField, getShort, getString, getType, includeInFetchStatement, includeInInsertStatement, includeInUpdateStatement, initialize, isNullable, isSerialised, setBoolean, setByte, setChar, setDefault, setDouble, setFieldInformation, setFloat, setInt, setLong, setObject, setReferenceMapping, setRoleForField, setShort, setString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GregorianCalendarMapping()
| 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 ClassLoaderResolverpublic java.lang.Class getJavaType()
JavaTypeMapping
getJavaType in class JavaTypeMappingpublic java.lang.String getJavaTypeForDatastoreMapping(int index)
getJavaTypeForDatastoreMapping in class SingleFieldMultiMappingindex - requested datastore field index.
public java.lang.Object getSampleValue(ClassLoaderResolver clr)
JavaTypeMapping
getSampleValue in class JavaTypeMappingclr - TODO
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
public ScalarExpression newLiteral(QueryExpression qs,
java.lang.Object value)
JavaTypeMapping
newLiteral in class JavaTypeMappingqs - The Query statementvalue - The object
public ScalarExpression newScalarExpression(QueryExpression qs,
LogicSetExpression te)
JavaTypeMapping
newScalarExpression in class JavaTypeMappingqs - The Query statementte - the alias for the table
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||