org.objectweb.jonas_ejb.deployment.api
Class EntityDesc

java.lang.Object
  extended by org.objectweb.jonas_lib.deployment.api.DescriptionGroupDesc
      extended by org.objectweb.jonas_lib.deployment.api.JndiEnvRefsGroupDesc
          extended by org.objectweb.jonas_ejb.deployment.api.BeanDesc
              extended by org.objectweb.jonas_ejb.deployment.api.EntityDesc
All Implemented Interfaces:
DescriptionGroup, JndiEnvRefsGroup
Direct Known Subclasses:
EntityBmpDesc, EntityCmpDesc

public abstract class EntityDesc
extends BeanDesc

Base class to hold meta-information related to an entity bean.

Author:
Christophe Ney [cney@batisseurs.com] : Initial developer, Helene Joanin, Helene Joanin: take into account ejbSelect() methods., Helene Joanin: unsetting transaction attribute set to a default value.

Field Summary
protected  int cleanup
           
static int CLEANUP_CREATE
           
static int CLEANUP_NONE
           
static int CLEANUP_REMOVEALL
           
static int CLEANUP_REMOVEDATA
           
protected  int deadlockTimeout
           
protected  boolean hardLimit
           
protected  int inactivityTimeout
           
protected  boolean jdbcAutomaticPk
           
static int LOCK_CONTAINER_READ_COMMITTED
           
static int LOCK_CONTAINER_READ_UNCOMMITTED
           
static int LOCK_CONTAINER_READ_WRITE
           
static int LOCK_CONTAINER_SERIALIZED
           
static int LOCK_CONTAINER_SERIALIZED_TRANSACTED
           
static int LOCK_DATABASE
           
static int LOCK_READ_ONLY
           
protected  int lockPolicy
           
protected  int maxWaitTime
           
protected static java.lang.String METHODS_HOME_NO_TX
          home methods for which no transaction attribute is to be set
protected static java.lang.String METHODS_REMOTE_NO_TX
          remote methods for which no transaction attribute is to be set
protected  int passivationTimeout
           
protected  boolean pkObjectType
           
protected  boolean prefetch
           
protected  java.lang.Class primaryKeyClass
          This field contains the class name of the factory instanciate by the container.
protected  int readTimeout
           
protected  boolean reentrant
           
protected  boolean shared
           
 
Fields inherited from class org.objectweb.jonas_ejb.deployment.api.BeanDesc
BEAN_TRANSACTION_TYPE, beanIdentification, bf, cacheMax, clusterHomeDistributor, clusterRemoteDistributor, clusterReplicated, CONTAINER_TRANSACTION_TYPE, deploymentDesc, derivedBeanName, ejb10EnvProps, ejbClass, ejbName, ejbTimeoutSignature, fullDerivedBeanName, GENERATED_PREFIX, home, jndiLocalName, jndiName, local, localhome, logger, poolMin, remote, securityRoleRefDescList, timerTxAttribute, TRANS
 
Fields inherited from class org.objectweb.jonas_lib.deployment.api.DescriptionGroupDesc
description, displayName, largeIcon, smallIcon
 
Constructor Summary
EntityDesc(java.lang.ClassLoader classLoader, Entity ent, AssemblyDescriptor asd, JonasEntity jEnt, JLinkedList jMDRList, java.lang.String fileName)
          constructor to be used by parent node
 
Method Summary
protected  void checkTxAttribute(MethodDesc md)
          check that trans-attribute is valid for bean
 int getCleanupPolicy()
           
 int getDeadlockTimeout()
          Get the deadlock timeout value
 int getInactivityTimeout()
          Get the inactivity timeout value
 int getLockPolicy()
           
 int getMaxWaitTime()
          Get the max wait time
 int getPassivationTimeout()
          Get the passivation timeout value
 java.lang.Class getPrimaryKeyClass()
          Get the entity's primary key class.
 int getReadTimeout()
          Get the read timeout value
 boolean isAutomaticPk()
          Assessor for existence of automatic-pk element to True value
 boolean isHardLimit()
           
 boolean isPrefetch()
           
 boolean isReentrant()
          Assessor for reentrant entity bean
 boolean isShared()
           
 boolean isUndefinedPK()
          Assessor for primary key undefined (declare like java.lang.Object type)
 java.lang.String toString()
          String representation of the object for test purpose
 
Methods inherited from class org.objectweb.jonas_ejb.deployment.api.BeanDesc
addEJBMethodDesc, addMethodDesc, check, checkRemoteException, checkRunAsMapping, checkValidTypesForRmi, getBeanFactory, getCacheMax, getClusterHomeDistributor, getClusterRemoteDistributor, 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, setBeanFactory, setClusterReplicated, setDeploymentDesc, setSasComponent, verifyRoleName
 
Methods inherited from class org.objectweb.jonas_lib.deployment.api.JndiEnvRefsGroupDesc
getEjbLocalRefDesc, getEjbRefDesc, getEnvEntryDesc, getMessageDestinationRefDesc, getResourceEnvRefDesc, getResourceRefDesc, getServiceRefDesc
 
Methods inherited from class org.objectweb.jonas_lib.deployment.api.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

METHODS_REMOTE_NO_TX

protected static final java.lang.String METHODS_REMOTE_NO_TX
remote methods for which no transaction attribute is to be set

See Also:
Constant Field Values

METHODS_HOME_NO_TX

protected static final java.lang.String METHODS_HOME_NO_TX
home methods for which no transaction attribute is to be set

See Also:
Constant Field Values

primaryKeyClass

protected java.lang.Class primaryKeyClass
This field contains the class name of the factory instanciate by the container.


reentrant

protected boolean reentrant

passivationTimeout

protected int passivationTimeout

inactivityTimeout

protected int inactivityTimeout

deadlockTimeout

protected int deadlockTimeout

readTimeout

protected int readTimeout

maxWaitTime

protected int maxWaitTime

shared

protected boolean shared

prefetch

protected boolean prefetch

hardLimit

protected boolean hardLimit

jdbcAutomaticPk

protected boolean jdbcAutomaticPk

pkObjectType

protected boolean pkObjectType

CLEANUP_NONE

public static final int CLEANUP_NONE
See Also:
Constant Field Values

CLEANUP_CREATE

public static final int CLEANUP_CREATE
See Also:
Constant Field Values

CLEANUP_REMOVEDATA

public static final int CLEANUP_REMOVEDATA
See Also:
Constant Field Values

CLEANUP_REMOVEALL

public static final int CLEANUP_REMOVEALL
See Also:
Constant Field Values

cleanup

protected int cleanup

LOCK_CONTAINER_READ_UNCOMMITTED

public static final int LOCK_CONTAINER_READ_UNCOMMITTED
See Also:
Constant Field Values

LOCK_CONTAINER_SERIALIZED

public static final int LOCK_CONTAINER_SERIALIZED
See Also:
Constant Field Values

LOCK_CONTAINER_READ_COMMITTED

public static final int LOCK_CONTAINER_READ_COMMITTED
See Also:
Constant Field Values

LOCK_DATABASE

public static final int LOCK_DATABASE
See Also:
Constant Field Values

LOCK_READ_ONLY

public static final int LOCK_READ_ONLY
See Also:
Constant Field Values

LOCK_CONTAINER_READ_WRITE

public static final int LOCK_CONTAINER_READ_WRITE
See Also:
Constant Field Values

LOCK_CONTAINER_SERIALIZED_TRANSACTED

public static final int LOCK_CONTAINER_SERIALIZED_TRANSACTED
See Also:
Constant Field Values

lockPolicy

protected int lockPolicy
Constructor Detail

EntityDesc

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

Throws:
DeploymentDescException
Method Detail

getCleanupPolicy

public int getCleanupPolicy()
Returns:
the cleanup policy for this bean

getLockPolicy

public int getLockPolicy()
Returns:
the lock policy for this bean

checkTxAttribute

protected void checkTxAttribute(MethodDesc md)
                         throws DeploymentDescException
check that trans-attribute is valid for bean

Specified by:
checkTxAttribute in class BeanDesc
Parameters:
md - MethodDesc to check
Throws:
DeploymentDescException - When MethodDesc is not valid

getPassivationTimeout

public int getPassivationTimeout()
Get the passivation timeout value


getInactivityTimeout

public int getInactivityTimeout()
Get the inactivity timeout value


getDeadlockTimeout

public int getDeadlockTimeout()
Get the deadlock timeout value


getReadTimeout

public int getReadTimeout()
Get the read timeout value


getMaxWaitTime

public int getMaxWaitTime()
Get the max wait time


getPrimaryKeyClass

public java.lang.Class getPrimaryKeyClass()
Get the entity's primary key class.

Returns:
Class for the primary key

isReentrant

public boolean isReentrant()
Assessor for reentrant entity bean

Returns:
true for reentrant entity bean

isShared

public boolean isShared()
Returns:
true for shared entity bean

isPrefetch

public boolean isPrefetch()
Returns:
true for prefetch entity bean

isHardLimit

public boolean isHardLimit()
Returns:
true for hard-limit entity bean

isAutomaticPk

public boolean isAutomaticPk()
Assessor for existence of automatic-pk element to True value

Parameters:
field - public field of the bean class
Returns:
true if automatic-pk element value is true else otherwise false

isUndefinedPK

public boolean isUndefinedPK()
Assessor for primary key undefined (declare like java.lang.Object type)

Parameters:
field - public field of the bean class
Returns:
true if primary key is undefined (java.lang.Object type)

toString

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

Specified by:
toString in interface DescriptionGroup
Overrides:
toString in class BeanDesc
Returns:
String representation of this object