|
||||||||||
PREV CLASS (src) NEXT CLASS (src) | 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. |
java.lang.Object |
getLockedValue(EntityEnterpriseContext (src) ctx)
|
java.lang.reflect.Field |
getPrimaryKeyField()
Gets the field of the primary key object in which the value of this field is stored. |
java.lang.Object |
getPrimaryKeyValue(java.lang.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(java.sql.ResultSet rs,
int parameterIndex,
java.lang.Object[] pkRef)
Loads the data from result set into the primary key object. |
void |
lockInstanceValue(EntityEnterpriseContext (src) ctx)
Optimistically locks field value. |
int |
setArgumentParameters(java.sql.PreparedStatement ps,
int parameterIndex,
java.lang.Object arg)
Sets the prepared statement parameters with the data from the object. |
void |
setLockingStrategy(LockingStrategy (src) lockingStrategy)
|
int |
setPrimaryKeyParameters(java.sql.PreparedStatement ps,
int parameterIndex,
java.lang.Object primaryKey)
Sets the prepared statement parameters with the data from the primary key. |
java.lang.Object |
setPrimaryKeyValue(java.lang.Object primaryKey,
java.lang.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 (src) |
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 (src) |
getFieldName, getValue, setValue |
Methods inherited from interface org.jboss.ejb.plugins.cmp.bridge.CMPFieldBridge (src) |
getFieldType |
Method Detail |
public int getTableIndex()
public byte getDefaultFlags()
public void addDefaultFlag(byte flag)
flag
- public java.lang.Object getLockedValue(EntityEnterpriseContext (src) ctx)
ctx
- instance's context
public void lockInstanceValue(EntityEnterpriseContext (src) ctx)
public void setLockingStrategy(LockingStrategy (src) lockingStrategy)
lockingStrategy
- locking strategy assigned to the fieldpublic java.lang.reflect.Field getPrimaryKeyField()
public java.lang.Object getPrimaryKeyValue(java.lang.Object primaryKey) throws java.lang.IllegalArgumentException
getPrimaryKeyValue
in interface JDBCFieldBridge (src)
primaryKey
- the primary key object from which this fields value
will be extracted
java.lang.IllegalArgumentException
public boolean isRelationTableField()
public java.lang.Object setPrimaryKeyValue(java.lang.Object primaryKey, java.lang.Object value) throws java.lang.IllegalArgumentException
primaryKey
- the primary key object which the value
will be insertedvalue
- the value for field that will be set in the pk
java.lang.IllegalArgumentException
public int setPrimaryKeyParameters(java.sql.PreparedStatement ps, int parameterIndex, java.lang.Object primaryKey) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public int setArgumentParameters(java.sql.PreparedStatement ps, int parameterIndex, java.lang.Object arg)
public int loadPrimaryKeyResults(java.sql.ResultSet rs, int parameterIndex, java.lang.Object[] pkRef) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
|
||||||||||
PREV CLASS (src) NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |