org.jboss.ejb.plugins.cmp.jdbc2.bridge
Class JDBCCMPFieldBridge2

java.lang.Object
  extended byorg.jboss.ejb.plugins.cmp.jdbc2.bridge.JDBCCMPFieldBridge2
All Implemented Interfaces:
CMPFieldBridge (src) , FieldBridge (src) , JDBCFieldBridge (src)

public class JDBCCMPFieldBridge2
extends java.lang.Object
implements CMPFieldBridge (src) , JDBCFieldBridge (src)


Constructor Summary
JDBCCMPFieldBridge2(JDBCCMPFieldBridge2 (src)  cmpField, JDBCCMPFieldBridge2 (src)  relatedPKField)
           
JDBCCMPFieldBridge2(JDBCStoreManager2 (src)  manager, JDBCEntityBridge2 (src)  entity, JDBCCMPFieldMetaData (src)  metadata, int rowIndex)
           
 
Method Summary
 java.lang.String getColumnName()
           
 java.lang.String getFieldName()
          Gets the name of this field.
 java.lang.Class getFieldType()
           
 java.lang.Object getInstanceValue(EntityEnterpriseContext (src)  ctx)
          Gets the internal value of this field without user level checks.
 JDBCType (src) getJDBCType()
          Gets the JDBC type of this field.
 JDBCEntityPersistenceStore (src) getManager()
           
 java.lang.Object getPrimaryKeyValue(java.lang.Object primaryKey)
           
 int getRowIndex()
           
 java.lang.Object getValue(EntityEnterpriseContext (src)  ctx)
          Gets the value of this field for the specified instance context.
 int getVersionIndex()
           
 void initInstance(EntityEnterpriseContext (src)  ctx)
          Set CMPFieldValue to Java default value (i.e., 0 or null).
 void initVersion()
           
 boolean isCMPField()
           
 boolean isDirty(EntityEnterpriseContext (src)  ctx)
          Has the value of this field changes since the last time clean was called.
 boolean isLoaded(EntityEnterpriseContext (src)  ctx)
          Has the data been loaded?
 boolean isPrimaryKeyMember()
          Is this field a member of the primary key.
 boolean isReadOnly()
          Is this field read only.
 boolean isReadTimedOut(EntityEnterpriseContext (src)  ctx)
          Has current data read timed out?
 java.lang.Object loadArgumentResults(java.sql.ResultSet rs, int parameterIndex)
           
 int loadArgumentResults(java.sql.ResultSet rs, int parameterIndex, java.lang.Object[] argumentRef)
          Loads the value of this cmp field from result set into argument referance.
 int loadInstanceResults(java.sql.ResultSet rs, int parameterIndex, EntityEnterpriseContext (src)  ctx)
          Loads the data from result set into the instance associated with the specified context.
 void resetPersistenceContext(EntityEnterpriseContext (src)  ctx)
          Resets any persistence data maintained in the context.
 int setArgumentParameters(java.sql.PreparedStatement ps, int parameterIndex, java.lang.Object arg)
           
 void setClean(EntityEnterpriseContext (src)  ctx)
          Mark this field as clean.
 int setInstanceParameters(java.sql.PreparedStatement ps, int parameterIndex, EntityEnterpriseContext (src)  ctx)
          Sets the prepared statement parameters with the data from the instance associated with the context.
 void setInstanceValue(EntityEnterpriseContext (src)  ctx, java.lang.Object value)
          Sets the internal value of this field without user level checks.
 java.lang.Object setPrimaryKeyValue(java.lang.Object primaryKey, java.lang.Object value)
           
 void setValue(EntityEnterpriseContext (src)  ctx, java.lang.Object value)
          Sets the value of this field for the specified instance context.
 void setValueInternal(EntityEnterpriseContext (src)  ctx, java.lang.Object value, boolean makeDirty)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JDBCCMPFieldBridge2

public JDBCCMPFieldBridge2(JDBCStoreManager2 (src)  manager,
                           JDBCEntityBridge2 (src)  entity,
                           JDBCCMPFieldMetaData (src)  metadata,
                           int rowIndex)
                    throws DeploymentException (src) 

JDBCCMPFieldBridge2

public JDBCCMPFieldBridge2(JDBCCMPFieldBridge2 (src)  cmpField,
                           JDBCCMPFieldBridge2 (src)  relatedPKField)
Method Detail

initVersion

public void initVersion()

getVersionIndex

public int getVersionIndex()

getColumnName

public java.lang.String getColumnName()

setPrimaryKeyValue

public java.lang.Object setPrimaryKeyValue(java.lang.Object primaryKey,
                                           java.lang.Object value)
                                    throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException

setValueInternal

public void setValueInternal(EntityEnterpriseContext (src)  ctx,
                             java.lang.Object value,
                             boolean makeDirty)

setArgumentParameters

public int setArgumentParameters(java.sql.PreparedStatement ps,
                                 int parameterIndex,
                                 java.lang.Object arg)

loadArgumentResults

public java.lang.Object loadArgumentResults(java.sql.ResultSet rs,
                                            int parameterIndex)
                                     throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException

getRowIndex

public int getRowIndex()

getManager

public JDBCEntityPersistenceStore (src)  getManager()
Specified by:
getManager in interface JDBCFieldBridge (src)

initInstance

public void initInstance(EntityEnterpriseContext (src)  ctx)
Description copied from interface: JDBCFieldBridge (src)
Set CMPFieldValue to Java default value (i.e., 0 or null).

Specified by:
initInstance in interface JDBCFieldBridge (src)

resetPersistenceContext

public void resetPersistenceContext(EntityEnterpriseContext (src)  ctx)
Description copied from interface: JDBCFieldBridge (src)
Resets any persistence data maintained in the context.

Specified by:
resetPersistenceContext in interface JDBCFieldBridge (src)

setInstanceParameters

public int setInstanceParameters(java.sql.PreparedStatement ps,
                                 int parameterIndex,
                                 EntityEnterpriseContext (src)  ctx)
Description copied from interface: JDBCFieldBridge (src)
Sets the prepared statement parameters with the data from the instance associated with the context.

Specified by:
setInstanceParameters in interface JDBCFieldBridge (src)

getInstanceValue

public java.lang.Object getInstanceValue(EntityEnterpriseContext (src)  ctx)
Description copied from interface: JDBCFieldBridge (src)
Gets the internal value of this field without user level checks.

Specified by:
getInstanceValue in interface JDBCFieldBridge (src)
Parameters:
ctx - the context for which this field's value should be fetched
Returns:
the value of this field

setInstanceValue

public void setInstanceValue(EntityEnterpriseContext (src)  ctx,
                             java.lang.Object value)
Description copied from interface: JDBCFieldBridge (src)
Sets the internal value of this field without user level checks.

Specified by:
setInstanceValue in interface JDBCFieldBridge (src)
Parameters:
ctx - the context for which this field's value should be set
value - the new value of this field

loadInstanceResults

public int loadInstanceResults(java.sql.ResultSet rs,
                               int parameterIndex,
                               EntityEnterpriseContext (src)  ctx)
Description copied from interface: JDBCFieldBridge (src)
Loads the data from result set into the instance associated with the specified context.

Specified by:
loadInstanceResults in interface JDBCFieldBridge (src)

loadArgumentResults

public int loadArgumentResults(java.sql.ResultSet rs,
                               int parameterIndex,
                               java.lang.Object[] argumentRef)
Description copied from interface: JDBCFieldBridge (src)
Loads the value of this cmp field from result set into argument referance.

Specified by:
loadArgumentResults in interface JDBCFieldBridge (src)

isDirty

public boolean isDirty(EntityEnterpriseContext (src)  ctx)
Description copied from interface: JDBCFieldBridge (src)
Has the value of this field changes since the last time clean was called.

Specified by:
isDirty in interface JDBCFieldBridge (src)

setClean

public void setClean(EntityEnterpriseContext (src)  ctx)
Description copied from interface: JDBCFieldBridge (src)
Mark this field as clean.

Specified by:
setClean in interface JDBCFieldBridge (src)

isCMPField

public boolean isCMPField()
Specified by:
isCMPField in interface JDBCFieldBridge (src)

isPrimaryKeyMember

public boolean isPrimaryKeyMember()
Description copied from interface: JDBCFieldBridge (src)
Is this field a member of the primary key.

Specified by:
isPrimaryKeyMember in interface JDBCFieldBridge (src)
Returns:
true if this field is a member of the primary key

isReadOnly

public boolean isReadOnly()
Description copied from interface: JDBCFieldBridge (src)
Is this field read only.

Specified by:
isReadOnly in interface JDBCFieldBridge (src)
Returns:
true if this field is read only

isReadTimedOut

public boolean isReadTimedOut(EntityEnterpriseContext (src)  ctx)
Description copied from interface: JDBCFieldBridge (src)
Has current data read timed out?

Specified by:
isReadTimedOut in interface JDBCFieldBridge (src)

isLoaded

public boolean isLoaded(EntityEnterpriseContext (src)  ctx)
Description copied from interface: JDBCFieldBridge (src)
Has the data been loaded?

Specified by:
isLoaded in interface JDBCFieldBridge (src)

getJDBCType

public JDBCType (src)  getJDBCType()
Description copied from interface: JDBCFieldBridge (src)
Gets the JDBC type of this field.

Specified by:
getJDBCType in interface JDBCFieldBridge (src)

getPrimaryKeyValue

public java.lang.Object getPrimaryKeyValue(java.lang.Object primaryKey)
                                    throws java.lang.IllegalArgumentException
Specified by:
getPrimaryKeyValue in interface JDBCFieldBridge (src)
Throws:
java.lang.IllegalArgumentException

getFieldName

public java.lang.String getFieldName()
Description copied from interface: FieldBridge (src)
Gets the name of this field.

Specified by:
getFieldName in interface FieldBridge (src)
Returns:
the name of this field

getValue

public java.lang.Object getValue(EntityEnterpriseContext (src)  ctx)
Description copied from interface: FieldBridge (src)
Gets the value of this field for the specified instance context.

Specified by:
getValue in interface FieldBridge (src)
Parameters:
ctx - the context for which this field's value should be fetched
Returns:
the value of this field

setValue

public void setValue(EntityEnterpriseContext (src)  ctx,
                     java.lang.Object value)
Description copied from interface: FieldBridge (src)
Sets the value of this field for the specified instance context.

Specified by:
setValue in interface FieldBridge (src)
Parameters:
ctx - the context for which this field's value should be set
value - the new value of this field

getFieldType

public java.lang.Class getFieldType()
Specified by:
getFieldType in interface CMPFieldBridge (src)