org.ow2.jonas.deployment.ejb
Class EntityCmp2Desc

java.lang.Object
  extended by org.ow2.jonas.deployment.common.DescriptionGroupDesc
      extended by org.ow2.jonas.deployment.common.JndiEnvRefsGroupDesc
          extended by org.ow2.jonas.deployment.ejb.BeanDesc
              extended by org.ow2.jonas.deployment.ejb.EntityDesc
                  extended by org.ow2.jonas.deployment.ejb.EntityCmpDesc
                      extended by org.ow2.jonas.deployment.ejb.EntityCmp2Desc
All Implemented Interfaces:
IDescriptionGroupDesc, IJNDIEnvRefsGroupDesc
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] : Initial developper, Helene Joanin : code cleanup on May 2003, Helene Joanin : complement for legacy first version on May 2003

Field Summary
protected  String abstractSchemaName
           
protected  DeploymentDescEjb2 dc2d
           
protected  String factoryClassName
           
 
Fields inherited from class org.ow2.jonas.deployment.ejb.EntityCmpDesc
fieldDesc, jdbcAutomaticPkFieldName, primaryKeyField
 
Fields inherited from class org.ow2.jonas.deployment.ejb.EntityDesc
cleanup, CLEANUP_CREATE, CLEANUP_NONE, CLEANUP_REMOVEALL, CLEANUP_REMOVEDATA, deadlockTimeout, hardLimit, inactivityTimeout, jdbcAutomaticPk, LOCK_CONTAINER_READ_COMMITTED, LOCK_CONTAINER_READ_UNCOMMITTED, LOCK_CONTAINER_READ_WRITE, LOCK_CONTAINER_SERIALIZED, LOCK_CONTAINER_SERIALIZED_TRANSACTED, LOCK_DATABASE, LOCK_READ_ONLY, lockPolicy, maxWaitTime, METHODS_HOME_NO_TX, METHODS_REMOTE_NO_TX, passivationTimeout, pkObjectType, prefetch, primaryKeyClass, readTimeout, reentrant, shared
 
Fields inherited from class org.ow2.jonas.deployment.ejb.BeanDesc
BEAN_TRANSACTION_TYPE, beanIdentification, cacheMax, clusterReplicated, CONTAINER_TRANSACTION_TYPE, deploymentDesc, derivedBeanName, ejb10EnvProps, ejbClass, ejbName, ejbTimeoutSignature, fullDerivedBeanName, GENERATED_PREFIX, home, jndiLocalName, jndiName, local, localhome, poolMin, remote, securityRoleRefDescList, timerTxAttribute, TRANS
 
Fields inherited from class org.ow2.jonas.deployment.common.JndiEnvRefsGroupDesc
logger
 
Fields inherited from class org.ow2.jonas.deployment.common.DescriptionGroupDesc
description, displayName, largeIcon, smallIcon
 
Constructor Summary
EntityCmp2Desc(ClassLoader classLoader, Entity ent, AssemblyDescriptor asd, JonasEntity jEnt, DeploymentDescEjb2 dc2d, JLinkedList jMDRList, 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
 String getAbstractSchemaName()
          getter for field abstractSchemaName
 DeploymentDescEjb2 getDeploymentDescEjb2()
           
 EjbRelationshipRoleDesc getEjbRelationshipRoleDesc(String cmr)
          Get the EjbRelationshipRoleDesc corresponding to the given cmr field name.
 Iterator getEjbRelationshipRoleDescIterator()
          Get Iterator on meta-info for all relationships for which the bean is involved in.
 String getFactoryClassName()
          It retrieves the class name of the generated Jorm mapping.
 String getJormAccessorClassName()
          It retrieves the class name of the generated Jorm accessor interface.
 String getJormBinderClassName()
          It retrieves the class name of the generated Jorm Binder.
 String getJormBindingClassName()
          It retrieves the class name of the generated Jorm binding.
 String getJormClassName()
          Get the Jorm Fully Qualified Class name in JOrm Meta Info It is built from the Abstract Shema Name.
 String getJormCoherenceHelperFQItfName()
           
 String getJormCoherenceHelperItfName()
           
 String getJormCoherenceHelperPackageName()
           
 String getJormPKClassName()
          Retrieves the Jorm PK Class, in case of composite PK Used by Jorm to generate PNameGetter and Binder classes
 String getJormPNameGetterClassName()
          It retrieves the class name of the generated Jorm PNameGetter interface.
 String getJormStateClassName()
          Return the class name of the generated Jorm state class.
 boolean needJormCoherenceHelper()
           
protected  MethodDesc newMethodDescInstance(Method meth, Class classDef, int index)
          Factory method for MethodDesc.
 String toString()
          String representation of the object for test and debug purpose
 
Methods inherited from class org.ow2.jonas.deployment.ejb.EntityCmpDesc
getCmpFieldDesc, getCmpFieldDescIterator, getJdbcAutomaticPkFieldName, getPrimaryKeyFieldName, getSimplePkField, getSimplePkFieldName, hasPrimaryKeyField, hasSimplePkField, newFieldDescInstance
 
Methods inherited from class org.ow2.jonas.deployment.ejb.EntityDesc
checkTxAttribute, getCleanupPolicy, getDeadlockTimeout, getInactivityTimeout, getLockPolicy, getMaxWaitTime, getPassivationTimeout, getPrimaryKeyClass, getReadTimeout, isAutomaticPk, isHardLimit, isPrefetch, isReentrant, isShared, isUndefinedPK
 
Methods inherited from class org.ow2.jonas.deployment.ejb.BeanDesc
addEJBMethodDesc, addMethodDesc, check, checkRemoteException, checkRunAsMapping, checkValidTypesForRmi, getCacheMax, getCluster, getDeploymentDesc, getDerivedBeanName, getEjb10Environment, getEjbClass, getEjbName, getEjbTimeoutSignature, getFullDerivedBeanName, getFullWrpHandleName, getFullWrpHomeName, getFullWrpLocalHomeName, getFullWrpLocalName, getFullWrpRemoteName, getHashCodeForIdentifier, getHomeClass, getIdentifier, getJndiLocalName, getJndiName, getLocalClass, getLocalHomeClass, getMethodDesc, getMethodDesc, getMethodDescIterator, getParentClass, getPoolMin, getRemoteClass, getRunAsPrincipalName, getRunAsRole, getSasComponent, getSecurityRoleRefDescList, getTimerTxAttribute, getWrpHandleName, getWrpHomeName, getWrpLocalHomeName, getWrpLocalName, getWrpRemoteName, hasDefinedLocalInterface, isClusterReplicated, loadExtraClasses, setCluster, setClusterReplicated, setDeploymentDesc, setJndiLocalName, setJndiName, setSasComponent, verifyRoleName
 
Methods inherited from class org.ow2.jonas.deployment.common.JndiEnvRefsGroupDesc
getEjbLocalRefDesc, getEjbRefDesc, getENCBindingHolder, getEnvEntryDesc, getMessageDestinationRefDesc, getPersistenceUnitRefs, getResourceEnvRefDesc, getResourceRefDesc, getServiceRefDesc, setENCBindingHolder
 
Methods inherited from class org.ow2.jonas.deployment.common.DescriptionGroupDesc
getDescription, getDisplayName, getLargeIcon, getSAXMsg, getSmallIcon
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

abstractSchemaName

protected String abstractSchemaName

factoryClassName

protected String factoryClassName

dc2d

protected DeploymentDescEjb2 dc2d
Constructor Detail

EntityCmp2Desc

public EntityCmp2Desc(ClassLoader classLoader,
                      Entity ent,
                      AssemblyDescriptor asd,
                      JonasEntity jEnt,
                      DeploymentDescEjb2 dc2d,
                      JLinkedList jMDRList,
                      String fileName)
               throws DeploymentDescException
constructor: called when the DeploymentDescriptor is read. Currently, called by both GenIC and createContainer.

Throws:
DeploymentDescException
Method Detail

getDeploymentDescEjb2

public DeploymentDescEjb2 getDeploymentDescEjb2()

getAbstractSchemaName

public String getAbstractSchemaName()
getter for field abstractSchemaName


getJormClassName

public 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

addEjbRelationshipRoleDesc

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


getEjbRelationshipRoleDescIterator

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


getEjbRelationshipRoleDesc

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


newMethodDescInstance

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

Overrides:
newMethodDescInstance in class BeanDesc
Parameters:
meth - the method to be wrapped into a MethodDesc instance
index - index of the method inside the MethodDesc List
Returns:
Returns a new MethodDesc (or subclass)

getJormAccessorClassName

public 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 String getJormBindingClassName()
It retrieves the class name of the generated Jorm binding. Used by the JormFactory

Returns:
the fully qualified class name

getJormStateClassName

public String getJormStateClassName()
Return the class name of the generated Jorm state class.

Returns:
the fully qualified class name

getFactoryClassName

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

Returns:
the fully qualified class name

getJormPKClassName

public 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 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 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 String getJormCoherenceHelperItfName()

getJormCoherenceHelperPackageName

public String getJormCoherenceHelperPackageName()

getJormCoherenceHelperFQItfName

public String getJormCoherenceHelperFQItfName()

toString

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

Specified by:
toString in interface IDescriptionGroupDesc
Overrides:
toString in class EntityCmpDesc
Returns:
String representation of this object


Copyright © 2010 OW2 Consortium. All Rights Reserved.