|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
JDBCCMPFieldBridge represents one CMP field. This implementations of this interface handles setting are responsible for setting statement parameters and loading results for instance values and primary keys. Life-cycle: Tied to the EntityBridge. Multiplicity: One for each entity bean cmp field.
Method Summary | |
void |
addDefaultFlag(byte flag)
TODO: Get rid of it |
byte |
getDefaultFlags()
Returns the default field flags. |
Object |
getLockedValue(EntityEnterpriseContext ctx)
|
Field |
getPrimaryKeyField()
Gets the field of the primary key object in which the value of this field is stored. |
Object |
getPrimaryKeyValue(Object primaryKey)
Gets the value of this field in the specified primaryKey object. |
int |
getTableIndex()
The index of the field among the table fields. |
boolean |
isRelationTableField()
|
int |
loadPrimaryKeyResults(ResultSet rs,
int parameterIndex,
Object[] pkRef)
Loads the data from result set into the primary key object. |
void |
lockInstanceValue(EntityEnterpriseContext ctx)
Optimistically locks field value. |
int |
setArgumentParameters(PreparedStatement ps,
int parameterIndex,
Object arg)
Sets the prepared statement parameters with the data from the object. |
void |
setLockingStrategy(LockingStrategy lockingStrategy)
|
int |
setPrimaryKeyParameters(PreparedStatement ps,
int parameterIndex,
Object primaryKey)
Sets the prepared statement parameters with the data from the primary key. |
Object |
setPrimaryKeyValue(Object primaryKey,
Object value)
Sets the value of this field to the specified value in the specified primaryKey object. |
Methods inherited from interface org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCFieldBridge |
getInstanceValue, getJDBCType, getManager, initInstance, isCMPField, isDirty, isLoaded, isPrimaryKeyMember, isReadOnly, isReadTimedOut, loadArgumentResults, loadInstanceResults, resetPersistenceContext, setClean, setInstanceParameters, setInstanceValue |
Methods inherited from interface org.jboss.ejb.plugins.cmp.bridge.FieldBridge |
getFieldName, getValue, setValue |
Methods inherited from interface org.jboss.ejb.plugins.cmp.bridge.CMPFieldBridge |
getFieldType |
Method Detail |
public int getTableIndex()
public byte getDefaultFlags()
public void addDefaultFlag(byte flag)
flag
- public Object getLockedValue(EntityEnterpriseContext ctx)
ctx
- instance's context
public void lockInstanceValue(EntityEnterpriseContext ctx)
public void setLockingStrategy(LockingStrategy lockingStrategy)
lockingStrategy
- locking strategy assigned to the fieldpublic Field getPrimaryKeyField()
public Object getPrimaryKeyValue(Object primaryKey) throws IllegalArgumentException
getPrimaryKeyValue
in interface JDBCFieldBridge
primaryKey
- the primary key object from which this fields value
will be extracted
IllegalArgumentException
public boolean isRelationTableField()
public Object setPrimaryKeyValue(Object primaryKey, Object value) throws IllegalArgumentException
primaryKey
- the primary key object which the value
will be insertedvalue
- the value for field that will be set in the pk
IllegalArgumentException
public int setPrimaryKeyParameters(PreparedStatement ps, int parameterIndex, Object primaryKey) throws IllegalArgumentException
IllegalArgumentException
public int setArgumentParameters(PreparedStatement ps, int parameterIndex, Object arg)
public int loadPrimaryKeyResults(ResultSet rs, int parameterIndex, Object[] pkRef) throws IllegalArgumentException
IllegalArgumentException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |