|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.objectweb.jonas_ejb.deployment.api.EjbRelationshipRoleDesc
public class EjbRelationshipRoleDesc
Class to hold meta-information related to an ejb-relation-role Created on July 7, 2002
Field Summary | |
---|---|
protected java.lang.String |
cmrFieldName
|
protected java.lang.Class |
cmrFieldType
|
static byte |
INDEX
This constant can be used to represent an index of a gen class. |
protected boolean |
isJOnASCMR
|
static byte |
MMB
|
static byte |
MMU
|
static byte |
MOB
|
static byte |
MOU
|
static byte |
OMB
|
static byte |
OMU
|
static byte |
OOB
|
static byte |
OOU
Don't change these values without looking at getRelationType() ! |
static byte |
SOURCE
This constant can be used to represent the source of the relation, ie the element which references the other. |
static byte |
TARGET
This constant can be used to represent the target of the relation, ie the element which is referenced by the other. |
Constructor Summary | |
---|---|
EjbRelationshipRoleDesc(EjbRelationDesc rd,
java.lang.String name,
EjbRelationshipRole role,
JonasEjbRelationshipRole jrole,
EjbRelationshipRole opposite,
boolean isSlave,
org.objectweb.util.monolog.api.Logger logger)
constructor to be used by parent node |
Method Summary | |
---|---|
protected void |
fillMappingInfo()
Fills the mapping information of this relation-ship role with the values defined in jonas DD. |
protected void |
fillMappingInfoWithDefault()
Fills the mapping information of this relation-ship role with default values if the mapping information is not already initialized. |
java.lang.String |
getCmrFieldName()
get the name of the cmr-field. |
java.lang.Class |
getCmrFieldType()
get the type of the cmr-field when set in the deployment descriptor. |
java.lang.String |
getForeignKeyJdbcName(java.lang.String jdbcFieldName)
|
java.lang.String |
getName()
return the name of this relationship role. |
EjbRelationshipRoleDesc |
getOppositeRelationshipRole()
get the opposite relation-ship-role of this relation-ship-role. |
EjbRelationDesc |
getRelation()
get the parent ejb relation of this relation-ship-role. |
byte |
getRelationType()
This method depends on static values OOB,OOU,... |
EntityCmp2Desc |
getSourceBean()
Get the ejb involved in this relation-ship-role. |
java.lang.String |
getSourceBeanName()
Get the name of the ejb involved in this relation-ship-role. |
EntityCmp2Desc |
getTargetBean()
It retrieves the EntityCmp2Desc which is linked to the EntityCmp2Desc associated to this EjbRelationshipRoleDesc. |
boolean |
hasCmrField()
It retrieves true if the EntityCmp2Desc associated to this EjbRelationshipRoleDesc has a cmr field to the linked EntityCmp2Desc |
boolean |
hasJdbcMapping()
Is a jdbc mapping is defined for this relationship role ? |
boolean |
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. |
boolean |
isSlave()
In M-N relationships, only 1 role will write data on DB. |
boolean |
isSourceMultiple()
Get state of opposite relationship-role is relation multiple. |
boolean |
isTargetMultiple()
Get state of this relationship-role is relation multiple. |
boolean |
mustCascade()
|
protected void |
setCmrFieldName(java.lang.String name)
|
protected void |
setCmrFieldType(java.lang.String type)
|
protected void |
setIsJOnASCmrField()
mark the cmr as added by JOnAS |
protected void |
setSourceBean(EntityCmp2Desc led)
set the source bean of this relation-ship role. |
protected void |
setTargetBean(EntityCmp2Desc led)
set the target bean of this relation-ship role. |
java.lang.String |
toString()
String representation of the object for test purpose |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final byte INDEX
public static final byte SOURCE
public static final byte TARGET
public static final byte OOU
public static final byte OOB
public static final byte OMU
public static final byte OMB
public static final byte MOU
public static final byte MOB
public static final byte MMU
public static final byte MMB
protected java.lang.String cmrFieldName
protected java.lang.Class cmrFieldType
protected boolean isJOnASCMR
Constructor Detail |
---|
public EjbRelationshipRoleDesc(EjbRelationDesc rd, java.lang.String name, EjbRelationshipRole role, JonasEjbRelationshipRole jrole, EjbRelationshipRole opposite, boolean isSlave, org.objectweb.util.monolog.api.Logger logger) throws DeploymentDescException
rd
- parent node = EjbRelationDescrole
- this role (standard EjbRelationshipRole)jrole
- this Jonas role (JonasEjbRelationshipRole). This param may
be null.opposite
- opposite role in the relation (standard
EjbRelationshipRole)
DeploymentDescException
- in error case.Method Detail |
---|
protected void fillMappingInfo() throws DeploymentDescException
DeploymentDescException
- in error case.protected void fillMappingInfoWithDefault()
public java.lang.String getName()
protected void setCmrFieldName(java.lang.String name) throws DeploymentDescException
DeploymentDescException
protected void setCmrFieldType(java.lang.String type) throws DeploymentDescException
DeploymentDescException
protected void setIsJOnASCmrField()
protected void setSourceBean(EntityCmp2Desc led)
led
- EntityCmp2Desc for the source bean of this relation-ship role.protected void setTargetBean(EntityCmp2Desc led)
led
- EntityCmp2Desc for the target bean of this relation-ship role.public EjbRelationDesc getRelation()
public EjbRelationshipRoleDesc getOppositeRelationshipRole()
public java.lang.String getSourceBeanName()
public EntityCmp2Desc getSourceBean()
public EntityCmp2Desc getTargetBean()
public boolean isSourceMultiple()
public boolean isTargetMultiple()
public boolean mustCascade()
public boolean isJOnASCmrField()
public boolean hasCmrField()
public java.lang.String getCmrFieldName()
public java.lang.Class getCmrFieldType()
public byte getRelationType()
public boolean hasJdbcMapping()
public boolean isSlave()
public java.lang.String getForeignKeyJdbcName(java.lang.String jdbcFieldName)
jdbcFieldName
- a primary key column name of the table associated to
the target bean.
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |