org.objectweb.jonas_ejb.deployment.api
Class EntityCmpDesc

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
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]

Field Summary
protected  java.util.HashMap fieldDesc
           
protected  java.lang.String primaryKeyField
           
 
Fields inherited from class org.objectweb.jonas_ejb.deployment.api.EntityDesc
cleanup, CLEANUP_CREATE, CLEANUP_NONE, CLEANUP_REMOVEALL, CLEANUP_REMOVEDATA, LOCK_CONTAINER_READ_COMMITTED, LOCK_CONTAINER_READ_UNCOMMITTED, LOCK_CONTAINER_SERIALIZED, LOCK_DATABASE, lockPolicy, 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
EntityCmpDesc(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, java.lang.String fileName)
          constructor to be used by parent node.
 
Method Summary
 FieldDesc getCmpFieldDesc(java.lang.String fieldName)
          Get descriptor for a given field name Used by GenIC
 java.lang.String getPrimaryKeyFieldName()
           
 FieldDesc getSimplePkField()
          Get the primary key field for the entity.
 java.lang.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
 java.lang.String toString()
          String representation of the object for test purpose
 
Methods inherited from class org.objectweb.jonas_ejb.deployment.api.EntityDesc
checkTxAttribute, getCleanupPolicy, getLockPolicy, 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, newMethodDescInstance, setDeploymentDesc, verifyRoleName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

fieldDesc

protected java.util.HashMap fieldDesc

primaryKeyField

protected java.lang.String primaryKeyField
Constructor Detail

EntityCmpDesc

public EntityCmpDesc(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,
                     java.lang.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(java.lang.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 java.lang.String getSimplePkFieldName()
Get the primary key field name for the entity.

Returns:
Field for the primary key

getPrimaryKeyFieldName

public java.lang.String getPrimaryKeyFieldName()

toString

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

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

newFieldDescInstance

protected FieldDesc newFieldDescInstance()
factory method for field descriptors

Returns:
a FieldDesc.