com.triactive.jdo.store.mapping
Class OracleClobMapping
java.lang.Object
com.triactive.jdo.store.mapping.Mapping
com.triactive.jdo.store.mapping.ColumnMapping
com.triactive.jdo.store.mapping.StringMapping
com.triactive.jdo.store.mapping.OracleClobMapping
- All Implemented Interfaces:
- PostInsertProcessing, PostUpdateProcessing, PostWriteProcessing
- public class OracleClobMapping
- extends StringMapping
- implements PostInsertProcessing, PostUpdateProcessing
Method Summary |
TypeInfo |
chooseColumnType(Column col)
Chooses an appropriate SQL type for a column based on the column's
options. |
java.lang.Object |
getObject(PersistenceManager pm,
java.sql.ResultSet rs,
int param)
|
java.lang.String |
getSqlInsertionValue()
Returns the SQL text to be included in INSERT statements when inserting
a value into this mapping's column. |
java.lang.String |
getSqlUpdateValue()
Returns the SQL text to be included in UPDATE statements when updating
a value in this mapping's column. |
java.lang.String |
getString(PersistenceManager pm,
java.sql.ResultSet rs,
int param)
|
void |
mapTo(Column col)
Links this mapping to a specific column. |
void |
postInsert(StateManager sm,
java.sql.Connection conn,
java.lang.Object value)
Called after a SQL INSERT has been performed. |
void |
postUpdate(StateManager sm,
java.sql.Connection conn,
java.lang.Object value)
Retrieve the empty CLOB locator created by the insert statement
and write out the current CLOB field value to the Oracle CLOB object |
void |
setObject(PersistenceManager pm,
java.sql.PreparedStatement ps,
int param,
java.lang.Object value)
|
void |
setString(PersistenceManager pm,
java.sql.PreparedStatement ps,
int param,
java.lang.String value)
|
Methods inherited from class com.triactive.jdo.store.mapping.ColumnMapping |
accessAsFieldIn, defineConstraints, defineStorage, equals, getBoolean, getByte, getChar, getColumn, getDouble, getFloat, getInt, getLong, getShort, getTypeInfo, hashCode, setBoolean, setByte, setChar, setDouble, setFloat, setInt, setLong, setShort |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
OracleClobMapping
public OracleClobMapping(DatabaseAdapter dba,
java.lang.Class type)
OracleClobMapping
public OracleClobMapping(DatabaseAdapter dba,
FieldMetaData fmd)
mapTo
public void mapTo(Column col)
- Description copied from class:
ColumnMapping
- Links this mapping to a specific column.
Linkage involves at least two steps:
- Calling the column's
Column.mapWith(com.triactive.jdo.store.mapping.ColumnMapping)
method
- Setting this mapping's
ColumnMapping.typeInfo
to match the column's
This method can be called at most once for a given mapping.
Subclasses may do extra work as a consequence of mapping themselves to a
column, but they should always call super.mapTo(col) first.
- Overrides:
mapTo
in class StringMapping
chooseColumnType
public TypeInfo chooseColumnType(Column col)
- Description copied from class:
ColumnMapping
- Chooses an appropriate SQL type for a column based on the column's
options.
- Overrides:
chooseColumnType
in class StringMapping
getSqlInsertionValue
public java.lang.String getSqlInsertionValue()
- Description copied from class:
ColumnMapping
- Returns the SQL text to be included in INSERT statements when inserting
a value into this mapping's column.
This is usually "?" to indicate a JDBC statement parameter.
- Overrides:
getSqlInsertionValue
in class ColumnMapping
getSqlUpdateValue
public java.lang.String getSqlUpdateValue()
- Description copied from class:
ColumnMapping
- Returns the SQL text to be included in UPDATE statements when updating
a value in this mapping's column.
This is usually "?" to indicate a JDBC statement parameter.
- Overrides:
getSqlUpdateValue
in class ColumnMapping
setString
public void setString(PersistenceManager pm,
java.sql.PreparedStatement ps,
int param,
java.lang.String value)
- Overrides:
setString
in class StringMapping
getString
public java.lang.String getString(PersistenceManager pm,
java.sql.ResultSet rs,
int param)
- Overrides:
getString
in class StringMapping
setObject
public void setObject(PersistenceManager pm,
java.sql.PreparedStatement ps,
int param,
java.lang.Object value)
- Overrides:
setObject
in class StringMapping
getObject
public java.lang.Object getObject(PersistenceManager pm,
java.sql.ResultSet rs,
int param)
- Overrides:
getObject
in class StringMapping
postInsert
public void postInsert(StateManager sm,
java.sql.Connection conn,
java.lang.Object value)
- Description copied from interface:
PostInsertProcessing
- Called after a SQL INSERT has been performed.
- Specified by:
postInsert
in interface PostInsertProcessing
- Parameters:
sm
- The state manager of the instance owning the Java object being
inserted.conn
- The connection on which the INSERT has been performed.value
- The column value being inserted.
postUpdate
public void postUpdate(StateManager sm,
java.sql.Connection conn,
java.lang.Object value)
- Retrieve the empty CLOB locator created by the insert statement
and write out the current CLOB field value to the Oracle CLOB object
- Specified by:
postUpdate
in interface PostUpdateProcessing
- Parameters:
sm
- The state manager of the instance owning the Java object being
updated.conn
- The connection on which the UPDATE has been performed.value
- The column value being updated.
Copyright © 2001-2007 The TJDO Project All Rights Reserved.