org.apache.openejb.jee
Class EntityBean
java.lang.Object
org.apache.openejb.jee.EntityBean
- All Implemented Interfaces:
- EnterpriseBean, JndiConsumer, Lifecycle, RemoteBean
public class EntityBean
- extends Object
- implements EnterpriseBean, RemoteBean
The entity-beanType declares an entity bean. The declaration
consists of:
- an optional description
- an optional display name
- an optional icon element that contains a small and a large
icon file name
- a unique name assigned to the enterprise bean
in the deployment descriptor
- an optional mapped-name element that can be used to provide
vendor-specific deployment information such as the physical
jndi-name of the entity bean's remote home interface. This
element is not required to be supported by all implementations.
Any use of this element is non-portable.
- the names of the entity bean's remote home
and remote interfaces, if any
- the names of the entity bean's local home and local
interfaces, if any
- the entity bean's implementation class
- the optional entity bean's persistence management type. If
this element is not specified it is defaulted to Container.
- the entity bean's primary key class name
- an indication of the entity bean's reentrancy
- an optional specification of the
entity bean's cmp-version
- an optional specification of the entity bean's
abstract schema name
- an optional list of container-managed fields
- an optional specification of the primary key
field
- an optional declaration of the bean's environment
entries
- an optional declaration of the bean's EJB
references
- an optional declaration of the bean's local
EJB references
- an optional declaration of the bean's web
service references
- an optional declaration of the security role
references
- an optional declaration of the security identity
to be used for the execution of the bean's methods
- an optional declaration of the bean's
resource manager connection factory references
- an optional declaration of the bean's
resource environment references
- an optional declaration of the bean's message
destination references
- an optional set of query declarations
for finder and select methods for an entity
bean with cmp-version 2.x.
The optional abstract-schema-name element must be specified
for an entity bean with container-managed persistence and
cmp-version 2.x.
The optional primkey-field may be present in the descriptor
if the entity's persistence-type is Container.
The optional cmp-version element may be present in the
descriptor if the entity's persistence-type is Container. If
the persistence-type is Container and the cmp-version
element is not specified, its value defaults to 2.x.
The optional home and remote elements must be specified if
the entity bean cmp-version is 1.x.
The optional home and remote elements must be specified if
the entity bean has a remote home and remote interface.
The optional local-home and local elements must be specified
if the entity bean has a local home and local interface.
Either both the local-home and the local elements or both
the home and the remote elements must be specified.
The optional query elements must be present if the
persistence-type is Container and the cmp-version is 2.x and
query methods other than findByPrimaryKey have been defined
for the entity bean.
The other elements that are optional are "optional" in the
sense that they are omitted if the lists represented by them
are empty.
At least one cmp-field element must be present in the
descriptor if the entity's persistence-type is Container and
the cmp-version is 1.x, and none must not be present if the
entity's persistence-type is Bean.
Method Summary |
void |
addAroundInvoke(String method)
|
void |
addPostConstruct(String method)
|
void |
addPreDestroy(String method)
|
String |
getAbstractSchemaName()
|
List<AroundInvoke> |
getAroundInvoke()
|
Collection<String> |
getBusinessLocal()
|
Collection<String> |
getBusinessRemote()
|
List<CmpField> |
getCmpField()
|
CmpVersion |
getCmpVersion()
|
String |
getDescription()
|
Text[] |
getDescriptions()
|
String |
getDisplayName()
|
Text[] |
getDisplayNames()
|
String |
getEjbClass()
|
Collection<EjbLocalRef> |
getEjbLocalRef()
|
Map<String,EjbLocalRef> |
getEjbLocalRefMap()
|
String |
getEjbName()
|
Collection<EjbRef> |
getEjbRef()
|
Map<String,EjbRef> |
getEjbRefMap()
|
Collection<EnvEntry> |
getEnvEntry()
|
Map<String,EnvEntry> |
getEnvEntryMap()
|
String |
getHome()
|
Icon |
getIcon()
|
Map<String,Icon> |
getIconMap()
|
Collection<Icon> |
getIcons()
|
String |
getId()
|
String |
getJndiConsumerName()
|
String |
getLocal()
|
String |
getLocalHome()
|
String |
getMappedName()
|
Collection<MessageDestinationRef> |
getMessageDestinationRef()
|
Map<String,MessageDestinationRef> |
getMessageDestinationRefMap()
|
Collection<PersistenceContextRef> |
getPersistenceContextRef()
|
Map<String,PersistenceContextRef> |
getPersistenceContextRefMap()
|
PersistenceType |
getPersistenceType()
|
Collection<PersistenceUnitRef> |
getPersistenceUnitRef()
|
Map<String,PersistenceUnitRef> |
getPersistenceUnitRefMap()
|
List<LifecycleCallback> |
getPostConstruct()
|
List<LifecycleCallback> |
getPreDestroy()
|
String |
getPrimKeyClass()
|
String |
getPrimkeyField()
|
List<Query> |
getQuery()
|
boolean |
getReentrant()
|
String |
getRemote()
|
Collection<ResourceEnvRef> |
getResourceEnvRef()
|
Map<String,ResourceEnvRef> |
getResourceEnvRefMap()
|
Collection<ResourceRef> |
getResourceRef()
|
Map<String,ResourceRef> |
getResourceRefMap()
|
SecurityIdentity |
getSecurityIdentity()
|
List<SecurityRoleRef> |
getSecurityRoleRef()
|
Collection<ServiceRef> |
getServiceRef()
|
Map<String,ServiceRef> |
getServiceRefMap()
|
TransactionType |
getTransactionType()
|
void |
setAbstractSchemaName(String value)
|
void |
setCmpVersion(CmpVersion value)
|
void |
setDescriptions(Text[] text)
|
void |
setDisplayNames(Text[] text)
|
void |
setEjbClass(String value)
|
void |
setEjbName(String value)
The ejb-nameType specifies an enterprise bean's name. |
void |
setHome(String value)
|
void |
setId(String value)
|
void |
setLocal(String value)
|
void |
setLocalHome(String value)
|
void |
setMappedName(String value)
|
void |
setPersistenceType(PersistenceType value)
|
void |
setPrimKeyClass(String value)
|
void |
setPrimkeyField(String value)
|
void |
setReentrant(boolean value)
|
void |
setRemote(String value)
|
void |
setSecurityIdentity(SecurityIdentity value)
|
void |
setTransactionType(TransactionType type)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
description
protected TextMap description
displayName
protected TextMap displayName
icon
protected LocalCollection<Icon> icon
ejbName
protected String ejbName
mappedName
protected String mappedName
home
protected String home
remote
protected String remote
localHome
protected String localHome
local
protected String local
ejbClass
protected String ejbClass
persistenceType
protected PersistenceType persistenceType
primKeyClass
protected String primKeyClass
reentrant
protected boolean reentrant
cmpVersion
protected CmpVersion cmpVersion
abstractSchemaName
protected String abstractSchemaName
cmpField
protected List<CmpField> cmpField
primkeyField
protected String primkeyField
envEntry
protected KeyedCollection<String,EnvEntry> envEntry
ejbRef
protected KeyedCollection<String,EjbRef> ejbRef
ejbLocalRef
protected KeyedCollection<String,EjbLocalRef> ejbLocalRef
serviceRef
protected KeyedCollection<String,ServiceRef> serviceRef
resourceRef
protected KeyedCollection<String,ResourceRef> resourceRef
resourceEnvRef
protected KeyedCollection<String,ResourceEnvRef> resourceEnvRef
messageDestinationRef
protected KeyedCollection<String,MessageDestinationRef> messageDestinationRef
persistenceContextRef
protected KeyedCollection<String,PersistenceContextRef> persistenceContextRef
persistenceUnitRef
protected KeyedCollection<String,PersistenceUnitRef> persistenceUnitRef
postConstruct
protected List<LifecycleCallback> postConstruct
preDestroy
protected List<LifecycleCallback> preDestroy
securityRoleRef
protected List<SecurityRoleRef> securityRoleRef
securityIdentity
protected SecurityIdentity securityIdentity
query
protected List<Query> query
id
protected String id
EntityBean
public EntityBean()
getJndiConsumerName
public String getJndiConsumerName()
- Specified by:
getJndiConsumerName
in interface JndiConsumer
getDescriptions
public Text[] getDescriptions()
setDescriptions
public void setDescriptions(Text[] text)
getDescription
public String getDescription()
getDisplayNames
public Text[] getDisplayNames()
setDisplayNames
public void setDisplayNames(Text[] text)
getDisplayName
public String getDisplayName()
getIcons
public Collection<Icon> getIcons()
getIconMap
public Map<String,Icon> getIconMap()
getIcon
public Icon getIcon()
getEjbName
public String getEjbName()
- Specified by:
getEjbName
in interface EnterpriseBean
setEjbName
public void setEjbName(String value)
- The ejb-nameType specifies an enterprise bean's name. It is
used by ejb-name elements. This name is assigned by the
ejb-jar file producer to name the enterprise bean in the
ejb-jar file's deployment descriptor. The name must be
unique among the names of the enterprise beans in the same
ejb-jar file.
There is no architected relationship between the used
ejb-name in the deployment descriptor and the JNDI name that
the Deployer will assign to the enterprise bean's home.
The name for an entity bean must conform to the lexical
rules for an NMTOKEN.
Example:
EmployeeService
- Specified by:
setEjbName
in interface EnterpriseBean
getMappedName
public String getMappedName()
- Specified by:
getMappedName
in interface EnterpriseBean
setMappedName
public void setMappedName(String value)
- Specified by:
setMappedName
in interface EnterpriseBean
getHome
public String getHome()
- Specified by:
getHome
in interface RemoteBean
setHome
public void setHome(String value)
- Specified by:
setHome
in interface RemoteBean
getRemote
public String getRemote()
- Specified by:
getRemote
in interface RemoteBean
setRemote
public void setRemote(String value)
- Specified by:
setRemote
in interface RemoteBean
getLocalHome
public String getLocalHome()
- Specified by:
getLocalHome
in interface RemoteBean
setLocalHome
public void setLocalHome(String value)
- Specified by:
setLocalHome
in interface RemoteBean
getLocal
public String getLocal()
- Specified by:
getLocal
in interface RemoteBean
setLocal
public void setLocal(String value)
- Specified by:
setLocal
in interface RemoteBean
getEjbClass
public String getEjbClass()
- Specified by:
getEjbClass
in interface EnterpriseBean
setEjbClass
public void setEjbClass(String value)
- Specified by:
setEjbClass
in interface EnterpriseBean
getPersistenceType
public PersistenceType getPersistenceType()
setPersistenceType
public void setPersistenceType(PersistenceType value)
getPrimKeyClass
public String getPrimKeyClass()
setPrimKeyClass
public void setPrimKeyClass(String value)
getReentrant
public boolean getReentrant()
setReentrant
public void setReentrant(boolean value)
getCmpVersion
public CmpVersion getCmpVersion()
setCmpVersion
public void setCmpVersion(CmpVersion value)
getAbstractSchemaName
public String getAbstractSchemaName()
setAbstractSchemaName
public void setAbstractSchemaName(String value)
getCmpField
public List<CmpField> getCmpField()
getPrimkeyField
public String getPrimkeyField()
setPrimkeyField
public void setPrimkeyField(String value)
getEnvEntry
public Collection<EnvEntry> getEnvEntry()
- Specified by:
getEnvEntry
in interface JndiConsumer
getEnvEntryMap
public Map<String,EnvEntry> getEnvEntryMap()
- Specified by:
getEnvEntryMap
in interface JndiConsumer
getEjbRef
public Collection<EjbRef> getEjbRef()
- Specified by:
getEjbRef
in interface JndiConsumer
getEjbRefMap
public Map<String,EjbRef> getEjbRefMap()
- Specified by:
getEjbRefMap
in interface JndiConsumer
getEjbLocalRef
public Collection<EjbLocalRef> getEjbLocalRef()
- Specified by:
getEjbLocalRef
in interface JndiConsumer
getEjbLocalRefMap
public Map<String,EjbLocalRef> getEjbLocalRefMap()
- Specified by:
getEjbLocalRefMap
in interface JndiConsumer
getServiceRef
public Collection<ServiceRef> getServiceRef()
- Specified by:
getServiceRef
in interface JndiConsumer
getServiceRefMap
public Map<String,ServiceRef> getServiceRefMap()
- Specified by:
getServiceRefMap
in interface JndiConsumer
getResourceRef
public Collection<ResourceRef> getResourceRef()
- Specified by:
getResourceRef
in interface JndiConsumer
getResourceRefMap
public Map<String,ResourceRef> getResourceRefMap()
- Specified by:
getResourceRefMap
in interface JndiConsumer
getResourceEnvRef
public Collection<ResourceEnvRef> getResourceEnvRef()
- Specified by:
getResourceEnvRef
in interface JndiConsumer
getResourceEnvRefMap
public Map<String,ResourceEnvRef> getResourceEnvRefMap()
- Specified by:
getResourceEnvRefMap
in interface JndiConsumer
getMessageDestinationRef
public Collection<MessageDestinationRef> getMessageDestinationRef()
- Specified by:
getMessageDestinationRef
in interface JndiConsumer
getMessageDestinationRefMap
public Map<String,MessageDestinationRef> getMessageDestinationRefMap()
- Specified by:
getMessageDestinationRefMap
in interface JndiConsumer
getPersistenceContextRef
public Collection<PersistenceContextRef> getPersistenceContextRef()
- Specified by:
getPersistenceContextRef
in interface JndiConsumer
getPersistenceContextRefMap
public Map<String,PersistenceContextRef> getPersistenceContextRefMap()
- Specified by:
getPersistenceContextRefMap
in interface JndiConsumer
getPersistenceUnitRef
public Collection<PersistenceUnitRef> getPersistenceUnitRef()
- Specified by:
getPersistenceUnitRef
in interface JndiConsumer
getPersistenceUnitRefMap
public Map<String,PersistenceUnitRef> getPersistenceUnitRefMap()
- Specified by:
getPersistenceUnitRefMap
in interface JndiConsumer
getPostConstruct
public List<LifecycleCallback> getPostConstruct()
- Specified by:
getPostConstruct
in interface Lifecycle
addPostConstruct
public void addPostConstruct(String method)
- Specified by:
addPostConstruct
in interface Lifecycle
getPreDestroy
public List<LifecycleCallback> getPreDestroy()
- Specified by:
getPreDestroy
in interface Lifecycle
addPreDestroy
public void addPreDestroy(String method)
- Specified by:
addPreDestroy
in interface Lifecycle
getSecurityRoleRef
public List<SecurityRoleRef> getSecurityRoleRef()
- Specified by:
getSecurityRoleRef
in interface RemoteBean
getBusinessLocal
public Collection<String> getBusinessLocal()
- Specified by:
getBusinessLocal
in interface RemoteBean
getBusinessRemote
public Collection<String> getBusinessRemote()
- Specified by:
getBusinessRemote
in interface RemoteBean
getSecurityIdentity
public SecurityIdentity getSecurityIdentity()
- Specified by:
getSecurityIdentity
in interface EnterpriseBean
setSecurityIdentity
public void setSecurityIdentity(SecurityIdentity value)
- Specified by:
setSecurityIdentity
in interface EnterpriseBean
getQuery
public List<Query> getQuery()
getId
public String getId()
- Specified by:
getId
in interface EnterpriseBean
setId
public void setId(String value)
- Specified by:
setId
in interface EnterpriseBean
getAroundInvoke
public List<AroundInvoke> getAroundInvoke()
- Specified by:
getAroundInvoke
in interface Lifecycle
addAroundInvoke
public void addAroundInvoke(String method)
- Specified by:
addAroundInvoke
in interface Lifecycle
getTransactionType
public TransactionType getTransactionType()
- Specified by:
getTransactionType
in interface EnterpriseBean
setTransactionType
public void setTransactionType(TransactionType type)
- Specified by:
setTransactionType
in interface EnterpriseBean
Copyright © 1999-2011 The Apache OpenEJB development community. All Rights Reserved.