|
||||||||||
PREV CLASS (src) NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCAbstractCMRFieldBridge (src)
org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge
JDBCCMRFieldBridge a bean relationship. This class only supports relationships between entities managed by a JDBCStoreManager in the same application.
Life-cycle: Tied to the EntityBridge. Multiplicity: One for each role that entity has.
Nested Class Summary | |
static class |
JDBCCMRFieldBridge.M2MRelationManager (src)
|
static interface |
JDBCCMRFieldBridge.RelationDataManager (src)
|
Constructor Summary | |
JDBCCMRFieldBridge(JDBCEntityBridge (src) entity,
JDBCStoreManager (src) manager,
JDBCRelationshipRoleMetaData (src) metadata)
Creates a cmr field for the entity based on the metadata. |
Method Summary | |
void |
addRelatedPKsWaitedForMe(EntityEnterpriseContext (src) ctx)
Establishes relationships with related entities waited for passed in context to be created. |
void |
addRelatedPKWaitingForMyPK(java.lang.Object myPK,
java.lang.Object relatedPK)
|
void |
addRelation(EntityEnterpriseContext (src) myCtx,
java.lang.Object fk)
Adds the foreign key to the set of related ids, and updates any foreign key fields. |
boolean |
allFkFieldsMappedToPkFields()
Returns true if all FK fields are mapped to PK fields |
void |
cascadeDelete(EntityEnterpriseContext (src) ctx,
java.util.List oldValues)
|
void |
createRelationLinks(EntityEnterpriseContext (src) myCtx,
java.lang.Object relatedId)
Creates the relation links between the instance associated with the context and the related instance (just the id is passed in). |
void |
createRelationLinks(EntityEnterpriseContext (src) myCtx,
java.lang.Object relatedId,
boolean updateForeignKey)
|
void |
destroyRelationLinks(EntityEnterpriseContext (src) myCtx,
java.lang.Object relatedId)
Destroys the relation links between the instance associated with the context and the related instance (just the id is passed in). |
void |
destroyRelationLinks(EntityEnterpriseContext (src) myCtx,
java.lang.Object relatedId,
boolean updateValueCollection)
Destroys the relation links between the instance associated with the context and the related instance (just the id is passed in). |
void |
destroyRelationLinks(EntityEnterpriseContext (src) myCtx,
java.lang.Object relatedId,
boolean updateValueCollection,
boolean updateForeignKey)
|
DataSource (src) |
getDataSource()
Gets the datasource of the relation table if relevent. |
JDBCAbstractEntityBridge (src) |
getEntity()
Gets bridge for this entity. |
java.lang.String |
getFieldName()
Gets the name of this field. |
JDBCFieldBridge (src) [] |
getForeignKeyFields()
Gets the foreign key fields of this entity (i.e., related entities pk fields) |
java.lang.Object |
getInstanceValue(EntityEnterpriseContext (src) myCtx)
Gets the value of the cmr field for the instance associated with the context. |
JDBCStoreManager (src) |
getJDBCStoreManager()
Gets the manager of this entity. |
JDBCType (src) |
getJDBCType()
Gets the JDBC type of this field. |
JDBCEntityPersistenceStore (src) |
getManager()
|
JDBCRelationshipRoleMetaData (src) |
getMetaData()
Gets the metadata of the relationship role that this field represents. |
java.lang.String |
getQualifiedTableName()
Gets the name of the relation table if relevent. |
JDBCReadAheadMetaData (src) |
getReadAhead()
Gets the read ahead meta data. |
JDBCAbstractCMRFieldBridge (src) |
getRelatedCMRField()
The related entity's cmr field for this relationship. |
EntityBridge (src) |
getRelatedEntity()
The related entity. |
EJBLocalObject (src) |
getRelatedEntityByFK(java.lang.Object fk)
Returns related entity's local interface. |
java.lang.Object |
getRelatedId(EntityEnterpriseContext (src) myCtx)
Get the related entity's id. |
java.lang.Object |
getRelatedIdFromContext(EntityEnterpriseContext (src) ctx)
Creates a new instance of related id based on foreign key value in the context. |
LocalProxyFactory (src) |
getRelatedInvoker()
The related entity's local container invoker. |
JDBCEntityBridge (src) |
getRelatedJDBCEntity()
The related entity. |
java.lang.Class |
getRelatedLocalInterface()
The related entity's local home interface. |
JDBCStoreManager (src) |
getRelatedManager()
The related manger. |
JDBCCMRFieldBridge.RelationDataManager (src) |
getRelationDataManager()
|
JDBCRelationMetaData (src) |
getRelationMetaData()
Gets the relation metadata. |
JDBCFieldBridge (src) [] |
getTableKeyFields()
Gets the key fields that this entity maintains in the relation table. |
java.lang.String |
getTableName()
|
java.lang.Object |
getValue(EntityEnterpriseContext (src) ctx)
Gets the value of this field for the specified instance context. |
boolean |
hasFKFieldsMappedToCMPFields()
|
boolean |
hasForeignKey()
Does this cmr field have foreign keys. |
void |
initInstance(EntityEnterpriseContext (src) ctx)
Initialized the foreign key fields. |
boolean |
invalidateCache(EntityEnterpriseContext (src) ctx)
|
boolean |
isBatchCascadeDelete()
|
boolean |
isCMPField()
|
boolean |
isCollectionValued()
Is this a collection valued field. |
boolean |
isDirty(EntityEnterpriseContext (src) ctx)
This method is never called. |
boolean |
isForeignKeyValid(java.lang.Object fk)
This method is called only for CMR fields with foreign key fields mapped to CMP fields to check the validity of the foreign key value. |
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 readonly? |
boolean |
isReadTimedOut(EntityEnterpriseContext (src) ctx)
Had the read time expired? |
boolean |
isSingleValued()
Is this a single valued field. |
void |
load(EntityEnterpriseContext (src) myCtx,
java.util.Collection values)
|
int |
loadArgumentResults(java.sql.ResultSet rs,
int parameterIndex,
java.lang.Object[] fkRef)
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. |
boolean |
removeFromRelations(EntityEnterpriseContext (src) ctx,
java.lang.Object[] oldRelationsRef)
|
void |
removeRelatedPKWaitingForMyPK(java.lang.Object myPK,
java.lang.Object relatedPK)
|
void |
removeRelation(EntityEnterpriseContext (src) myCtx,
java.lang.Object fk)
Removes the foreign key to the set of related ids, and updates any foreign key fields. |
void |
resetPersistenceContext(EntityEnterpriseContext (src) ctx)
resets the persistence context of the foreign key fields |
void |
resolveRelationship()
|
void |
scheduleChildrenForBatchCascadeDelete(EntityEnterpriseContext (src) ctx)
Schedules children for batch cascade delete. |
void |
scheduleChildrenForCascadeDelete(EntityEnterpriseContext (src) ctx)
Schedules children for cascade delete. |
void |
setClean(EntityEnterpriseContext (src) ctx)
This method is never called. |
void |
setForeignKey(EntityEnterpriseContext (src) myCtx,
java.lang.Object fk)
Sets the foreign key field value. |
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) myCtx,
java.lang.Object newValue)
Sets the value of the cmr field for the instance associated with the context. |
void |
setValue(EntityEnterpriseContext (src) ctx,
java.lang.Object value)
Sets new value. |
void |
start()
The third phase of deployment. |
java.lang.String |
toString()
|
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, wait, wait, wait |
Constructor Detail |
public JDBCCMRFieldBridge(JDBCEntityBridge (src) entity, JDBCStoreManager (src) manager, JDBCRelationshipRoleMetaData (src) metadata) throws DeploymentException (src)
Method Detail |
public JDBCCMRFieldBridge.RelationDataManager (src) getRelationDataManager()
public void resolveRelationship() throws DeploymentException (src)
DeploymentException (src)
public void start() throws DeploymentException (src)
DeploymentException (src)
public boolean removeFromRelations(EntityEnterpriseContext (src) ctx, java.lang.Object[] oldRelationsRef)
public void cascadeDelete(EntityEnterpriseContext (src) ctx, java.util.List oldValues) throws RemoveException (src) , java.rmi.RemoteException
RemoveException (src)
java.rmi.RemoteException
public boolean isBatchCascadeDelete()
public JDBCStoreManager (src) getJDBCStoreManager()
public JDBCAbstractEntityBridge (src) getEntity()
getEntity
in class JDBCAbstractCMRFieldBridge (src)
public JDBCRelationshipRoleMetaData (src) getMetaData()
getMetaData
in class JDBCAbstractCMRFieldBridge (src)
public JDBCRelationMetaData (src) getRelationMetaData()
public java.lang.String getFieldName()
public java.lang.String getQualifiedTableName()
getQualifiedTableName
in class JDBCAbstractCMRFieldBridge (src)
public java.lang.String getTableName()
getTableName
in class JDBCAbstractCMRFieldBridge (src)
public DataSource (src) getDataSource()
public JDBCReadAheadMetaData (src) getReadAhead()
public JDBCType (src) getJDBCType()
JDBCFieldBridge (src)
public boolean isPrimaryKeyMember()
JDBCFieldBridge (src)
public boolean hasForeignKey()
hasForeignKey
in class JDBCAbstractCMRFieldBridge (src)
public boolean allFkFieldsMappedToPkFields()
public boolean isCollectionValued()
public boolean isSingleValued()
public JDBCFieldBridge (src) [] getTableKeyFields()
getTableKeyFields
in class JDBCAbstractCMRFieldBridge (src)
public JDBCFieldBridge (src) [] getForeignKeyFields()
getForeignKeyFields
in class JDBCAbstractCMRFieldBridge (src)
public JDBCAbstractCMRFieldBridge (src) getRelatedCMRField()
getRelatedCMRField
in class JDBCAbstractCMRFieldBridge (src)
public JDBCStoreManager (src) getRelatedManager()
public EntityBridge (src) getRelatedEntity()
public JDBCEntityBridge (src) getRelatedJDBCEntity()
public final java.lang.Class getRelatedLocalInterface()
public final LocalProxyFactory (src) getRelatedInvoker()
public boolean isLoaded(EntityEnterpriseContext (src) ctx)
JDBCFieldBridge (src)
ctx
- - entity's context
public void addRelatedPKsWaitedForMe(EntityEnterpriseContext (src) ctx)
ctx
- - entity's context.public boolean isReadOnly()
public boolean isReadTimedOut(EntityEnterpriseContext (src) ctx)
public java.lang.Object getValue(EntityEnterpriseContext (src) ctx)
FieldBridge (src)
ctx
- - entity's context.
public void setValue(EntityEnterpriseContext (src) ctx, java.lang.Object value)
ctx
- - entity's context;value
- - new value.public java.lang.Object getInstanceValue(EntityEnterpriseContext (src) myCtx)
myCtx
- the context for which this field's value should be fetched
public EJBLocalObject (src) getRelatedEntityByFK(java.lang.Object fk)
fk
- - foreign key value.
public boolean isForeignKeyValid(java.lang.Object fk)
fk
- the foreign key to check
public void setInstanceValue(EntityEnterpriseContext (src) myCtx, java.lang.Object newValue)
myCtx
- the context for which this field's value should be setnewValue
- the new value of this fieldpublic void createRelationLinks(EntityEnterpriseContext (src) myCtx, java.lang.Object relatedId)
public void createRelationLinks(EntityEnterpriseContext (src) myCtx, java.lang.Object relatedId, boolean updateForeignKey)
public void destroyRelationLinks(EntityEnterpriseContext (src) myCtx, java.lang.Object relatedId)
public void destroyRelationLinks(EntityEnterpriseContext (src) myCtx, java.lang.Object relatedId, boolean updateValueCollection)
public void destroyRelationLinks(EntityEnterpriseContext (src) myCtx, java.lang.Object relatedId, boolean updateValueCollection, boolean updateForeignKey)
public void scheduleChildrenForCascadeDelete(EntityEnterpriseContext (src) ctx)
public void scheduleChildrenForBatchCascadeDelete(EntityEnterpriseContext (src) ctx)
public java.lang.Object getRelatedId(EntityEnterpriseContext (src) myCtx)
public java.lang.Object getRelatedIdFromContext(EntityEnterpriseContext (src) ctx)
ctx
- - entity's context.
public void addRelation(EntityEnterpriseContext (src) myCtx, java.lang.Object fk)
public void removeRelation(EntityEnterpriseContext (src) myCtx, java.lang.Object fk)
public void load(EntityEnterpriseContext (src) myCtx, java.util.Collection values)
public void setForeignKey(EntityEnterpriseContext (src) myCtx, java.lang.Object fk)
public void initInstance(EntityEnterpriseContext (src) ctx)
public void resetPersistenceContext(EntityEnterpriseContext (src) ctx)
public int setInstanceParameters(java.sql.PreparedStatement ps, int parameterIndex, EntityEnterpriseContext (src) ctx)
JDBCFieldBridge (src)
public int loadInstanceResults(java.sql.ResultSet rs, int parameterIndex, EntityEnterpriseContext (src) ctx)
JDBCFieldBridge (src)
public int loadArgumentResults(java.sql.ResultSet rs, int parameterIndex, java.lang.Object[] fkRef)
JDBCFieldBridge (src)
public boolean isDirty(EntityEnterpriseContext (src) ctx)
public boolean invalidateCache(EntityEnterpriseContext (src) ctx)
public void setClean(EntityEnterpriseContext (src) ctx)
public boolean isCMPField()
public JDBCEntityPersistenceStore (src) getManager()
public boolean hasFKFieldsMappedToCMPFields()
public void addRelatedPKWaitingForMyPK(java.lang.Object myPK, java.lang.Object relatedPK)
public void removeRelatedPKWaitingForMyPK(java.lang.Object myPK, java.lang.Object relatedPK)
public java.lang.String toString()
|
||||||||||
PREV CLASS (src) NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |