| java.lang.Object org.objectweb.jonas_ejb.deployment.api.EjbRelationshipRoleDesc
EjbRelationshipRoleDesc | public class EjbRelationshipRoleDesc (Code) | | Class to hold meta-information related to an ejb-relation-role
Created on July 7, 2002
author: Christophe Ney [cney@batisseurs.com] : Initial developer author: Helene Joanin on May 2003: code cleanup author: Helene Joanin on May 2003: complement for legacy first version |
Field Summary | |
final public static byte | INDEX This constant can be used to represent an index of a gen class. | final public static byte | MMB | final public static byte | MMU | final public static byte | MOB | final public static byte | MOU | final public static byte | OMB | final public static byte | OMU | final public static byte | OOB | final public static byte | OOU | final public static byte | SOURCE This constant can be used to represent the source of the relation, ie the
element which references the other. | final public static byte | TARGET This constant can be used to represent the target of the relation, ie the
element which is referenced by the other. | protected String | cmrFieldName | protected Class | cmrFieldType | protected boolean | isJOnASCMR |
INDEX | final public static byte INDEX(Code) | | This constant can be used to represent an index of a gen class.
|
MMB | final public static byte MMB(Code) | | |
MMU | final public static byte MMU(Code) | | |
MOB | final public static byte MOB(Code) | | |
MOU | final public static byte MOU(Code) | | |
OMB | final public static byte OMB(Code) | | |
OMU | final public static byte OMU(Code) | | |
OOB | final public static byte OOB(Code) | | |
OOU | final public static byte OOU(Code) | | Don't change these values without looking at getRelationType() !
|
SOURCE | final public static byte SOURCE(Code) | | This constant can be used to represent the source of the relation, ie the
element which references the other.
|
TARGET | final public static byte TARGET(Code) | | This constant can be used to represent the target of the relation, ie the
element which is referenced by the other.
|
isJOnASCMR | protected boolean isJOnASCMR(Code) | | |
fillMappingInfoWithDefault | protected void fillMappingInfoWithDefault()(Code) | | Fills the mapping information of this relation-ship role with default
values if the mapping information is not already initialized.
|
getCmrFieldName | public String getCmrFieldName()(Code) | | get the name of the cmr-field.
the String name of the cmr-field. |
getCmrFieldType | public Class getCmrFieldType()(Code) | | get the type of the cmr-field when set in the deployment descriptor.
Collection or Set for multiple rel. and null for non multiplerel. |
getForeignKeyJdbcName | public String getForeignKeyJdbcName(String jdbcFieldName)(Code) | | Parameters: jdbcFieldName - a primary key column name of the table associated tothe target bean. the foreign key column name associated to the given primary keycolumn name. |
getName | public String getName()(Code) | | return the name of this relationship role.
the String name of this relationship role. |
getOppositeRelationshipRole | public EjbRelationshipRoleDesc getOppositeRelationshipRole()(Code) | | get the opposite relation-ship-role of this relation-ship-role.
the opposite EjbRelationshipRoleDesc of this relation-ship-role. |
getRelation | public EjbRelationDesc getRelation()(Code) | | get the parent ejb relation of this relation-ship-role.
the EjbRelationDesc of this relation-ship-role. |
getRelationType | public byte getRelationType()(Code) | | This method depends on static values OOB,OOU,... defined upper !
the type of the relation: OO-u, OO-b, OM-u, .... |
getSourceBean | public EntityCmp2Desc getSourceBean()(Code) | | Get the ejb involved in this relation-ship-role. this is the source bean
of this relation.
the EntityCmp2Desc of the source bean. |
getSourceBeanName | public String getSourceBeanName()(Code) | | Get the name of the ejb involved in this relation-ship-role. This is the
source bean name of this relation.
the String ejb-name of the source bean. |
getTargetBean | public EntityCmp2Desc getTargetBean()(Code) | | It retrieves the EntityCmp2Desc which is linked to the EntityCmp2Desc
associated to this EjbRelationshipRoleDesc. This is the target bean of
this relationship role
the EntityCmp2Desc of the target bean. |
hasCmrField | public boolean hasCmrField()(Code) | | It retrieves true if the EntityCmp2Desc associated to this
EjbRelationshipRoleDesc has a cmr field to the linked EntityCmp2Desc
true if the relation-ship-role has a CMR field. |
hasJdbcMapping | public boolean hasJdbcMapping()(Code) | | Is a jdbc mapping is defined for this relationship role ?
true if a jdbc mapping is defined for this relationship role. |
isJOnASCmrField | public boolean isJOnASCmrField()(Code) | | 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
true if the CMR field is not a bean's programmer CMR field. |
isSlave | public boolean isSlave()(Code) | | In M-N relationships, only 1 role will write data on DB.
true if role will not write MN relations on database |
isSourceMultiple | public boolean isSourceMultiple()(Code) | | Get state of opposite relationship-role is relation multiple.
true if the opposite relationship-role is relation multiple. |
isTargetMultiple | public boolean isTargetMultiple()(Code) | | Get state of this relationship-role is relation multiple. (get state of
field is relation multiple).
true if the relationship-role is relation multiple. |
mustCascade | public boolean mustCascade()(Code) | | true if this bean must cascade delete the other bean in thisrelation. |
setIsJOnASCmrField | protected void setIsJOnASCmrField()(Code) | | mark the cmr as added by JOnAS
|
setSourceBean | protected void setSourceBean(EntityCmp2Desc led)(Code) | | set the source bean of this relation-ship role.
Parameters: led - EntityCmp2Desc for the source bean of this relation-ship role. |
setTargetBean | protected void setTargetBean(EntityCmp2Desc led)(Code) | | set the target bean of this relation-ship role.
Parameters: led - EntityCmp2Desc for the target bean of this relation-ship role. |
toString | public String toString()(Code) | | String representation of the object for test purpose
String representation of this object |
|
|