public abstract class JDBCAbstractCMPFieldBridge extends Object implements JDBCCMPFieldBridge
Revisions:
20021023 Steve Coy:
loadArgumentResults(java.sql.ResultSet, int, java.lang.Object[]) so that it passes the jdbc type to
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
checkDirtyAfterGet |
protected byte |
defaultFlags |
protected String |
fieldName |
protected int |
jdbcContextIndex |
protected org.jboss.logging.Logger |
log |
protected JDBCStoreManager |
manager |
protected boolean |
primaryKeyMember |
protected boolean |
readOnly |
protected long |
readTimeOut |
protected CMPFieldStateFactory |
stateFactory |
protected int |
tableIndex |
| Constructor and Description |
|---|
JDBCAbstractCMPFieldBridge(JDBCStoreManager manager,
JDBCCMPFieldMetaData metadata) |
JDBCAbstractCMPFieldBridge(JDBCStoreManager manager,
JDBCCMPFieldMetaData metadata,
JDBCType jdbcType) |
JDBCAbstractCMPFieldBridge(JDBCStoreManager manager,
String fieldName,
Class fieldType,
JDBCType jdbcType,
boolean readOnly,
long readTimeOut,
Class primaryKeyClass,
Field primaryKeyField,
int jdbcContextIndex,
int tableIndex,
boolean checkDirtyAfterGet,
CMPFieldStateFactory stateFactory) |
| Modifier and Type | Method and Description |
|---|---|
void |
addDefaultFlag(byte flag)
get rid of it later
|
byte |
getDefaultFlags()
Returns the default field flags.
|
int |
getFieldIndex() |
String |
getFieldName()
Gets the name of this field.
|
Class |
getFieldType() |
JDBCType |
getJDBCType()
Gets the JDBC type of this field.
|
JDBCEntityPersistenceStore |
getManager() |
Class |
getPrimaryKeyClass() |
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.
|
long |
getReadTimeOut() |
int |
getTableIndex()
The index of the field among the table fields.
|
Object |
getValue(CmpEntityBeanContext ctx)
Gets the value of this field for the specified instance context.
|
void |
initInstance(CmpEntityBeanContext ctx)
Set CMPFieldValue to Java default value (i.e., 0 or null).
|
boolean |
isCMPField() |
boolean |
isPrimaryKeyMember()
Is this field a member of the primary key.
|
boolean |
isReadOnly()
Is this field read only.
|
boolean |
isRelationTableField() |
int |
loadArgumentResults(ResultSet rs,
int parameterIndex,
Object[] argumentRef)
Loads the value of this cmp field from result set into argument reference.
|
int |
loadInstanceResults(ResultSet rs,
int parameterIndex,
CmpEntityBeanContext ctx)
Loads the data from result set into the instance associated with
the specified context.
|
int |
loadPrimaryKeyResults(ResultSet rs,
int parameterIndex,
Object[] pkRef)
Loads the data from result set into the primary key object.
|
abstract void |
resetPersistenceContext(CmpEntityBeanContext ctx)
Resets any persistence data maintained in the context.
|
int |
setArgumentParameters(PreparedStatement ps,
int parameterIndex,
Object arg)
Sets the prepared statement parameters with the data from the
object.
|
protected abstract void |
setDirtyAfterGet(CmpEntityBeanContext ctx) |
int |
setInstanceParameters(PreparedStatement ps,
int parameterIndex,
CmpEntityBeanContext ctx)
Sets the prepared statement parameters with the data from the
instance associated with the context.
|
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.
|
void |
setValue(CmpEntityBeanContext ctx,
Object value)
Sets the value of this field for the specified instance context.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetLockedValue, lockInstanceValuegetInstanceValue, isDirty, isLoaded, isReadTimedOut, setClean, setInstanceValueprotected final org.jboss.logging.Logger log
protected final JDBCStoreManager manager
protected final String fieldName
protected final boolean readOnly
protected final long readTimeOut
protected final boolean primaryKeyMember
protected final int jdbcContextIndex
protected final int tableIndex
protected CMPFieldStateFactory stateFactory
protected boolean checkDirtyAfterGet
protected byte defaultFlags
public JDBCAbstractCMPFieldBridge(JDBCStoreManager manager, JDBCCMPFieldMetaData metadata)
public JDBCAbstractCMPFieldBridge(JDBCStoreManager manager, JDBCCMPFieldMetaData metadata, JDBCType jdbcType)
public JDBCAbstractCMPFieldBridge(JDBCStoreManager manager, String fieldName, Class fieldType, JDBCType jdbcType, boolean readOnly, long readTimeOut, Class primaryKeyClass, Field primaryKeyField, int jdbcContextIndex, int tableIndex, boolean checkDirtyAfterGet, CMPFieldStateFactory stateFactory)
public byte getDefaultFlags()
JDBCCMPFieldBridgegetDefaultFlags in interface JDBCCMPFieldBridgepublic void addDefaultFlag(byte flag)
addDefaultFlag in interface JDBCCMPFieldBridgepublic JDBCEntityPersistenceStore getManager()
getManager in interface JDBCFieldBridgepublic String getFieldName()
FieldBridgegetFieldName in interface FieldBridgepublic JDBCType getJDBCType()
JDBCFieldBridgegetJDBCType in interface JDBCFieldBridgepublic Class getFieldType()
getFieldType in interface CMPFieldBridgepublic boolean isPrimaryKeyMember()
JDBCFieldBridgeisPrimaryKeyMember in interface JDBCFieldBridgepublic Field getPrimaryKeyField()
JDBCCMPFieldBridgegetPrimaryKeyField in interface JDBCCMPFieldBridgepublic boolean isReadOnly()
JDBCFieldBridgeisReadOnly in interface JDBCFieldBridgepublic long getReadTimeOut()
public Object getValue(CmpEntityBeanContext ctx)
FieldBridgegetValue in interface FieldBridgectx - the context for which this field's value should be fetchedpublic void setValue(CmpEntityBeanContext ctx, Object value)
FieldBridgesetValue in interface FieldBridgectx - the context for which this field's value should be setvalue - the new value of this fieldpublic Object getPrimaryKeyValue(Object primaryKey) throws IllegalArgumentException
JDBCCMPFieldBridgegetPrimaryKeyValue in interface JDBCCMPFieldBridgegetPrimaryKeyValue in interface JDBCFieldBridgeprimaryKey - the primary key object from which this fields value
will be extractedIllegalArgumentExceptionpublic Object setPrimaryKeyValue(Object primaryKey, Object value) throws IllegalArgumentException
JDBCCMPFieldBridgesetPrimaryKeyValue in interface JDBCCMPFieldBridgeprimaryKey - the primary key object which the value
will be insertedvalue - the value for field that will be set in the pkIllegalArgumentExceptionpublic abstract void resetPersistenceContext(CmpEntityBeanContext ctx)
JDBCFieldBridgeresetPersistenceContext in interface JDBCFieldBridgepublic void initInstance(CmpEntityBeanContext ctx)
initInstance in interface JDBCFieldBridgepublic int setInstanceParameters(PreparedStatement ps, int parameterIndex, CmpEntityBeanContext ctx)
JDBCFieldBridgesetInstanceParameters in interface JDBCFieldBridgepublic int setPrimaryKeyParameters(PreparedStatement ps, int parameterIndex, Object primaryKey) throws IllegalArgumentException
JDBCCMPFieldBridgesetPrimaryKeyParameters in interface JDBCCMPFieldBridgeIllegalArgumentExceptionpublic int setArgumentParameters(PreparedStatement ps, int parameterIndex, Object arg)
JDBCCMPFieldBridgesetArgumentParameters in interface JDBCCMPFieldBridgepublic int loadInstanceResults(ResultSet rs, int parameterIndex, CmpEntityBeanContext ctx)
JDBCFieldBridgeloadInstanceResults in interface JDBCFieldBridgepublic int loadPrimaryKeyResults(ResultSet rs, int parameterIndex, Object[] pkRef) throws IllegalArgumentException
JDBCCMPFieldBridgeloadPrimaryKeyResults in interface JDBCCMPFieldBridgeIllegalArgumentExceptionpublic int loadArgumentResults(ResultSet rs, int parameterIndex, Object[] argumentRef) throws IllegalArgumentException
JDBCFieldBridgeloadArgumentResults in interface JDBCFieldBridgeIllegalArgumentExceptionpublic boolean isRelationTableField()
isRelationTableField in interface JDBCCMPFieldBridgepublic final int getFieldIndex()
public Class getPrimaryKeyClass()
public int getTableIndex()
JDBCCMPFieldBridgegetTableIndex in interface JDBCCMPFieldBridgepublic void setLockingStrategy(LockingStrategy lockingStrategy)
setLockingStrategy in interface JDBCCMPFieldBridgelockingStrategy - locking strategy assigned to the fieldprotected abstract void setDirtyAfterGet(CmpEntityBeanContext ctx)
public boolean isCMPField()
isCMPField in interface JDBCFieldBridgeCopyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.