|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jpox.store.mapping.JavaTypeMapping
org.jpox.store.mapping.SingleFieldMapping
public abstract class SingleFieldMapping
Simple mapping for a java field mapping to a single datastore field.
| Field Summary | |
|---|---|
protected DatastoreContainerObject |
datastoreContainer
|
protected TypeInfo |
typeInfo
|
| Fields inherited from class org.jpox.store.mapping.JavaTypeMapping |
|---|
datastoreMappings, dba, fmd, LOCALISER, referenceMapping, type |
| Constructor Summary | |
|---|---|
SingleFieldMapping(DatastoreAdapter dba,
AbstractPropertyMetaData fmd,
DatastoreContainerObject datastoreContainer)
Constructor. |
|
SingleFieldMapping(DatastoreAdapter dba,
FieldMetaData fmd,
DatastoreContainerObject datastoreContainer,
boolean initDatastoreMappings)
Constructor. |
|
SingleFieldMapping(DatastoreAdapter dba,
java.lang.String type)
Constructor. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object obj)
Equality operator |
boolean |
getBoolean(PersistenceManager pm,
java.lang.Object resultSet,
int[] exprIndex)
Obtains a value from resultSet
at position specified by exprIndex. |
byte |
getByte(PersistenceManager pm,
java.lang.Object resultSet,
int[] exprIndex)
Obtains a value from resultSet
at position specified by exprIndex. |
char |
getChar(PersistenceManager pm,
java.lang.Object resultSet,
int[] exprIndex)
Obtains a value from resultSet
at position specified by exprIndex. |
DatastoreContainerObject |
getDatastoreContainer()
Accessor for the datastore class (e.g in an RDBMS context, the Table) |
double |
getDouble(PersistenceManager pm,
java.lang.Object resultSet,
int[] exprIndex)
Obtains a value from resultSet
at position specified by exprIndex. |
float |
getFloat(PersistenceManager pm,
java.lang.Object resultSet,
int[] exprIndex)
Obtains a value from resultSet
at position specified by exprIndex. |
int |
getInt(PersistenceManager pm,
java.lang.Object resultSet,
int[] exprIndex)
Obtains a value from resultSet
at position specified by exprIndex. |
long |
getLong(PersistenceManager pm,
java.lang.Object resultSet,
int[] exprIndex)
Obtains a value from resultSet
at position specified by exprIndex. |
java.lang.Object |
getObject(PersistenceManager pm,
java.lang.Object resultSet,
int[] exprIndex)
Obtains a value from resultSet
at position specified by exprIndex. |
short |
getShort(PersistenceManager pm,
java.lang.Object resultSet,
int[] exprIndex)
Obtains a value from resultSet
at position specified by exprIndex. |
java.lang.String |
getString(PersistenceManager pm,
java.lang.Object resultSet,
int[] exprIndex)
Obtains a value from resultSet
at position specified by exprIndex. |
boolean |
hasValue()
Acccessor for whether the fixed value is set. |
boolean |
includeInFetchStatement()
Accessor for the string to put in any retrieval datastore statement for this field. |
boolean |
includeInInsertStatement()
This mapping is included in the insert statement. |
boolean |
includeInUpdateStatement()
This mapping is included in the update statement. |
protected void |
prepareDatastoreMapping()
Method to prepare a field mapping for use in the datastore. |
void |
setBoolean(PersistenceManager pm,
java.lang.Object preparedStatement,
int[] exprIndex,
boolean value)
Sets a value into preparedStatement
at position specified by exprIndex. |
void |
setByte(PersistenceManager pm,
java.lang.Object preparedStatement,
int[] exprIndex,
byte value)
Sets a value into preparedStatement
at position specified by exprIndex. |
void |
setChar(PersistenceManager pm,
java.lang.Object preparedStatement,
int[] exprIndex,
char value)
Sets a value into preparedStatement
at position specified by exprIndex. |
void |
setDouble(PersistenceManager pm,
java.lang.Object preparedStatement,
int[] exprIndex,
double value)
Sets a value into preparedStatement
at position specified by exprIndex. |
void |
setFloat(PersistenceManager pm,
java.lang.Object preparedStatement,
int[] exprIndex,
float value)
Sets a value into preparedStatement
at position specified by exprIndex. |
void |
setInt(PersistenceManager pm,
java.lang.Object preparedStatement,
int[] exprIndex,
int value)
Sets a value into preparedStatement
at position specified by exprIndex. |
void |
setLong(PersistenceManager pm,
java.lang.Object preparedStatement,
int[] exprIndex,
long value)
Sets a value into preparedStatement
at position specified by exprIndex. |
void |
setObject(PersistenceManager pm,
java.lang.Object preparedStatement,
int[] exprIndex,
java.lang.Object value)
Sets a value into preparedStatement
at position specified by exprIndex. |
void |
setShort(PersistenceManager pm,
java.lang.Object preparedStatement,
int[] exprIndex,
short value)
Sets a value into preparedStatement
at position specified by exprIndex. |
void |
setString(PersistenceManager pm,
java.lang.Object preparedStatement,
int[] exprIndex,
java.lang.String value)
Sets a value into preparedStatement
at position specified by exprIndex. |
| Methods inherited from class org.jpox.store.mapping.JavaTypeMapping |
|---|
addDataStoreMapping, failureMessage, getDataStoreMapping, getDataStoreMappings, getFieldMetaData, getJavaType, getNumberOfDatastoreFields, getObject, getReferenceMapping, getSampleValue, getType, isNullable, newLiteral, newScalarExpression, setDefault, setObject, setReferenceMapping |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected TypeInfo typeInfo
protected DatastoreContainerObject datastoreContainer
| Constructor Detail |
|---|
public SingleFieldMapping(DatastoreAdapter dba,
java.lang.String type)
dba - Datastore Adaptertype - Type of the field
public SingleFieldMapping(DatastoreAdapter dba,
AbstractPropertyMetaData fmd,
DatastoreContainerObject datastoreContainer)
dba - Datastore Adapterfmd - AbstractPropertyMetaData for the field being mappeddatastoreContainer - Table containing the mapped object
public SingleFieldMapping(DatastoreAdapter dba,
FieldMetaData fmd,
DatastoreContainerObject datastoreContainer,
boolean initDatastoreMappings)
dba - Datastroe Adapterfmd - FieldMetaData for the field to be mappeddatastoreContainer - Table containing the mapped fieldinitDatastoreMappings - Whether to initialise the datastore mappings (create the columns etc)| Method Detail |
|---|
public boolean hasValue()
protected void prepareDatastoreMapping()
public DatastoreContainerObject getDatastoreContainer()
getDatastoreContainer in class JavaTypeMappingpublic boolean includeInFetchStatement()
includeInFetchStatement in class JavaTypeMappingpublic boolean includeInUpdateStatement()
includeInUpdateStatement in class JavaTypeMappingpublic boolean includeInInsertStatement()
includeInInsertStatement in class JavaTypeMappingpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - The object to compare with
public void setBoolean(PersistenceManager pm,
java.lang.Object preparedStatement,
int[] exprIndex,
boolean value)
JavaTypeMappingvalue into preparedStatement
at position specified by exprIndex.
setBoolean in class JavaTypeMappingpm - the PersistenceManagerpreparedStatement - a datastore object that executes statements in the databaseexprIndex - the position of the value in the statementvalue - the value
public boolean getBoolean(PersistenceManager pm,
java.lang.Object resultSet,
int[] exprIndex)
JavaTypeMappingresultSet
at position specified by exprIndex.
getBoolean in class JavaTypeMappingpm - the PersistenceManagerresultSet - an object returned from the datastore with valuesexprIndex - the position of the value in the result
public void setChar(PersistenceManager pm,
java.lang.Object preparedStatement,
int[] exprIndex,
char value)
JavaTypeMappingvalue into preparedStatement
at position specified by exprIndex.
setChar in class JavaTypeMappingpm - the PersistenceManagerpreparedStatement - a datastore object that executes statements in the databaseexprIndex - the position of the value in the statementvalue - the value
public char getChar(PersistenceManager pm,
java.lang.Object resultSet,
int[] exprIndex)
JavaTypeMappingresultSet
at position specified by exprIndex.
getChar in class JavaTypeMappingpm - the PersistenceManagerresultSet - an object returned from the datastore with valuesexprIndex - the position of the value in the result
public void setByte(PersistenceManager pm,
java.lang.Object preparedStatement,
int[] exprIndex,
byte value)
JavaTypeMappingvalue into preparedStatement
at position specified by exprIndex.
setByte in class JavaTypeMappingpm - the PersistenceManagerpreparedStatement - a datastore object that executes statements in the databaseexprIndex - the position of the value in the statementvalue - the value
public byte getByte(PersistenceManager pm,
java.lang.Object resultSet,
int[] exprIndex)
JavaTypeMappingresultSet
at position specified by exprIndex.
getByte in class JavaTypeMappingpm - the PersistenceManagerresultSet - an object returned from the datastore with valuesexprIndex - the position of the value in the result
public void setShort(PersistenceManager pm,
java.lang.Object preparedStatement,
int[] exprIndex,
short value)
JavaTypeMappingvalue into preparedStatement
at position specified by exprIndex.
setShort in class JavaTypeMappingpm - the PersistenceManagerpreparedStatement - a datastore object that executes statements in the databaseexprIndex - the position of the value in the statementvalue - the value
public short getShort(PersistenceManager pm,
java.lang.Object resultSet,
int[] exprIndex)
JavaTypeMappingresultSet
at position specified by exprIndex.
getShort in class JavaTypeMappingpm - the PersistenceManagerresultSet - an object returned from the datastore with valuesexprIndex - the position of the value in the result
public void setInt(PersistenceManager pm,
java.lang.Object preparedStatement,
int[] exprIndex,
int value)
JavaTypeMappingvalue into preparedStatement
at position specified by exprIndex.
setInt in class JavaTypeMappingpm - the PersistenceManagerpreparedStatement - a datastore object that executes statements in the databaseexprIndex - the position of the value in the statementvalue - the value
public int getInt(PersistenceManager pm,
java.lang.Object resultSet,
int[] exprIndex)
JavaTypeMappingresultSet
at position specified by exprIndex.
getInt in class JavaTypeMappingpm - the PersistenceManagerresultSet - an object returned from the datastore with valuesexprIndex - the position of the value in the result
public void setLong(PersistenceManager pm,
java.lang.Object preparedStatement,
int[] exprIndex,
long value)
JavaTypeMappingvalue into preparedStatement
at position specified by exprIndex.
setLong in class JavaTypeMappingpm - the PersistenceManagerpreparedStatement - a datastore object that executes statements in the databaseexprIndex - the position of the value in the statementvalue - the value
public long getLong(PersistenceManager pm,
java.lang.Object resultSet,
int[] exprIndex)
JavaTypeMappingresultSet
at position specified by exprIndex.
getLong in class JavaTypeMappingpm - the PersistenceManagerresultSet - an object returned from the datastore with valuesexprIndex - the position of the value in the result
public void setFloat(PersistenceManager pm,
java.lang.Object preparedStatement,
int[] exprIndex,
float value)
JavaTypeMappingvalue into preparedStatement
at position specified by exprIndex.
setFloat in class JavaTypeMappingpm - the PersistenceManagerpreparedStatement - a datastore object that executes statements in the databaseexprIndex - the position of the value in the statementvalue - the value
public float getFloat(PersistenceManager pm,
java.lang.Object resultSet,
int[] exprIndex)
JavaTypeMappingresultSet
at position specified by exprIndex.
getFloat in class JavaTypeMappingpm - the PersistenceManagerresultSet - an object returned from the datastore with valuesexprIndex - the position of the value in the result
public void setDouble(PersistenceManager pm,
java.lang.Object preparedStatement,
int[] exprIndex,
double value)
JavaTypeMappingvalue into preparedStatement
at position specified by exprIndex.
setDouble in class JavaTypeMappingpm - the PersistenceManagerpreparedStatement - a datastore object that executes statements in the databaseexprIndex - the position of the value in the statementvalue - the value
public double getDouble(PersistenceManager pm,
java.lang.Object resultSet,
int[] exprIndex)
JavaTypeMappingresultSet
at position specified by exprIndex.
getDouble in class JavaTypeMappingpm - the PersistenceManagerresultSet - an object returned from the datastore with valuesexprIndex - the position of the value in the result
public void setString(PersistenceManager pm,
java.lang.Object preparedStatement,
int[] exprIndex,
java.lang.String value)
JavaTypeMappingvalue into preparedStatement
at position specified by exprIndex.
setString in class JavaTypeMappingpm - the PersistenceManagerpreparedStatement - a datastore object that executes statements in the databaseexprIndex - the position of the value in the statementvalue - the value
public java.lang.String getString(PersistenceManager pm,
java.lang.Object resultSet,
int[] exprIndex)
JavaTypeMappingresultSet
at position specified by exprIndex.
getString in class JavaTypeMappingpm - the PersistenceManagerresultSet - an object returned from the datastore with valuesexprIndex - the position of the value in the result
public void setObject(PersistenceManager pm,
java.lang.Object preparedStatement,
int[] exprIndex,
java.lang.Object value)
JavaTypeMappingvalue into preparedStatement
at position specified by exprIndex.
setObject in class JavaTypeMappingpm - the PersistenceManagerpreparedStatement - a datastore object that executes statements in the databaseexprIndex - the position of the value in the statementvalue - the value
public java.lang.Object getObject(PersistenceManager pm,
java.lang.Object resultSet,
int[] exprIndex)
JavaTypeMappingresultSet
at position specified by exprIndex.
getObject in class JavaTypeMappingpm - the PersistenceManagerresultSet - 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 | |||||||||