|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jpox.store.rdbms.mapping.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 DatastoreMapping
public abstract TypeInfo getTypeInfo()
public abstract boolean isNullable()
isNullable
in interface DatastoreMapping
public 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)
DatastoreMapping
value
into preparedStatement
at position specified by paramIndex
.
setBoolean
in interface DatastoreMapping
preparedStatement
- a datastore object that executes statements in the databaseexprIndex
- the position of the value in the statementvalue
- the valuepublic boolean getBoolean(java.lang.Object resultSet, int exprIndex)
DatastoreMapping
resultSet
at position specified by exprIndex
.
getBoolean
in interface DatastoreMapping
resultSet
- 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)
DatastoreMapping
value
into preparedStatement
at position specified by paramIndex
.
setChar
in interface DatastoreMapping
preparedStatement
- a datastore object that executes statements in the databaseexprIndex
- the position of the value in the statementvalue
- the valuepublic char getChar(java.lang.Object resultSet, int exprIndex)
DatastoreMapping
resultSet
at position specified by exprIndex
.
getChar
in interface DatastoreMapping
resultSet
- 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)
DatastoreMapping
value
into preparedStatement
at position specified by paramIndex
.
setByte
in interface DatastoreMapping
preparedStatement
- a datastore object that executes statements in the databaseexprIndex
- the position of the value in the statementvalue
- the valuepublic byte getByte(java.lang.Object resultSet, int exprIndex)
DatastoreMapping
resultSet
at position specified by exprIndex
.
getByte
in interface DatastoreMapping
resultSet
- 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)
DatastoreMapping
value
into preparedStatement
at position specified by paramIndex
.
setShort
in interface DatastoreMapping
preparedStatement
- a datastore object that executes statements in the databaseexprIndex
- the position of the value in the statementvalue
- the valuepublic short getShort(java.lang.Object resultSet, int exprIndex)
DatastoreMapping
resultSet
at position specified by exprIndex
.
getShort
in interface DatastoreMapping
resultSet
- 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)
DatastoreMapping
value
into preparedStatement
at position specified by paramIndex
.
setInt
in interface DatastoreMapping
preparedStatement
- a datastore object that executes statements in the databaseexprIndex
- the position of the value in the statementvalue
- the valuepublic int getInt(java.lang.Object resultSet, int exprIndex)
DatastoreMapping
resultSet
at position specified by exprIndex
.
getInt
in interface DatastoreMapping
resultSet
- 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)
DatastoreMapping
value
into preparedStatement
at position specified by paramIndex
.
setLong
in interface DatastoreMapping
preparedStatement
- a datastore object that executes statements in the databaseexprIndex
- the position of the value in the statementvalue
- the valuepublic long getLong(java.lang.Object resultSet, int exprIndex)
DatastoreMapping
resultSet
at position specified by exprIndex
.
getLong
in interface DatastoreMapping
resultSet
- 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)
DatastoreMapping
value
into preparedStatement
at position specified by paramIndex
.
setFloat
in interface DatastoreMapping
preparedStatement
- a datastore object that executes statements in the databaseexprIndex
- the position of the value in the statementvalue
- the valuepublic float getFloat(java.lang.Object resultSet, int exprIndex)
DatastoreMapping
resultSet
at position specified by exprIndex
.
getFloat
in interface DatastoreMapping
resultSet
- 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)
DatastoreMapping
value
into preparedStatement
at position specified by paramIndex
.
setDouble
in interface DatastoreMapping
preparedStatement
- a datastore object that executes statements in the databaseexprIndex
- the position of the value in the statementvalue
- the valuepublic double getDouble(java.lang.Object resultSet, int exprIndex)
DatastoreMapping
resultSet
at position specified by exprIndex
.
getDouble
in interface DatastoreMapping
resultSet
- 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)
DatastoreMapping
value
into preparedStatement
at position specified by paramIndex
.
setString
in interface DatastoreMapping
preparedStatement
- a datastore object that executes statements in the databaseexprIndex
- the position of the value in the statementvalue
- the valuepublic java.lang.String getString(java.lang.Object resultSet, int exprIndex)
DatastoreMapping
resultSet
at position specified by exprIndex
.
getString
in interface DatastoreMapping
resultSet
- 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)
DatastoreMapping
value
into preparedStatement
at position specified by paramIndex
.
setObject
in interface DatastoreMapping
preparedStatement
- a datastore object that executes statements in the databaseexprIndex
- the position of the value in the statementvalue
- the valuepublic java.lang.Object getObject(java.lang.Object resultSet, int exprIndex)
DatastoreMapping
resultSet
at position specified by exprIndex
.
getObject
in interface DatastoreMapping
resultSet
- 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 |