org.objectweb.jonas_ejb.genic
Class VcCMRField

java.lang.Object
  extended byorg.objectweb.jonas_ejb.genic.VcCMRField

public class VcCMRField
extends java.lang.Object

This class is used in the velocity context. It represents a CMR field.

Author:
S.Chassande-Barrioz : Initial developer, Helene Joanin

Constructor Summary
VcCMRField(EjbRelationshipRoleDesc rsr)
          It builds a cmr field descriptor usable in velocity context.
 
Method Summary
 EntityCmp2Desc getElement()
           
 java.lang.String getGenClassName()
           
 java.lang.String getHelperClassName()
          CoherenceHelper class is used to manage coherence in relations.
 java.lang.String getHelperFQClassName()
          CoherenceHelper class is used to manage coherence in relations.
 java.lang.String getName()
           
 java.lang.String getOppositeHelperClassName()
          CoherenceHelper class is used to manage coherence in relations.
 java.lang.String getOppositeHelperFQClassName()
          CoherenceHelper class is used to manage coherence in relations.
 java.lang.String getOppositeUFLCMRName()
           
 EjbRelationshipRoleDesc getRsr()
           
 java.lang.String getTypeName()
           
 java.lang.String getUFLName()
          This is used to generate method names relative to the CMR Field
 boolean isMMb()
           
 boolean isMMu()
           
 boolean isMOb()
           
 boolean isMOu()
           
 boolean isOMb()
           
 boolean isOMu()
           
 boolean isOOb()
           
 boolean isOOu()
           
 java.lang.String jormGetter()
           
 java.lang.String jormSetter()
           
 java.lang.String toString()
           
 java.lang.String upperFL(java.lang.String word)
          It capitalizes the first letter of a word.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VcCMRField

public VcCMRField(EjbRelationshipRoleDesc rsr)
           throws GenICException
It builds a cmr field descriptor usable in velocity context.

Parameters:
rsr - The EjbRelationshipRoleDesc where this CMR field is defined
Throws:
GenICException - if the Deployment Decriptor is not conform
Method Detail

getName

public java.lang.String getName()
Returns:
the name of the cmr field.

getTypeName

public java.lang.String getTypeName()
Returns:
the type name of the cmr field. It is the referenced class if the relation is multiple, otherwise the type of the multivalued relation (java.util.Collection or java.util.Set).

getUFLName

public java.lang.String getUFLName()
This is used to generate method names relative to the CMR Field

Returns:
the name of cmr field with the first letter capitalized.

jormGetter

public java.lang.String jormGetter()

jormSetter

public java.lang.String jormSetter()

getRsr

public EjbRelationshipRoleDesc getRsr()
Returns:
the JOnAS meta object where the CMR field is defined

getOppositeUFLCMRName

public java.lang.String getOppositeUFLCMRName()
Returns:
the name of opposite cmr field with the first letter capitalized.

getHelperClassName

public java.lang.String getHelperClassName()
CoherenceHelper class is used to manage coherence in relations.

Returns:
The JOnAS CoherenceHelper class name

getHelperFQClassName

public java.lang.String getHelperFQClassName()
CoherenceHelper class is used to manage coherence in relations.

Returns:
The Fully Qualified JOnAS CoherenceHelper class name

getOppositeHelperClassName

public java.lang.String getOppositeHelperClassName()
CoherenceHelper class is used to manage coherence in relations.

Returns:
The JOnAS CoherenceHelper class name for opposite bean

getOppositeHelperFQClassName

public java.lang.String getOppositeHelperFQClassName()
CoherenceHelper class is used to manage coherence in relations.

Returns:
The JOnAS CoherenceHelper fully qualified class name for opposite bean

getGenClassName

public java.lang.String getGenClassName()
Returns:
the class name of the gen class which must be used if the cmr is multiple and return null otherwise. The class which the is returned implements the interface which the name is returned by the 'getTypeName' method.

getElement

public EntityCmp2Desc getElement()
Returns:
the description of the field

upperFL

public java.lang.String upperFL(java.lang.String word)
It capitalizes the first letter of a word.

Parameters:
word - is the input string to capitalize the first letter
Returns:
a String with first letter capitalized

isOOu

public boolean isOOu()
Returns:
true if the relationship role is one-one unidirectional, false if not.

isOOb

public boolean isOOb()
Returns:
true if the relationship role is one-one bidirectional, false if not.

isOMu

public boolean isOMu()
Returns:
true if the relationship role is one-many unidirectional, false if not.

isMOu

public boolean isMOu()
Returns:
true if the relationship role is many-one unidirectional, false if not.

isMOb

public boolean isMOb()
Returns:
true if the relationship role is many-one bidirectional, false if not.

isOMb

public boolean isOMb()
Returns:
true if the relationship role is one-many bidirectional, false if not.

isMMu

public boolean isMMu()
Returns:
true if the relationship role is many-many unidirectional, false if not.

isMMb

public boolean isMMb()
Returns:
true if the relationship role is many-many bidirectional, false if not.

toString

public java.lang.String toString()
Returns:
a string representation of the VcCMRField object for debug use