org.ow2.jonas.deployment.ejb
Class EjbRelationDesc

java.lang.Object
  extended by org.ow2.jonas.deployment.ejb.EjbRelationDesc

public class EjbRelationDesc
extends Object

Class to hold meta-information related to an ejb-relation.

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, Ph Durieux (may 2004): default names for relations and roles.

Constructor Summary
EjbRelationDesc(EjbRelation er, 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 with the values defined in jonas DD.
protected  void fillMappingInfoWithDefault()
          Fills the mapping information of this relation with default values, if the mapping information is not already initialized.
 String getJdbcTableName()
          Return the table name in the database associated to this relation.
 String getName()
          get the name of the relationship.
 EjbRelationshipRoleDesc getRelationshipRole1()
          get the meta-information for the first relation-ship-role
 EjbRelationshipRoleDesc getRelationshipRole2()
          get the meta-information for the second relation-ship-role
 boolean hasJdbcTable()
          Is a table in the database is defined for this relation ?
 void setJonasInfo(JonasEjbRelation jer)
          Finish initialisation
 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
 

Constructor Detail

EjbRelationDesc

public EjbRelationDesc(EjbRelation er,
                       org.objectweb.util.monolog.api.Logger logger)
                throws DeploymentDescException
constructor to be used by parent node.

Parameters:
er - The described object EjbRelation
logger - The logger
Throws:
DeploymentDescException - thrown in error case.
Method Detail

setJonasInfo

public void setJonasInfo(JonasEjbRelation jer)
                  throws DeploymentDescException
Finish initialisation

Parameters:
jer - The described object JonasEjbRelation. This param may be null.
Throws:
DeploymentDescException - in error case

fillMappingInfo

protected void fillMappingInfo()
                        throws DeploymentDescException
Fills the mapping information of this relation with the values defined in jonas DD.

Throws:
DeploymentDescException - thrown in error case.

fillMappingInfoWithDefault

protected void fillMappingInfoWithDefault()
Fills the mapping information of this relation with default values, if the mapping information is not already initialized.


getName

public String getName()
get the name of the relationship.

Returns:
the String name of the relationship.

getRelationshipRole1

public EjbRelationshipRoleDesc getRelationshipRole1()
get the meta-information for the first relation-ship-role

Returns:
the EjbRelationshipRoleDesc for the first relation-ship-role

getRelationshipRole2

public EjbRelationshipRoleDesc getRelationshipRole2()
get the meta-information for the second relation-ship-role

Returns:
the EjbRelationshipRoleDesc for the second relation-ship-role

hasJdbcTable

public boolean hasJdbcTable()
Is a table in the database is defined for this relation ?

Returns:
true if table name in the database is defined for this relation.

getJdbcTableName

public String getJdbcTableName()
Return the table name in the database associated to this relation.

Returns:
the String name of the table associated to this relation.

toString

public String toString()
String representation of the object for test purpose

Overrides:
toString in class Object
Returns:
String representation of this object


Copyright © 2010 OW2 Consortium. All Rights Reserved.