org.eclipse.jst.j2ee.ejb
Interface CommonRelationshipRole

All Known Subinterfaces:
EJBRelationshipRole

public interface CommonRelationshipRole

Insert the type's description here. Creation date: (10/26/2001 9:24:27 AM)

Since:
1.0

Method Summary
 EList getAttributes()
          Return the persistentAttributes from my Entity that are used by this role.
 CommonRelationship getCommonRelationship()
          Return our parent relationship as a CommonRelationship
 java.lang.String getName()
          Defines a name for a role that is unique within an ejb-relation.
 CommonRelationshipRole getOppositeAsCommonRole()
          Return the other role.
 java.lang.String getRoleName()
          Return the actual name of this role.
 ContainerManagedEntity getSourceEntity()
           
 java.lang.String getTargetAttributeName(CMPAttribute roleAttribute)
          Gets the attribute name of a given CMPAttribute
 ContainerManagedEntity getTypeEntity()
          Compute the ContainerManagedEntity which is the type of a role that participates in a relationship.
 boolean isForward()
           
 boolean isKey()
          Returns true if this is a key
 boolean isMany()
           
 boolean isNavigable()
           
 boolean isRequired()
          Method isRequired.
 void reconcileAttributes()
          Collects the attributes
 void setKey(boolean aBoolean)
          This method should be used as a hint about the key status of the role.
 void setLower(int lowerBound)
          sets the lower limit of our multiplicity
 void setUpper(int upperBound)
          sets the upper limit of our multiplicity
 

Method Detail

getAttributes

public EList getAttributes()
Return the persistentAttributes from my Entity that are used by this role.

Returns:
the attributes of the CommonRelationshipRole

getCommonRelationship

public CommonRelationship getCommonRelationship()
Return our parent relationship as a CommonRelationship

Returns:
the CommonRelationship reference

getName

public java.lang.String getName()
Defines a name for a role that is unique within an ejb-relation. Different relationships can use the same name for a role.

Returns:
The value of the Name attribute

getRoleName

public java.lang.String getRoleName()
Return the actual name of this role. This is the name defined in the Deployment Descriptor. You should use getName() for the name to use in code generation.

Returns:
the name of the CommonRelationshipRole

getOppositeAsCommonRole

public CommonRelationshipRole getOppositeAsCommonRole()
Return the other role.

Returns:
CommonRelationshipRole reference

getSourceEntity

public ContainerManagedEntity getSourceEntity()
Returns:
The Source ejb Compute the ContainerManagedEntity which is the source of a role that participates in a relationship.

getTypeEntity

public ContainerManagedEntity getTypeEntity()
Compute the ContainerManagedEntity which is the type of a role that participates in a relationship.

Returns:
The type ejb

isForward

public boolean isForward()
Returns:
The computed value of the isForward attribute Specifies whether this role should be mapped to a persistent reference, such as a foreign key.

isKey

public boolean isKey()
Returns true if this is a key

Returns:
The computed value isKey

setKey

public void setKey(boolean aBoolean)
This method should be used as a hint about the key status of the role.

Parameters:
aBoolean - the boolean value

isMany

public boolean isMany()
Returns:
The computed value isMany Returns whether the upper limit of our multiplicity is > 1

setUpper

public void setUpper(int upperBound)
sets the upper limit of our multiplicity

Parameters:
upperBound - the int value of the multiplicity

setLower

public void setLower(int lowerBound)
sets the lower limit of our multiplicity

Parameters:
lowerBound - the int value if the multiplicity

isNavigable

public boolean isNavigable()
Returns:
The computed value of the isNavigable attribute Specifies that accessors should be generated for this relationship role.

getTargetAttributeName

public java.lang.String getTargetAttributeName(CMPAttribute roleAttribute)
Gets the attribute name of a given CMPAttribute

Parameters:
roleAttribute - the CMPAttribute
Returns:
the name of the targetAttribute

reconcileAttributes

public void reconcileAttributes()
Collects the attributes


isRequired

public boolean isRequired()
Method isRequired.

Returns:
boolean value