|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jpox.store.rdbms.mapping.RDBMSMapping
org.jpox.store.rdbms.mapping.ColumnMapping
org.jpox.store.rdbms.mapping.CharRDBMSMapping
Mapping of a CHAR RDBMS type.
Field Summary | |
protected static int |
CHAR_LENGTH
Default length of a CHAR column storing a Character/char. |
protected static int |
DATE_STRING_LENGTH
Default length of a CHAR column storing Date, based on JDBC date escape format: "YYYY-MM-DD". |
protected static int |
JAVA_UTIL_DATE_STRING_LENGTH
Default length of a CHAR column storing java.util.Date, based on JDBC date escape format "dow mon dd hh:mm:ss zzz yyyy" |
protected static int |
LOCALE_LENGTH
Default length of a CHAR column storing a Locale. |
protected static int |
TIME_STRING_LENGTH
Default length of a CHAR column storing Time, based on JDBC date escape format: "hh:mm:ss". |
protected static int |
TIMESTAMP_STRING_LENGTH
Default length of a CHAR column storing Timestamp, based on JDBC timestamp escape format "YYYY-MM-DD HH:MM:SS.FFFFFFFFF" |
protected static int |
TIMEZONE_LENGTH
Default length of a CHAR column storing a Timezone. |
Fields inherited from class org.jpox.store.rdbms.mapping.ColumnMapping |
column |
Fields inherited from class org.jpox.store.rdbms.mapping.RDBMSMapping |
LOCALISER, LOCALISER_STORE, mapping, storeMgr |
Constructor Summary | |
|
CharRDBMSMapping(JavaTypeMapping mapping,
StoreManager storeMgr,
DatastoreField field)
Constructor. |
protected |
CharRDBMSMapping(StoreManager storeMgr,
JavaTypeMapping mapping)
Constructor. |
Method Summary | |
boolean |
getBoolean(java.lang.Object rs,
int param)
Method to extract a boolean from the ResultSet at the specified position |
char |
getChar(java.lang.Object rs,
int param)
Method to extract a character from the ResultSet at the specified position |
DatastoreField |
getDatastoreField()
Accessor for the datastore field. |
java.util.Locale |
getLocale(java.lang.Object rs,
int param)
Method to extract a Locale from the ResultSet at the specified position |
java.lang.Object |
getObject(java.lang.Object rs,
int param)
Method to extract an object from the ResultSet at the specified position |
java.lang.String |
getString(java.lang.Object rs,
int param)
Method to extract a String from the ResultSet at the specified position |
java.util.TimeZone |
getTimeZone(java.lang.Object rs,
int param)
Accessor for the TimeZone. |
TypeInfo |
getTypeInfo()
Accessor for the JDBC type being stored here. |
protected void |
initialize()
Method to initialise the column mapping. |
void |
setBoolean(java.lang.Object ps,
int param,
boolean value)
Method to set a boolean at the specified position in the JDBC PreparedStatement. |
void |
setChar(java.lang.Object ps,
int param,
char value)
Method to set a character at the specified position in the JDBC PreparedStatement. |
void |
setLocale(java.lang.Object ps,
int param,
java.util.Locale value)
Method to set a Locale at the specified position in the JDBC PreparedStatement. |
void |
setObject(java.lang.Object ps,
int param,
java.lang.Object value)
Method to set an object at the specified position in the JDBC PreparedStatement. |
void |
setString(java.lang.Object ps,
int param,
java.lang.String value)
Method to set a String at the specified position in the JDBC PreparedStatement. |
void |
setTimeZone(java.lang.Object ps,
int param,
java.util.TimeZone value)
Mutator for the TimeZone object. |
Methods inherited from class org.jpox.store.rdbms.mapping.ColumnMapping |
equals, getColumn, getInsertionInputParameter, getUpdateInputParameter, hashCode, includeInFetchStatement, initTypeInfo, isNullable |
Methods inherited from class org.jpox.store.rdbms.mapping.RDBMSMapping |
failureMessage, getByte, getDatabaseAdapter, getDouble, getFloat, getInt, getJavaTypeMapping, getLong, getShort, setByte, setDouble, setFloat, setInt, setLong, setShort |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static final int CHAR_LENGTH
protected static final int LOCALE_LENGTH
protected static final int TIME_STRING_LENGTH
protected static final int DATE_STRING_LENGTH
protected static final int TIMESTAMP_STRING_LENGTH
protected static final int JAVA_UTIL_DATE_STRING_LENGTH
protected static final int TIMEZONE_LENGTH
Constructor Detail |
protected CharRDBMSMapping(StoreManager storeMgr, JavaTypeMapping mapping)
storeMgr
- Store Managermapping
- Java type mappingpublic CharRDBMSMapping(JavaTypeMapping mapping, StoreManager storeMgr, DatastoreField field)
mapping
- Java type mappingstoreMgr
- Store Managerfield
- Field to be mappedMethod Detail |
protected void initialize()
public TypeInfo getTypeInfo()
getTypeInfo
in class ColumnMapping
public DatastoreField getDatastoreField()
getDatastoreField
in interface DatastoreMapping
getDatastoreField
in class ColumnMapping
public void setTimeZone(java.lang.Object ps, int param, java.util.TimeZone value)
ps
- The statementparam
- The parameter idvalue
- The object valuepublic java.util.TimeZone getTimeZone(java.lang.Object rs, int param)
rs
- The Result Setparam
- The parameter id
public void setChar(java.lang.Object ps, int param, char value)
setChar
in interface DatastoreMapping
setChar
in class RDBMSMapping
ps
- The PreparedStatementparam
- Parameter positionvalue
- The value to setpublic char getChar(java.lang.Object rs, int param)
getChar
in interface DatastoreMapping
getChar
in class RDBMSMapping
rs
- The Result Setparam
- The parameter position
public void setLocale(java.lang.Object ps, int param, java.util.Locale value)
ps
- The PreparedStatementparam
- Parameter positionvalue
- The value to setpublic java.util.Locale getLocale(java.lang.Object rs, int param)
rs
- The Result Setparam
- The parameter position
public void setString(java.lang.Object ps, int param, java.lang.String value)
setString
in interface DatastoreMapping
setString
in class RDBMSMapping
ps
- The PreparedStatementparam
- Parameter positionvalue
- The value to setpublic java.lang.String getString(java.lang.Object rs, int param)
getString
in interface DatastoreMapping
getString
in class RDBMSMapping
rs
- The Result Setparam
- The parameter position
public void setBoolean(java.lang.Object ps, int param, boolean value)
setBoolean
in interface DatastoreMapping
setBoolean
in class RDBMSMapping
ps
- The PreparedStatementparam
- Parameter positionvalue
- The value to setpublic boolean getBoolean(java.lang.Object rs, int param)
getBoolean
in interface DatastoreMapping
getBoolean
in class RDBMSMapping
rs
- The Result Setparam
- The parameter position
public void setObject(java.lang.Object ps, int param, java.lang.Object value)
setObject
in interface DatastoreMapping
setObject
in class RDBMSMapping
ps
- The PreparedStatementparam
- Parameter positionvalue
- The value to setpublic java.lang.Object getObject(java.lang.Object rs, int param)
getObject
in interface DatastoreMapping
getObject
in class RDBMSMapping
rs
- The Result Setparam
- The parameter position
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |