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

java.lang.Object
  extended byorg.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCAbstractCMRFieldBridge (src) 
      extended byorg.jboss.ejb.plugins.cmp.jdbc2.bridge.JDBCCMRFieldBridge2
All Implemented Interfaces:
CMRFieldBridge (src) , FieldBridge (src) , JDBCFieldBridge (src)

public class JDBCCMRFieldBridge2
extends JDBCAbstractCMRFieldBridge (src)


Nested Class Summary
 class JDBCCMRFieldBridge2.CollectionValuedFieldState (src)
           
static interface JDBCCMRFieldBridge2.FieldState (src)
           
 class JDBCCMRFieldBridge2.SingleValuedFieldState (src)
           
 
Constructor Summary
JDBCCMRFieldBridge2(JDBCEntityBridge2 (src)  entityBridge, JDBCStoreManager2 (src)  manager, JDBCRelationshipRoleMetaData (src)  metadata)
           
 
Method Summary
 boolean addRelatedId(EntityEnterpriseContext (src)  ctx, java.lang.Object relatedId)
           
 void destroyExistingRelationships(EntityEnterpriseContext (src)  ctx)
           
 JDBCAbstractEntityBridge (src) getEntity()
           
 java.lang.String getFieldName()
          Gets the name of this field.
 JDBCFieldBridge (src) [] getForeignKeyFields()
           
 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()
           
 JDBCRelationshipRoleMetaData (src) getMetaData()
           
 java.lang.String getQualifiedTableName()
           
 JDBCAbstractCMRFieldBridge (src) getRelatedCMRField()
           
 EntityBridge (src) getRelatedEntity()
           
 JDBCCMRFieldBridge2 (src) getRelatedField()
           
 JDBCFieldBridge (src) [] getTableKeyFields()
           
 java.lang.String getTableName()
           
 java.lang.Object getValue(EntityEnterpriseContext (src)  ctx)
          Gets the value of this field for the specified instance context.
 boolean hasForeignKey()
           
 void initInstance(EntityEnterpriseContext (src)  ctx)
          Set CMPFieldValue to Java default value (i.e., 0 or null).
 void initLoader()
           
 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?
 boolean isSingleValued()
           
 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 remove(EntityEnterpriseContext (src)  ctx)
           
 boolean removeRelatedId(EntityEnterpriseContext (src)  ctx, java.lang.Object relatedId)
           
 void resetPersistenceContext(EntityEnterpriseContext (src)  ctx)
          Resets any persistence data maintained in the context.
 void resolveRelationship()
           
 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.
 void setValue(EntityEnterpriseContext (src)  ctx, java.lang.Object value)
          Sets the value of this field for the specified instance context.
 
Methods inherited from class org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCAbstractCMRFieldBridge (src)
getPrimaryKeyValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JDBCCMRFieldBridge2

public JDBCCMRFieldBridge2(JDBCEntityBridge2 (src)  entityBridge,
                           JDBCStoreManager2 (src)  manager,
                           JDBCRelationshipRoleMetaData (src)  metadata)
Method Detail

resolveRelationship

public void resolveRelationship()
                         throws DeploymentException (src) 
Throws:
DeploymentException (src)

initLoader

public void initLoader()
                throws DeploymentException (src) 
Throws:
DeploymentException (src)

getMetaData

public JDBCRelationshipRoleMetaData (src)  getMetaData()
Specified by:
getMetaData in class JDBCAbstractCMRFieldBridge (src)

removeRelatedId

public boolean removeRelatedId(EntityEnterpriseContext (src)  ctx,
                               java.lang.Object relatedId)

addRelatedId

public boolean addRelatedId(EntityEnterpriseContext (src)  ctx,
                            java.lang.Object relatedId)

remove

public void remove(EntityEnterpriseContext (src)  ctx)
            throws RemoveException (src) 
Throws:
RemoveException (src)

destroyExistingRelationships

public void destroyExistingRelationships(EntityEnterpriseContext (src)  ctx)

getTableKeyFields

public JDBCFieldBridge (src) [] getTableKeyFields()
Specified by:
getTableKeyFields in class JDBCAbstractCMRFieldBridge (src)

getManager

public JDBCEntityPersistenceStore (src)  getManager()

hasForeignKey

public boolean hasForeignKey()
Specified by:
hasForeignKey in class JDBCAbstractCMRFieldBridge (src)

getRelatedCMRField

public JDBCAbstractCMRFieldBridge (src)  getRelatedCMRField()
Specified by:
getRelatedCMRField in class JDBCAbstractCMRFieldBridge (src)

getForeignKeyFields

public JDBCFieldBridge (src) [] getForeignKeyFields()
Specified by:
getForeignKeyFields in class JDBCAbstractCMRFieldBridge (src)

getRelatedField

public JDBCCMRFieldBridge2 (src)  getRelatedField()

getEntity

public JDBCAbstractEntityBridge (src)  getEntity()
Specified by:
getEntity in class JDBCAbstractCMRFieldBridge (src)

getQualifiedTableName

public java.lang.String getQualifiedTableName()
Specified by:
getQualifiedTableName in class JDBCAbstractCMRFieldBridge (src)

getTableName

public java.lang.String getTableName()
Specified by:
getTableName in class JDBCAbstractCMRFieldBridge (src)

getJDBCType

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


isPrimaryKeyMember

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

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.

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?


isLoaded

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


initInstance

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


resetPersistenceContext

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


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.


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.

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.

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.


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.


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.


setClean

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


isCMPField

public boolean isCMPField()

getFieldName

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

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.

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.

Parameters:
ctx - the context for which this field's value should be set
value - the new value of this field

isSingleValued

public boolean isSingleValued()

getRelatedEntity

public EntityBridge (src)  getRelatedEntity()