org.objectweb.jonas_ejb.deployment.api
Class EntityCmp2Desc

java.lang.Object
  extended byorg.objectweb.jonas_ejb.deployment.api.BeanDesc
      extended byorg.objectweb.jonas_ejb.deployment.api.EntityDesc
          extended byorg.objectweb.jonas_ejb.deployment.api.EntityCmpDesc
              extended byorg.objectweb.jonas_ejb.deployment.api.EntityCmp2Desc
Direct Known Subclasses:
EntityJdbcCmp2Desc

public abstract class EntityCmp2Desc
extends EntityCmpDesc

Class to hold meta-information related to an entity of type CMP version 2. Created on Jun 24, 2002

Author:
Christophe Ney [cney@batisseurs.com] contributor(s): - Helene Joanin on May 2003: code cleanup - Helene Joanin on May 2003: complement for legacy first version

Field Summary
protected  java.lang.String abstractSchemaName
           
protected  DeploymentCmp2Desc dc2d
           
protected  java.lang.String factoryClassName
           
 
Fields inherited from class org.objectweb.jonas_ejb.deployment.api.EntityCmpDesc
fieldDesc, primaryKeyField
 
Fields inherited from class org.objectweb.jonas_ejb.deployment.api.EntityDesc
cleanup, CLEANUP_CREATE, CLEANUP_NONE, CLEANUP_REMOVEALL, CLEANUP_REMOVEDATA, METHODS_HOME_NO_TX, METHODS_REMOTE_NO_TX, passivationTimeout, prefetch, primaryKeyClass, reentrant, shared
 
Fields inherited from class org.objectweb.jonas_ejb.deployment.api.BeanDesc
BEAN_TRANSACTION_TYPE, cacheMax, CONTAINER_TRANSACTION_TYPE, deploymentDesc, derivedBeanName, displayName, ejb10EnvProps, ejbClass, ejbLocalRefDesc, ejbName, ejbRefDesc, envEntryDesc, fileName, fullDerivedBeanName, home, jndiName, local, localhome, logger, poolMin, remote, resourceEnvRefDesc, resourceRefDesc, securityRoleRef, serviceRefs, TRANS
 
Constructor Summary
EntityCmp2Desc(java.lang.ClassLoader classLoader, org.objectweb.jonas_ejb.deployment.xml.Entity ent, org.objectweb.jonas_ejb.deployment.xml.AssemblyDescriptor asd, org.objectweb.jonas_ejb.deployment.xml.JonasEntity jEnt, DeploymentCmp2Desc dc2d, java.lang.String fileName)
          constructor: called when the DeploymentDescriptor is read.
 
Method Summary
 void addEjbRelationshipRoleDesc(EjbRelationshipRoleDesc ersrd)
          Add meta-info of a relationship in which the bean is involved
 void addToJormList(org.objectweb.jorm.metainfo.api.MetaObject jobject)
          add a Jorm MetaObject in the list of Jorm Meta Objects to generate
 java.lang.String getAbstractSchemaName()
          getter for field abstractSchemaName
 java.util.Iterator getCmpFieldDescIterator()
          get iterator on meta information for all cmp fields
 DeploymentCmp2Desc getDeploymentCMP2Desc()
           
 EjbRelationshipRoleDesc getEjbRelationshipRoleDesc(java.lang.String cmr)
          Get the EjbRelationshipRoleDesc corresponding to the given cmr field name.
 java.util.Iterator getEjbRelationshipRoleDescIterator()
          Get Iterator on meta-info for all relationships for which the bean is involved in.
 java.lang.String getFactoryClassName(java.lang.String mapper)
          It retrieves the class name of the generated Jorm mapping.
 java.lang.String getJormAccessorClassName()
          It retrieves the class name of the generated Jorm accessor interface.
 java.lang.String getJormBinderClassName()
          It retrieves the class name of the generated Jorm Binder.
 java.lang.String getJormBindingClassName(java.lang.String mapper)
          It retrieves the class name of the generated Jorm binding.
 java.lang.String getJormClassName()
          Get the Jorm Fully Qualified Class name in JOrm Meta Info It is built from the Abstract Shema Name.
 java.lang.String getJormCoherenceHelperFQItfName()
           
 java.lang.String getJormCoherenceHelperItfName()
           
 java.lang.String getJormCoherenceHelperPackageName()
           
 java.util.Collection getJormList()
          Get the list of Jorm MetaObjects to be generated
 java.lang.String getJormPKClassName()
          Retrieves the Jorm PK Class, in case of composite PK Used by Jorm to generate PNameGetter and Binder classes
 java.lang.String getJormPNameGetterClassName()
          It retrieves the class name of the generated Jorm PNameGetter interface.
 boolean needJormCoherenceHelper()
           
protected  MethodDesc newMethodDescInstance(java.lang.reflect.Method meth, int index)
          Factory method for MethodDesc.
 java.lang.String toString()
          String representation of the object for test and debug purpose
 
Methods inherited from class org.objectweb.jonas_ejb.deployment.api.EntityCmpDesc
getCmpFieldDesc, getPrimaryKeyFieldName, getSimplePkField, getSimplePkFieldName, hasPrimaryKeyField, hasSimplePkField, newFieldDescInstance
 
Methods inherited from class org.objectweb.jonas_ejb.deployment.api.EntityDesc
checkTxAttribute, getCleanupPolicy, getPassivationTimeout, getPrimaryKeyClass, isPrefetch, isReentrant, isShared
 
Methods inherited from class org.objectweb.jonas_ejb.deployment.api.BeanDesc
addMethodDesc, check, checkRemoteException, getCacheMax, getDeploymentDesc, getDerivedBeanName, getDisplayName, getEjb10Environment, getEjbClass, getEjbLocalRefDesc, getEjbName, getEjbRefDesc, getEnvEntryDesc, getFullDerivedBeanName, getFullWrpHandleName, getFullWrpHomeName, getFullWrpLocalHomeName, getFullWrpLocalName, getFullWrpRemoteName, getHomeClass, getIdentifierFromEjbName, getJndiLocalName, getJndiName, getLocalClass, getLocalHomeClass, getMethodDesc, getMethodDesc, getMethodDescIterator, getPoolMin, getRemoteClass, getResourceEnvRefDesc, getResourceRefDesc, getRoleLink, getRunAsRole, getSecurityRoleNames, getServiceRefDesc, getWrpHandleName, getWrpHomeName, getWrpLocalHomeName, getWrpLocalName, getWrpRemoteName, setDeploymentDesc, verifyRoleName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

abstractSchemaName

protected java.lang.String abstractSchemaName

factoryClassName

protected java.lang.String factoryClassName

dc2d

protected DeploymentCmp2Desc dc2d
Constructor Detail

EntityCmp2Desc

public EntityCmp2Desc(java.lang.ClassLoader classLoader,
                      org.objectweb.jonas_ejb.deployment.xml.Entity ent,
                      org.objectweb.jonas_ejb.deployment.xml.AssemblyDescriptor asd,
                      org.objectweb.jonas_ejb.deployment.xml.JonasEntity jEnt,
                      DeploymentCmp2Desc dc2d,
                      java.lang.String fileName)
               throws DeploymentDescException
constructor: called when the DeploymentDescriptor is read. Currently, called by both GenIC and createContainer.

Method Detail

getDeploymentCMP2Desc

public DeploymentCmp2Desc getDeploymentCMP2Desc()

getAbstractSchemaName

public java.lang.String getAbstractSchemaName()
getter for field abstractSchemaName


getJormClassName

public java.lang.String getJormClassName()
Get the Jorm Fully Qualified Class name in JOrm Meta Info It is built from the Abstract Shema Name.

Returns:
the Jorm Class Name

getJormList

public java.util.Collection getJormList()
Get the list of Jorm MetaObjects to be generated

Returns:
a Collection of Jorm Meta Objects

addToJormList

public void addToJormList(org.objectweb.jorm.metainfo.api.MetaObject jobject)
add a Jorm MetaObject in the list of Jorm Meta Objects to generate

Parameters:
jobject - the Jorm MetaObject to add in the list

addEjbRelationshipRoleDesc

public void addEjbRelationshipRoleDesc(EjbRelationshipRoleDesc ersrd)
Add meta-info of a relationship in which the bean is involved


getEjbRelationshipRoleDescIterator

public java.util.Iterator getEjbRelationshipRoleDescIterator()
Get Iterator on meta-info for all relationships for which the bean is involved in.


getEjbRelationshipRoleDesc

public EjbRelationshipRoleDesc getEjbRelationshipRoleDesc(java.lang.String cmr)
Get the EjbRelationshipRoleDesc corresponding to the given cmr field name. Return null if it doesn't exist.


getCmpFieldDescIterator

public java.util.Iterator getCmpFieldDescIterator()
get iterator on meta information for all cmp fields


newMethodDescInstance

protected MethodDesc newMethodDescInstance(java.lang.reflect.Method meth,
                                           int index)
Factory method for MethodDesc. Only method with EJBQL queries are of type MethodCmp2Desc

Overrides:
newMethodDescInstance in class BeanDesc

getJormAccessorClassName

public java.lang.String getJormAccessorClassName()
It retrieves the class name of the generated Jorm accessor interface. Used in the templates

Returns:
the fully qualified class name

getJormBindingClassName

public java.lang.String getJormBindingClassName(java.lang.String mapper)
It retrieves the class name of the generated Jorm binding. Used by the JormFactory

Parameters:
mapper - The mapper name
Returns:
the fully qualified class name

getFactoryClassName

public java.lang.String getFactoryClassName(java.lang.String mapper)
It retrieves the class name of the generated Jorm mapping. Used in the JContainer to instanciate the JEntityFactory

Parameters:
mapper - The mapper name
Returns:
the fully qualified class name

getJormPKClassName

public java.lang.String getJormPKClassName()
Retrieves the Jorm PK Class, in case of composite PK Used by Jorm to generate PNameGetter and Binder classes

Returns:
the fully qualified class name

getJormPNameGetterClassName

public java.lang.String getJormPNameGetterClassName()
It retrieves the class name of the generated Jorm PNameGetter interface. Used in the templates to generate CMP2 classes.

Returns:
the fully qualified class name

getJormBinderClassName

public java.lang.String getJormBinderClassName()
It retrieves the class name of the generated Jorm Binder. Used in the Jorm Factory

Returns:
the fully qualified class name

needJormCoherenceHelper

public boolean needJormCoherenceHelper()
Returns:
true if at least one relation

getJormCoherenceHelperItfName

public java.lang.String getJormCoherenceHelperItfName()

getJormCoherenceHelperPackageName

public java.lang.String getJormCoherenceHelperPackageName()

getJormCoherenceHelperFQItfName

public java.lang.String getJormCoherenceHelperFQItfName()

toString

public java.lang.String toString()
String representation of the object for test and debug purpose

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