|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jpox.store.rdbms.mapping.RDBMSMapping
public abstract class RDBMSMapping
Implementation of the mapping of an RDBMS type.
| Field Summary | |
|---|---|
protected static Localiser |
LOCALISER
|
protected static Localiser |
LOCALISER_STORE
|
protected JavaTypeMapping |
mapping
Mapping of the Java type. |
protected StoreManager |
storeMgr
Store Manager to use for mapping. |
| Constructor Summary | |
|---|---|
protected |
RDBMSMapping(StoreManager storeMgr,
JavaTypeMapping mapping)
Create a new Mapping with the given DatabaseAdapter for the given type. |
| Method Summary | |
|---|---|
protected java.lang.String |
failureMessage(java.lang.String method)
Utility to output any error message. |
boolean |
getBoolean(java.lang.Object resultSet,
int exprIndex)
Obtains a value from resultSet
at position specified by exprIndex. |
byte |
getByte(java.lang.Object resultSet,
int exprIndex)
Obtains a value from resultSet
at position specified by exprIndex. |
char |
getChar(java.lang.Object resultSet,
int exprIndex)
Obtains a value from resultSet
at position specified by exprIndex. |
protected RDBMSAdapter |
getDatabaseAdapter()
Convenience to access the Datastore adapter as a DatabaseAdapter. |
double |
getDouble(java.lang.Object resultSet,
int exprIndex)
Obtains a value from resultSet
at position specified by exprIndex. |
float |
getFloat(java.lang.Object resultSet,
int exprIndex)
Obtains a value from resultSet
at position specified by exprIndex. |
abstract java.lang.String |
getInsertionInputParameter()
Accessor for the string to put in any retrieval datastore statement for this field. |
int |
getInt(java.lang.Object resultSet,
int exprIndex)
Obtains a value from resultSet
at position specified by exprIndex. |
JavaTypeMapping |
getJavaTypeMapping()
Accessor for the java type mapping |
long |
getLong(java.lang.Object resultSet,
int exprIndex)
Obtains a value from resultSet
at position specified by exprIndex. |
java.lang.Object |
getObject(java.lang.Object resultSet,
int exprIndex)
Obtains a value from resultSet
at position specified by exprIndex. |
short |
getShort(java.lang.Object resultSet,
int exprIndex)
Obtains a value from resultSet
at position specified by exprIndex. |
java.lang.String |
getString(java.lang.Object resultSet,
int exprIndex)
Obtains a value from resultSet
at position specified by exprIndex. |
abstract TypeInfo |
getTypeInfo()
Accessor for the type info for this datastore type. |
abstract java.lang.String |
getUpdateInputParameter()
Accessor for the string to put in any update datastore statements for this field. |
abstract boolean |
includeInFetchStatement()
Whether this mapping is included in the fetch statement. |
abstract boolean |
isNullable()
Accessor for whether the mapping is nullable. |
void |
setBoolean(java.lang.Object preparedStatement,
int exprIndex,
boolean value)
Sets a value into preparedStatement
at position specified by paramIndex. |
void |
setByte(java.lang.Object preparedStatement,
int exprIndex,
byte value)
Sets a value into preparedStatement
at position specified by paramIndex. |
void |
setChar(java.lang.Object preparedStatement,
int exprIndex,
char value)
Sets a value into preparedStatement
at position specified by paramIndex. |
void |
setDouble(java.lang.Object preparedStatement,
int exprIndex,
double value)
Sets a value into preparedStatement
at position specified by paramIndex. |
void |
setFloat(java.lang.Object preparedStatement,
int exprIndex,
float value)
Sets a value into preparedStatement
at position specified by paramIndex. |
void |
setInt(java.lang.Object preparedStatement,
int exprIndex,
int value)
Sets a value into preparedStatement
at position specified by paramIndex. |
void |
setLong(java.lang.Object preparedStatement,
int exprIndex,
long value)
Sets a value into preparedStatement
at position specified by paramIndex. |
void |
setObject(java.lang.Object preparedStatement,
int exprIndex,
java.lang.Object value)
Sets a value into preparedStatement
at position specified by paramIndex. |
void |
setShort(java.lang.Object preparedStatement,
int exprIndex,
short value)
Sets a value into preparedStatement
at position specified by paramIndex. |
void |
setString(java.lang.Object preparedStatement,
int exprIndex,
java.lang.String value)
Sets a value into preparedStatement
at position specified by paramIndex. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.jpox.store.mapping.DatastoreMapping |
|---|
getDatastoreField |
| Field Detail |
|---|
protected static final Localiser LOCALISER_STORE
protected static final Localiser LOCALISER
protected final StoreManager storeMgr
protected final JavaTypeMapping mapping
| Constructor Detail |
|---|
protected RDBMSMapping(StoreManager storeMgr,
JavaTypeMapping mapping)
storeMgr - The Store Manager that this Mapping should use.mapping - The Class that this mapping maps to the database.| Method Detail |
|---|
protected RDBMSAdapter getDatabaseAdapter()
public JavaTypeMapping getJavaTypeMapping()
getJavaTypeMapping in interface DatastoreMappingpublic abstract TypeInfo getTypeInfo()
public abstract boolean isNullable()
isNullable in interface DatastoreMappingpublic abstract boolean includeInFetchStatement()
public abstract java.lang.String getInsertionInputParameter()
public abstract java.lang.String getUpdateInputParameter()
protected java.lang.String failureMessage(java.lang.String method)
method - The method that failed.
public void setBoolean(java.lang.Object preparedStatement,
int exprIndex,
boolean value)
DatastoreMappingvalue into preparedStatement
at position specified by paramIndex.
setBoolean in interface DatastoreMappingpreparedStatement - a datastore object that executes statements in the databaseexprIndex - the position of the value in the statementvalue - the value
public boolean getBoolean(java.lang.Object resultSet,
int exprIndex)
DatastoreMappingresultSet
at position specified by exprIndex.
getBoolean in interface DatastoreMappingresultSet - an object returned from the datastore with valuesexprIndex - the position of the value in the result
public void setChar(java.lang.Object preparedStatement,
int exprIndex,
char value)
DatastoreMappingvalue into preparedStatement
at position specified by paramIndex.
setChar in interface DatastoreMappingpreparedStatement - a datastore object that executes statements in the databaseexprIndex - the position of the value in the statementvalue - the value
public char getChar(java.lang.Object resultSet,
int exprIndex)
DatastoreMappingresultSet
at position specified by exprIndex.
getChar in interface DatastoreMappingresultSet - an object returned from the datastore with valuesexprIndex - the position of the value in the result
public void setByte(java.lang.Object preparedStatement,
int exprIndex,
byte value)
DatastoreMappingvalue into preparedStatement
at position specified by paramIndex.
setByte in interface DatastoreMappingpreparedStatement - a datastore object that executes statements in the databaseexprIndex - the position of the value in the statementvalue - the value
public byte getByte(java.lang.Object resultSet,
int exprIndex)
DatastoreMappingresultSet
at position specified by exprIndex.
getByte in interface DatastoreMappingresultSet - an object returned from the datastore with valuesexprIndex - the position of the value in the result
public void setShort(java.lang.Object preparedStatement,
int exprIndex,
short value)
DatastoreMappingvalue into preparedStatement
at position specified by paramIndex.
setShort in interface DatastoreMappingpreparedStatement - a datastore object that executes statements in the databaseexprIndex - the position of the value in the statementvalue - the value
public short getShort(java.lang.Object resultSet,
int exprIndex)
DatastoreMappingresultSet
at position specified by exprIndex.
getShort in interface DatastoreMappingresultSet - an object returned from the datastore with valuesexprIndex - the position of the value in the result
public void setInt(java.lang.Object preparedStatement,
int exprIndex,
int value)
DatastoreMappingvalue into preparedStatement
at position specified by paramIndex.
setInt in interface DatastoreMappingpreparedStatement - a datastore object that executes statements in the databaseexprIndex - the position of the value in the statementvalue - the value
public int getInt(java.lang.Object resultSet,
int exprIndex)
DatastoreMappingresultSet
at position specified by exprIndex.
getInt in interface DatastoreMappingresultSet - an object returned from the datastore with valuesexprIndex - the position of the value in the result
public void setLong(java.lang.Object preparedStatement,
int exprIndex,
long value)
DatastoreMappingvalue into preparedStatement
at position specified by paramIndex.
setLong in interface DatastoreMappingpreparedStatement - a datastore object that executes statements in the databaseexprIndex - the position of the value in the statementvalue - the value
public long getLong(java.lang.Object resultSet,
int exprIndex)
DatastoreMappingresultSet
at position specified by exprIndex.
getLong in interface DatastoreMappingresultSet - an object returned from the datastore with valuesexprIndex - the position of the value in the result
public void setFloat(java.lang.Object preparedStatement,
int exprIndex,
float value)
DatastoreMappingvalue into preparedStatement
at position specified by paramIndex.
setFloat in interface DatastoreMappingpreparedStatement - a datastore object that executes statements in the databaseexprIndex - the position of the value in the statementvalue - the value
public float getFloat(java.lang.Object resultSet,
int exprIndex)
DatastoreMappingresultSet
at position specified by exprIndex.
getFloat in interface DatastoreMappingresultSet - an object returned from the datastore with valuesexprIndex - the position of the value in the result
public void setDouble(java.lang.Object preparedStatement,
int exprIndex,
double value)
DatastoreMappingvalue into preparedStatement
at position specified by paramIndex.
setDouble in interface DatastoreMappingpreparedStatement - a datastore object that executes statements in the databaseexprIndex - the position of the value in the statementvalue - the value
public double getDouble(java.lang.Object resultSet,
int exprIndex)
DatastoreMappingresultSet
at position specified by exprIndex.
getDouble in interface DatastoreMappingresultSet - an object returned from the datastore with valuesexprIndex - the position of the value in the result
public void setString(java.lang.Object preparedStatement,
int exprIndex,
java.lang.String value)
DatastoreMappingvalue into preparedStatement
at position specified by paramIndex.
setString in interface DatastoreMappingpreparedStatement - a datastore object that executes statements in the databaseexprIndex - the position of the value in the statementvalue - the value
public java.lang.String getString(java.lang.Object resultSet,
int exprIndex)
DatastoreMappingresultSet
at position specified by exprIndex.
getString in interface DatastoreMappingresultSet - an object returned from the datastore with valuesexprIndex - the position of the value in the result
public void setObject(java.lang.Object preparedStatement,
int exprIndex,
java.lang.Object value)
DatastoreMappingvalue into preparedStatement
at position specified by paramIndex.
setObject in interface DatastoreMappingpreparedStatement - a datastore object that executes statements in the databaseexprIndex - the position of the value in the statementvalue - the value
public java.lang.Object getObject(java.lang.Object resultSet,
int exprIndex)
DatastoreMappingresultSet
at position specified by exprIndex.
getObject in interface DatastoreMappingresultSet - 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 | |||||||||