站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 4.0.1 sp1 server API Documentation 英文版文档

JDBCCMRFieldBridge2 (JBoss Server API) - JBoss 4.0.1 sp1 server API Documentation 英文版文档


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

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

public class JDBCCMRFieldBridge2
extends JDBCAbstractCMRFieldBridge

Version:
$Revision: 1.8.2.2 $
Author:
Alexey Loubyansky

Nested Class Summary
 class JDBCCMRFieldBridge2.CollectionValuedFieldState
           
static interface JDBCCMRFieldBridge2.FieldState
           
 class JDBCCMRFieldBridge2.SingleValuedFieldState
           
 
Constructor Summary
JDBCCMRFieldBridge2(JDBCEntityBridge2 entityBridge, JDBCStoreManager2 manager, JDBCRelationshipRoleMetaData metadata)
           
 
Method Summary
 boolean addRelatedId(EntityEnterpriseContext ctx, Object relatedId)
           
 void destroyExistingRelationships(EntityEnterpriseContext ctx)
           
 JDBCAbstractEntityBridge getEntity()
           
 String getFieldName()
          Gets the name of this field.
 JDBCFieldBridge[] getForeignKeyFields()
           
 Object getInstanceValue(EntityEnterpriseContext ctx)
          Gets the internal value of this field without user level checks.
 JDBCType getJDBCType()
          Gets the JDBC type of this field.
 JDBCEntityPersistenceStore getManager()
           
 JDBCRelationshipRoleMetaData getMetaData()
           
 String getQualifiedTableName()
           
 JDBCAbstractCMRFieldBridge getRelatedCMRField()
           
 EntityBridge getRelatedEntity()
           
 JDBCCMRFieldBridge2 getRelatedField()
           
 JDBCFieldBridge[] getTableKeyFields()
           
 String getTableName()
           
 Object getValue(EntityEnterpriseContext ctx)
          Gets the value of this field for the specified instance context.
 boolean hasForeignKey()
           
 void initInstance(EntityEnterpriseContext ctx)
          Set CMPFieldValue to Java default value (i.e., 0 or null).
 void initLoader()
           
 boolean isCMPField()
           
 boolean isDirty(EntityEnterpriseContext ctx)
          Has the value of this field changes since the last time clean was called.
 boolean isLoaded(EntityEnterpriseContext 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 ctx)
          Has current data read timed out?
 boolean isSingleValued()
           
 int loadArgumentResults(ResultSet rs, int parameterIndex, Object[] argumentRef)
          Loads the value of this cmp field from result set into argument referance.
 int loadInstanceResults(ResultSet rs, int parameterIndex, EntityEnterpriseContext ctx)
          Loads the data from result set into the instance associated with the specified context.
 void remove(EntityEnterpriseContext ctx)
           
 boolean removeRelatedId(EntityEnterpriseContext ctx, Object relatedId)
           
 void resetPersistenceContext(EntityEnterpriseContext ctx)
          Resets any persistence data maintained in the context.
 void resolveRelationship()
           
 void setClean(EntityEnterpriseContext ctx)
          Mark this field as clean.
 int setInstanceParameters(PreparedStatement ps, int parameterIndex, EntityEnterpriseContext ctx)
          Sets the prepared statement parameters with the data from the instance associated with the context.
 void setInstanceValue(EntityEnterpriseContext ctx, Object value)
          Sets the internal value of this field without user level checks.
 void setValue(EntityEnterpriseContext ctx, 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
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 entityBridge,
                           JDBCStoreManager2 manager,
                           JDBCRelationshipRoleMetaData metadata)
Method Detail

resolveRelationship

public void resolveRelationship()
                         throws org.jboss.deployment.DeploymentException
Throws:
org.jboss.deployment.DeploymentException

initLoader

public void initLoader()
                throws org.jboss.deployment.DeploymentException
Throws:
org.jboss.deployment.DeploymentException

getMetaData

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

removeRelatedId

public boolean removeRelatedId(EntityEnterpriseContext ctx,
                               Object relatedId)

addRelatedId

public boolean addRelatedId(EntityEnterpriseContext ctx,
                            Object relatedId)

remove

public void remove(EntityEnterpriseContext ctx)
            throws javax.ejb.RemoveException
Throws:
javax.ejb.RemoveException

destroyExistingRelationships

public void destroyExistingRelationships(EntityEnterpriseContext ctx)

getTableKeyFields

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

getManager

public JDBCEntityPersistenceStore getManager()

hasForeignKey

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

getRelatedCMRField

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

getForeignKeyFields

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

getRelatedField

public JDBCCMRFieldBridge2 getRelatedField()

getEntity

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

getQualifiedTableName

public String getQualifiedTableName()
Specified by:
getQualifiedTableName in class JDBCAbstractCMRFieldBridge

getTableName

public String getTableName()
Specified by:
getTableName in class JDBCAbstractCMRFieldBridge

getJDBCType

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


isPrimaryKeyMember

public boolean isPrimaryKeyMember()
Description copied from interface: JDBCFieldBridge
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
Is this field read only.

Returns:
true if this field is read only

isReadTimedOut

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


isLoaded

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


initInstance

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


resetPersistenceContext

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


setInstanceParameters

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


getInstanceValue

public Object getInstanceValue(EntityEnterpriseContext ctx)
Description copied from interface: JDBCFieldBridge
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 ctx,
                             Object value)
Description copied from interface: JDBCFieldBridge
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(ResultSet rs,
                               int parameterIndex,
                               EntityEnterpriseContext ctx)
Description copied from interface: JDBCFieldBridge
Loads the data from result set into the instance associated with the specified context.


loadArgumentResults

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


isDirty

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


setClean

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


isCMPField

public boolean isCMPField()

getFieldName

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

Returns:
the name of this field

getValue

public Object getValue(EntityEnterpriseContext ctx)
Description copied from interface: FieldBridge
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 ctx,
                     Object value)
Description copied from interface: FieldBridge
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 getRelatedEntity()


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.