org.ow2.jonas.deployment.ejb
Class EntityCmpDesc

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
All Implemented Interfaces:
IDescriptionGroupDesc, IJNDIEnvRefsGroupDesc
Direct Known Subclasses:
EntityCmp1Desc, EntityCmp2Desc

public abstract class EntityCmpDesc
extends EntityDesc

Base class to hold meta-information related to an entity of type CMP.

Author:
Christophe Ney [cney@batisseurs.com] : Initial developer, Helene Joanin, Jerome Camilleri : automatic PK

Field Summary
protected  HashMap fieldDesc
           
protected  String jdbcAutomaticPkFieldName
           
protected  String 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
EntityCmpDesc(ClassLoader classLoader, Entity ent, AssemblyDescriptor asd, JonasEntity jEnt, JLinkedList jMDRList, String fileName)
          constructor to be used by parent node.
 
Method Summary
 FieldDesc getCmpFieldDesc(String fieldName)
          Get descriptor for a given field name Used by GenIC
 Iterator getCmpFieldDescIterator()
           
 String getJdbcAutomaticPkFieldName()
          Get the associated field for auto genarated pk field specify by user
 String getPrimaryKeyFieldName()
           
 FieldDesc getSimplePkField()
          Get the primary key field for the entity.
 String getSimplePkFieldName()
          Get the primary key field name for the entity.
 boolean hasPrimaryKeyField()
           
 boolean hasSimplePkField()
          Indicate if the primary key field is only one field with a primary-key-field defined in the DD.
protected  FieldDesc newFieldDescInstance()
          factory method for field descriptors
 String toString()
          String representation of the object for test purpose
 
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, newMethodDescInstance, 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

fieldDesc

protected HashMap fieldDesc

primaryKeyField

protected String primaryKeyField

jdbcAutomaticPkFieldName

protected String jdbcAutomaticPkFieldName
Constructor Detail

EntityCmpDesc

public EntityCmpDesc(ClassLoader classLoader,
                     Entity ent,
                     AssemblyDescriptor asd,
                     JonasEntity jEnt,
                     JLinkedList jMDRList,
                     String fileName)
              throws DeploymentDescException
constructor to be used by parent node.

Parameters:
classLoader - class loader to use to laod bean's classes
ent - entity in the standard deployment descriptor
asd - assembly-descriptor in the standard deployment descriptor
jEnt - jonas-entity in the JOnAS deployment descriptor
fileName - jar or directory containing ejb
Throws:
DeploymentDescException - in error case.
Method Detail

getCmpFieldDesc

public FieldDesc getCmpFieldDesc(String fieldName)
Get descriptor for a given field name Used by GenIC

Parameters:
fieldName - Name of the field
Returns:
Descriptor for the given field or null

hasSimplePkField

public boolean hasSimplePkField()
Indicate if the primary key field is only one field with a primary-key-field defined in the DD.

Returns:
true if the primary key field is only one field with a primary-key-field defined in the DD.

hasPrimaryKeyField

public boolean hasPrimaryKeyField()

getSimplePkField

public FieldDesc getSimplePkField()
Get the primary key field for the entity.

Returns:
Field for the primary key

getSimplePkFieldName

public String getSimplePkFieldName()
Get the primary key field name for the entity.

Returns:
Field for the primary key

getPrimaryKeyFieldName

public String getPrimaryKeyFieldName()

getJdbcAutomaticPkFieldName

public String getJdbcAutomaticPkFieldName()
Get the associated field for auto genarated pk field specify by user

Returns:
Name of the field where automatic pk bean is stored

getCmpFieldDescIterator

public Iterator getCmpFieldDescIterator()

toString

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

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

newFieldDescInstance

protected FieldDesc newFieldDescInstance()
factory method for field descriptors

Returns:
a FieldDesc.


Copyright © 2010 OW2 Consortium. All Rights Reserved.