org.jpox.store.mapping
Class EnumMapping
java.lang.Object
org.jpox.store.mapping.JavaTypeMapping
org.jpox.store.mapping.SingleFieldMapping
org.jpox.store.mapping.EnumMapping
- All Implemented Interfaces:
- org.jpox.store.mapping.SimpleDatastoreRepresentation
public class EnumMapping
- extends org.jpox.store.mapping.SingleFieldMapping
- implements org.jpox.store.mapping.SimpleDatastoreRepresentation
Mapping for JDK1.5 Enum type.
- Version:
- $Revision: 1.9.2.2 $
| Fields inherited from class org.jpox.store.mapping.JavaTypeMapping |
datastoreContainer, datastoreMappings, dba, fmd, LOCALISER, referenceMapping, type |
|
Method Summary |
java.lang.Class |
getJavaType()
|
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(org.jpox.PersistenceManager pm,
java.lang.Object resultSet,
int[] exprIndex)
|
java.lang.Object |
getSampleValue(org.jpox.ClassLoaderResolver clr)
|
void |
initialize(org.jpox.store.DatastoreAdapter dba,
org.jpox.metadata.AbstractPropertyMetaData fmd,
org.jpox.store.DatastoreContainerObject container,
org.jpox.ClassLoaderResolver clr)
Initialize this JavaTypeMapping with the given DatastoreAdapter for the given FieldMetaData. |
org.jpox.store.expression.ScalarExpression |
newLiteral(org.jpox.store.expression.QueryExpression qs,
java.lang.Object value)
|
org.jpox.store.expression.ScalarExpression |
newScalarExpression(org.jpox.store.expression.QueryExpression qs,
org.jpox.store.expression.LogicSetExpression te)
|
void |
setObject(org.jpox.PersistenceManager pm,
java.lang.Object preparedStatement,
int[] exprIndex,
java.lang.Object value)
|
| Methods inherited from class org.jpox.store.mapping.SingleFieldMapping |
equals, getBoolean, getByte, getChar, getDefaultLength, getDouble, getFloat, getInt, getLong, getShort, getString, getValidValues, prepareDatastoreMapping, setBoolean, setByte, setChar, setDouble, setFloat, setInt, setLong, setShort, setString |
| Methods inherited from class org.jpox.store.mapping.JavaTypeMapping |
addDataStoreMapping, failureMessage, getDatastoreContainer, getDataStoreMapping, getDataStoreMappings, getFieldMetaData, getNumberOfDatastoreFields, getObject, getReferenceMapping, getType, includeInFetchStatement, includeInInsertStatement, includeInUpdateStatement, initialize, isNullable, setDefault, setObject, setReferenceMapping |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
datastoreJavaType
protected java.lang.String datastoreJavaType
EnumMapping
public EnumMapping()
initialize
public void initialize(org.jpox.store.DatastoreAdapter dba,
org.jpox.metadata.AbstractPropertyMetaData fmd,
org.jpox.store.DatastoreContainerObject container,
org.jpox.ClassLoaderResolver clr)
- Initialize this JavaTypeMapping with the given DatastoreAdapter for the given FieldMetaData.
- Overrides:
initialize in class org.jpox.store.mapping.SingleFieldMapping
- Parameters:
dba - 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 ClassLoaderResolver
getJavaTypeForDatastoreMapping
public java.lang.String getJavaTypeForDatastoreMapping(int index)
- Accessor for the name of the java-type actually used when mapping the particular datastore
field. This java-type must have an entry in the datastore mappings.
- Overrides:
getJavaTypeForDatastoreMapping in class org.jpox.store.mapping.SingleFieldMapping
- Parameters:
index - requested datastore field index.
- Returns:
- the name of java-type for the requested datastore field.
getJavaType
public java.lang.Class getJavaType()
- Specified by:
getJavaType in class org.jpox.store.mapping.JavaTypeMapping
setObject
public void setObject(org.jpox.PersistenceManager pm,
java.lang.Object preparedStatement,
int[] exprIndex,
java.lang.Object value)
- Overrides:
setObject in class org.jpox.store.mapping.SingleFieldMapping
getObject
public java.lang.Object getObject(org.jpox.PersistenceManager pm,
java.lang.Object resultSet,
int[] exprIndex)
- Overrides:
getObject in class org.jpox.store.mapping.SingleFieldMapping
getSampleValue
public java.lang.Object getSampleValue(org.jpox.ClassLoaderResolver clr)
- Specified by:
getSampleValue in class org.jpox.store.mapping.JavaTypeMapping
newLiteral
public org.jpox.store.expression.ScalarExpression newLiteral(org.jpox.store.expression.QueryExpression qs,
java.lang.Object value)
- Specified by:
newLiteral in class org.jpox.store.mapping.JavaTypeMapping
newScalarExpression
public org.jpox.store.expression.ScalarExpression newScalarExpression(org.jpox.store.expression.QueryExpression qs,
org.jpox.store.expression.LogicSetExpression te)
- Specified by:
newScalarExpression in class org.jpox.store.mapping.JavaTypeMapping
Copyright © 2003-2008 Java Persistent Objects (JPOX). All Rights Reserved.