org.objectweb.jonas_ejb.deployment.api.EjbRelationshipRoleDesc Class Reference

Collaboration diagram for org.objectweb.jonas_ejb.deployment.api.EjbRelationshipRoleDesc:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 EjbRelationshipRoleDesc (EjbRelationDesc rd, String name, EjbRelationshipRole role, JonasEjbRelationshipRole jrole, EjbRelationshipRole opposite, boolean isSlave, Logger logger) throws DeploymentDescException
String getName ()
EjbRelationDesc getRelation ()
EjbRelationshipRoleDesc getOppositeRelationshipRole ()
String getSourceBeanName ()
EntityCmp2Desc getSourceBean ()
EntityCmp2Desc getTargetBean ()
boolean isSourceMultiple ()
boolean isTargetMultiple ()
boolean mustCascade ()
boolean isJOnASCmrField ()
boolean hasCmrField ()
String getCmrFieldName ()
Class getCmrFieldType ()
byte getRelationType ()
boolean hasJdbcMapping ()
boolean isSlave ()
String getForeignKeyJdbcName (String jdbcFieldName)
String toString ()

Static Public Attributes

final byte INDEX = 1
final byte SOURCE = 2
final byte TARGET = 4
final byte OOU = 0

Protected Member Functions

void fillMappingInfo () throws DeploymentDescException
void fillMappingInfoWithDefault ()
void setIsJOnASCmrField ()
void setSourceBean (EntityCmp2Desc led)
void setTargetBean (EntityCmp2Desc led)

Detailed Description

Class to hold meta-information related to an ejb-relation-role Created on July 7, 2002
Author:
Christophe Ney [cney@batisseurs.com] : Initial developer

Helene Joanin on May 2003: code cleanup

Helene Joanin on May 2003: complement for legacy first version

Definition at line 44 of file EjbRelationshipRoleDesc.java.


Constructor & Destructor Documentation

org.objectweb.jonas_ejb.deployment.api.EjbRelationshipRoleDesc.EjbRelationshipRoleDesc EjbRelationDesc  rd,
String  name,
EjbRelationshipRole  role,
JonasEjbRelationshipRole  jrole,
EjbRelationshipRole  opposite,
boolean  isSlave,
Logger  logger
throws DeploymentDescException
 

constructor to be used by parent node

Parameters:
rd parent node = EjbRelationDesc
role this role (standard EjbRelationshipRole)
jrole this Jonas role (JonasEjbRelationshipRole). This param may be null.
opposite opposite role in the relation (standard EjbRelationshipRole)
Exceptions:
DeploymentDescException in error case.

Definition at line 131 of file EjbRelationshipRoleDesc.java.


Member Function Documentation

void org.objectweb.jonas_ejb.deployment.api.EjbRelationshipRoleDesc.fillMappingInfo  )  throws DeploymentDescException [protected]
 

Fills the mapping information of this relation-ship role with the values defined in jonas DD.

Exceptions:
DeploymentDescException in error case.

Definition at line 187 of file EjbRelationshipRoleDesc.java.

References org.objectweb.jonas_ejb.deployment.xml.JonasEjbRelationshipRole.getForeignKeyJdbcMappingList(), org.objectweb.jonas_ejb.deployment.xml.ForeignKeyJdbcMapping.getForeignKeyJdbcName(), org.objectweb.jonas_ejb.deployment.xml.ForeignKeyJdbcMapping.getKeyJdbcName(), org.objectweb.jonas_ejb.deployment.api.EjbRelationDesc.getName(), org.objectweb.jonas_ejb.deployment.api.EntityCmpDesc.getSimplePkField(), and org.objectweb.jonas_ejb.deployment.api.EntityCmpDesc.hasSimplePkField().

Referenced by org.objectweb.jonas_ejb.deployment.api.EjbRelationDesc.fillMappingInfo().

Here is the call graph for this function:

void org.objectweb.jonas_ejb.deployment.api.EjbRelationshipRoleDesc.fillMappingInfoWithDefault  )  [protected]
 

Fills the mapping information of this relation-ship role with default values if the mapping information is not already initialized.

Definition at line 223 of file EjbRelationshipRoleDesc.java.

References org.objectweb.jonas_ejb.deployment.api.EntityCmp2Desc.getAbstractSchemaName(), org.objectweb.jonas_ejb.deployment.api.EntityCmpDesc.getCmpFieldDesc(), org.objectweb.jonas_ejb.deployment.api.EntityCmpDesc.getCmpFieldDescIterator(), org.objectweb.jonas_ejb.deployment.api.FieldJdbcDesc.getJdbcFieldName(), org.objectweb.jonas_ejb.deployment.api.EntityCmpDesc.getSimplePkFieldName(), and org.objectweb.jonas_ejb.deployment.api.EntityCmpDesc.hasSimplePkField().

Here is the call graph for this function:

String org.objectweb.jonas_ejb.deployment.api.EjbRelationshipRoleDesc.getCmrFieldName  ) 
 

get the name of the cmr-field.

Returns:
the String name of the cmr-field.

Definition at line 397 of file EjbRelationshipRoleDesc.java.

Referenced by org.objectweb.jonas_ejb.genic.VContextFactory.create(), org.objectweb.jonas_ejb.deployment.api.EntityCmp2Desc.getEjbRelationshipRoleDesc(), org.objectweb.jonas_ejb.genic.VcCMRField.getOppositeUFLCMRName(), org.objectweb.jonas_ejb.container.jorm.JormFactory.init(), and org.objectweb.jonas_ejb.genic.VcCMRField.VcCMRField().

Class org.objectweb.jonas_ejb.deployment.api.EjbRelationshipRoleDesc.getCmrFieldType  ) 
 

get the type of the cmr-field when set in the deployment descriptor.

Returns:
Collection or Set for multiple rel. and null for non multiple rel.

Definition at line 406 of file EjbRelationshipRoleDesc.java.

Referenced by org.objectweb.jonas_ejb.genic.VcCMRField.VcCMRField().

String org.objectweb.jonas_ejb.deployment.api.EjbRelationshipRoleDesc.getForeignKeyJdbcName String  jdbcFieldName  ) 
 

Parameters:
jdbcFieldName a primary key column name of the table associated to the target bean.
Returns:
the foreign key column name associated to the given primary key column name.

Definition at line 453 of file EjbRelationshipRoleDesc.java.

String org.objectweb.jonas_ejb.deployment.api.EjbRelationshipRoleDesc.getName  ) 
 

return the name of this relationship role.

Returns:
the String name of this relationship role.

Definition at line 252 of file EjbRelationshipRoleDesc.java.

Referenced by org.objectweb.jonas_ejb.container.jorm.JormFactory.init(), org.objectweb.jonas_ejb.deployment.api.EjbRelationDesc.setJonasInfo(), and org.objectweb.jonas_ejb.genic.VcCMRField.VcCMRField().

EjbRelationshipRoleDesc org.objectweb.jonas_ejb.deployment.api.EjbRelationshipRoleDesc.getOppositeRelationshipRole  ) 
 

get the opposite relation-ship-role of this relation-ship-role.

Returns:
the opposite EjbRelationshipRoleDesc of this relation-ship-role.

Definition at line 311 of file EjbRelationshipRoleDesc.java.

References org.objectweb.jonas_ejb.deployment.api.EjbRelationDesc.getRelationshipRole1(), and org.objectweb.jonas_ejb.deployment.api.EjbRelationDesc.getRelationshipRole2().

Referenced by org.objectweb.jonas_ejb.container.jorm.JormFactory.init(), and org.objectweb.jonas_ejb.genic.VcCMRField.VcCMRField().

Here is the call graph for this function:

EjbRelationDesc org.objectweb.jonas_ejb.deployment.api.EjbRelationshipRoleDesc.getRelation  ) 
 

get the parent ejb relation of this relation-ship-role.

Returns:
the EjbRelationDesc of this relation-ship-role.

Definition at line 303 of file EjbRelationshipRoleDesc.java.

Referenced by org.objectweb.jonas_ejb.container.jorm.JormFactory.init().

byte org.objectweb.jonas_ejb.deployment.api.EjbRelationshipRoleDesc.getRelationType  ) 
 

This method depends on static values OOB,OOU,... defined upper !

Returns:
the type of the relation: OO-u, OO-b, OM-u, ....

Definition at line 414 of file EjbRelationshipRoleDesc.java.

References org.objectweb.jonas_ejb.deployment.api.EjbRelationshipRoleDesc.hasCmrField(), and org.objectweb.jonas_ejb.deployment.api.EjbRelationshipRoleDesc.isTargetMultiple.

Referenced by org.objectweb.jonas_ejb.genic.VcCMRField.VcCMRField().

Here is the call graph for this function:

EntityCmp2Desc org.objectweb.jonas_ejb.deployment.api.EjbRelationshipRoleDesc.getSourceBean  ) 
 

Get the ejb involved in this relation-ship-role. this is the source bean of this relation.

Returns:
the EntityCmp2Desc of the source bean.

Definition at line 334 of file EjbRelationshipRoleDesc.java.

Referenced by org.objectweb.jonas_ejb.deployment.api.EjbRelationDesc.fillMappingInfoWithDefault(), and org.objectweb.jonas_ejb.container.jorm.JormFactory.init().

String org.objectweb.jonas_ejb.deployment.api.EjbRelationshipRoleDesc.getSourceBeanName  ) 
 

Get the name of the ejb involved in this relation-ship-role. This is the source bean name of this relation.

Returns:
the String ejb-name of the source bean.

Definition at line 325 of file EjbRelationshipRoleDesc.java.

Referenced by org.objectweb.jonas_ejb.deployment.api.DeploymentDescEjb2.DeploymentDescEjb2(), org.objectweb.jonas_ejb.genic.VcCMRField.getHelperClassName(), and org.objectweb.jonas_ejb.genic.VcCMRField.getOppositeHelperClassName().

EntityCmp2Desc org.objectweb.jonas_ejb.deployment.api.EjbRelationshipRoleDesc.getTargetBean  ) 
 

It retrieves the EntityCmp2Desc which is linked to the EntityCmp2Desc associated to this EjbRelationshipRoleDesc. This is the target bean of this relationship role

Returns:
the EntityCmp2Desc of the target bean.

Definition at line 344 of file EjbRelationshipRoleDesc.java.

Referenced by org.objectweb.jonas_ejb.genic.VcCMRField.getHelperFQClassName(), org.objectweb.jonas_ejb.genic.VcCMRField.getOppositeHelperFQClassName(), org.objectweb.jonas_ejb.container.jorm.JormFactory.init(), and org.objectweb.jonas_ejb.genic.VcCMRField.VcCMRField().

boolean org.objectweb.jonas_ejb.deployment.api.EjbRelationshipRoleDesc.hasCmrField  ) 
 

It retrieves true if the EntityCmp2Desc associated to this EjbRelationshipRoleDesc has a cmr field to the linked EntityCmp2Desc

Returns:
true if the relation-ship-role has a CMR field.

Definition at line 389 of file EjbRelationshipRoleDesc.java.

Referenced by org.objectweb.jonas_ejb.deployment.api.EntityCmp2Desc.getEjbRelationshipRoleDesc(), org.objectweb.jonas_ejb.deployment.api.EjbRelationshipRoleDesc.getRelationType(), org.objectweb.jonas_ejb.container.jorm.JormFactory.init(), and org.objectweb.jonas_ejb.deployment.api.EjbRelationDesc.setJonasInfo().

boolean org.objectweb.jonas_ejb.deployment.api.EjbRelationshipRoleDesc.hasJdbcMapping  ) 
 

Is a jdbc mapping is defined for this relationship role ?

Returns:
true if a jdbc mapping is defined for this relationship role.

Definition at line 435 of file EjbRelationshipRoleDesc.java.

boolean org.objectweb.jonas_ejb.deployment.api.EjbRelationshipRoleDesc.isJOnASCmrField  ) 
 

It returns a boolean value which indicates if the cmr has been added by JOnAS (true) or if the user has specified a cmr field in the descriptor. A CMR field is be added to manage the coherence of the relation OXu

Returns:
true if the CMR field is not a bean's programmer CMR field.

Definition at line 379 of file EjbRelationshipRoleDesc.java.

boolean org.objectweb.jonas_ejb.deployment.api.EjbRelationshipRoleDesc.isSlave  ) 
 

In M-N relationships, only 1 role will write data on DB.

Returns:
true if role will not write MN relations on database

Definition at line 443 of file EjbRelationshipRoleDesc.java.

boolean org.objectweb.jonas_ejb.deployment.api.EjbRelationshipRoleDesc.isSourceMultiple  ) 
 

Get state of opposite relationship-role is relation multiple.

Returns:
true if the opposite relationship-role is relation multiple.

Definition at line 352 of file EjbRelationshipRoleDesc.java.

boolean org.objectweb.jonas_ejb.deployment.api.EjbRelationshipRoleDesc.isTargetMultiple  ) 
 

Get state of this relationship-role is relation multiple. (get state of field is relation multiple).

Returns:
true if the relationship-role is relation multiple.

Definition at line 361 of file EjbRelationshipRoleDesc.java.

boolean org.objectweb.jonas_ejb.deployment.api.EjbRelationshipRoleDesc.mustCascade  ) 
 

Returns:
true if this bean must cascade delete the other bean in this relation.

Definition at line 369 of file EjbRelationshipRoleDesc.java.

void org.objectweb.jonas_ejb.deployment.api.EjbRelationshipRoleDesc.setIsJOnASCmrField  )  [protected]
 

mark the cmr as added by JOnAS

Definition at line 276 of file EjbRelationshipRoleDesc.java.

Referenced by org.objectweb.jonas_ejb.deployment.api.EjbRelationDesc.setJonasInfo().

void org.objectweb.jonas_ejb.deployment.api.EjbRelationshipRoleDesc.setSourceBean EntityCmp2Desc  led  )  [protected]
 

set the source bean of this relation-ship role.

Parameters:
led EntityCmp2Desc for the source bean of this relation-ship role.

Definition at line 284 of file EjbRelationshipRoleDesc.java.

Referenced by org.objectweb.jonas_ejb.deployment.api.DeploymentDescEjb2.DeploymentDescEjb2().

void org.objectweb.jonas_ejb.deployment.api.EjbRelationshipRoleDesc.setTargetBean EntityCmp2Desc  led  )  [protected]
 

set the target bean of this relation-ship role.

Parameters:
led EntityCmp2Desc for the target bean of this relation-ship role.

Definition at line 292 of file EjbRelationshipRoleDesc.java.

References org.objectweb.jonas_ejb.deployment.api.BeanDesc.getLocalClass().

Referenced by org.objectweb.jonas_ejb.deployment.api.DeploymentDescEjb2.DeploymentDescEjb2().

Here is the call graph for this function:

String org.objectweb.jonas_ejb.deployment.api.EjbRelationshipRoleDesc.toString  ) 
 

String representation of the object for test purpose

Returns:
String representation of this object

Definition at line 461 of file EjbRelationshipRoleDesc.java.

References org.objectweb.jonas_ejb.deployment.api.EntityCmp2Desc.toString().

Referenced by org.objectweb.jonas_ejb.deployment.api.EjbRelationDesc.toString().

Here is the call graph for this function:


Member Data Documentation

final byte org.objectweb.jonas_ejb.deployment.api.EjbRelationshipRoleDesc.INDEX = 1 [static]
 

This constant can be used to represent an index of a gen class.

Definition at line 51 of file EjbRelationshipRoleDesc.java.

final byte org.objectweb.jonas_ejb.deployment.api.EjbRelationshipRoleDesc.OOU = 0 [static]
 

Don't change these values without looking at getRelationType() !

Definition at line 68 of file EjbRelationshipRoleDesc.java.

final byte org.objectweb.jonas_ejb.deployment.api.EjbRelationshipRoleDesc.SOURCE = 2 [static]
 

This constant can be used to represent the source of the relation, ie the element which references the other.

Definition at line 57 of file EjbRelationshipRoleDesc.java.

final byte org.objectweb.jonas_ejb.deployment.api.EjbRelationshipRoleDesc.TARGET = 4 [static]
 

This constant can be used to represent the target of the relation, ie the element which is referenced by the other.

Definition at line 63 of file EjbRelationshipRoleDesc.java.


The documentation for this class was generated from the following file:
Generated on Tue Feb 15 15:11:12 2005 for JOnAS by  doxygen 1.3.9.1