|
||||||||||
| 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.VersionMapping
public final class VersionMapping
Mapping class for mapping version state/timestamp columns in the database. This class is for internal use only. It should not be used in user mappings.
| 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 | |
|---|---|
VersionMapping(DatastoreAdapter dba,
DatastoreContainerObject datastoreContainer,
JavaTypeMapping delegate)
Constructor. |
|
| Method Summary | |
|---|---|
void |
addDataStoreMapping(DatastoreMapping datastoreMapping)
Method to add a datastore mapping. |
DatastoreMapping |
getDataStoreMapping(int index)
Accessor for a datastore mapping. |
java.lang.Class |
getJavaType()
Accessor for the type represented here, returning the class itself |
static java.lang.Object |
getNextVersion(VersionMetaData vermd,
java.lang.Object currentVersion)
Accessor for the next version of the object. |
int |
getNumberOfDatastoreFields()
Accessor for the number of datastore fields. |
java.lang.Object |
getObject(ObjectManager om,
java.lang.Object resultSet,
int[] exprIndex)
Accessor for the object in this column |
java.lang.Object |
getSampleValue(ClassLoaderResolver clr)
Accessor for a sample value for this column |
boolean |
includeInFetchStatement()
Accessor for whether to include this column in any fetch statement |
ScalarExpression |
newLiteral(QueryExpression qs,
java.lang.Object value)
Accessor for a new literal for this mapping. |
ScalarExpression |
newScalarExpression(QueryExpression qs,
LogicSetExpression te)
Accessor for a new literal for this mapping. |
void |
setObject(ObjectManager om,
java.lang.Object preparedStatement,
int[] exprIndex,
java.lang.Object value)
Mutator for the object in this column |
| Methods inherited from class org.jpox.store.mapped.mapping.SingleFieldMapping |
|---|
equals, getBoolean, getByte, getChar, getDefaultLength, getDouble, getFloat, getInt, getJavaTypeForDatastoreMapping, 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 |
|---|
failureMessage, getDatastoreContainer, getDataStoreMappings, getFieldMetaData, getObject, getReferenceMapping, getRoleForField, getType, 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 VersionMapping(DatastoreAdapter dba,
DatastoreContainerObject datastoreContainer,
JavaTypeMapping delegate)
dba - Datastore AdapterdatastoreContainer - Datastore tabledelegate - The JavaTypeMapping to delegate the storage| Method Detail |
|---|
public java.lang.Object getSampleValue(ClassLoaderResolver clr)
getSampleValue in class JavaTypeMappingclr - TODO
public ScalarExpression newLiteral(QueryExpression qs,
java.lang.Object value)
newLiteral in class JavaTypeMappingqs - The QueryStatementvalue - The value of the object
public ScalarExpression newScalarExpression(QueryExpression qs,
LogicSetExpression te)
newScalarExpression in class JavaTypeMappingqs - The QueryStatementte - The table expression
public boolean includeInFetchStatement()
includeInFetchStatement in class JavaTypeMappingpublic int getNumberOfDatastoreFields()
getNumberOfDatastoreFields in class JavaTypeMappingpublic DatastoreMapping getDataStoreMapping(int index)
getDataStoreMapping in class JavaTypeMappingindex - The mapping index
public void addDataStoreMapping(DatastoreMapping datastoreMapping)
addDataStoreMapping in class JavaTypeMappingdatastoreMapping - The mappingpublic java.lang.Class getJavaType()
getJavaType in class JavaTypeMapping
public void setObject(ObjectManager om,
java.lang.Object preparedStatement,
int[] exprIndex,
java.lang.Object value)
setObject in class SingleFieldMappingom - The ObjectManagerpreparedStatement - The statementexprIndex - The indexesvalue - The value to set it to
public java.lang.Object getObject(ObjectManager om,
java.lang.Object resultSet,
int[] exprIndex)
getObject in class SingleFieldMappingom - The ObjectManagerresultSet - The ResultSet to get the value fromexprIndex - The indexes
public static java.lang.Object getNextVersion(VersionMetaData vermd,
java.lang.Object currentVersion)
vermd - MetaData defining the version.currentVersion - The current version
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||