org.apache.openejb.jee
Class EntityBean

java.lang.Object
  extended by org.apache.openejb.jee.EntityBean
All Implemented Interfaces:
EnterpriseBean, JndiConsumer, Lifecycle, RemoteBean

public class EntityBean
extends Object
implements RemoteBean

ejb-jar_3_1.xsd

Java class for entity-beanType complex type.

The following schema fragment specifies the expected content contained within this class.

 <complexType name="entity-beanType">
   <complexContent>
     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
       <sequence>
         <group ref="{http://java.sun.com/xml/ns/javaee}descriptionGroup"/>
         <element name="ejb-name" type="{http://java.sun.com/xml/ns/javaee}ejb-nameType"/>
         <element name="mapped-name" type="{http://java.sun.com/xml/ns/javaee}xsdStringType" minOccurs="0"/>
         <element name="home" type="{http://java.sun.com/xml/ns/javaee}homeType" minOccurs="0"/>
         <element name="remote" type="{http://java.sun.com/xml/ns/javaee}remoteType" minOccurs="0"/>
         <element name="local-home" type="{http://java.sun.com/xml/ns/javaee}local-homeType" minOccurs="0"/>
         <element name="local" type="{http://java.sun.com/xml/ns/javaee}localType" minOccurs="0"/>
         <element name="ejb-class" type="{http://java.sun.com/xml/ns/javaee}ejb-classType"/>
         <element name="persistence-type" type="{http://java.sun.com/xml/ns/javaee}persistence-typeType"/>
         <element name="prim-key-class" type="{http://java.sun.com/xml/ns/javaee}fully-qualified-classType"/>
         <element name="reentrant" type="{http://java.sun.com/xml/ns/javaee}true-falseType"/>
         <element name="cmp-version" type="{http://java.sun.com/xml/ns/javaee}cmp-versionType" minOccurs="0"/>
         <element name="abstract-schema-name" type="{http://java.sun.com/xml/ns/javaee}java-identifierType" minOccurs="0"/>
         <element name="cmp-field" type="{http://java.sun.com/xml/ns/javaee}cmp-fieldType" maxOccurs="unbounded" minOccurs="0"/>
         <element name="primkey-field" type="{http://java.sun.com/xml/ns/javaee}string" minOccurs="0"/>
         <group ref="{http://java.sun.com/xml/ns/javaee}jndiEnvironmentRefsGroup"/>
         <element name="security-role-ref" type="{http://java.sun.com/xml/ns/javaee}security-role-refType" maxOccurs="unbounded" minOccurs="0"/>
         <element name="security-identity" type="{http://java.sun.com/xml/ns/javaee}security-identityType" minOccurs="0"/>
         <element name="query" type="{http://java.sun.com/xml/ns/javaee}queryType" maxOccurs="unbounded" minOccurs="0"/>
       </sequence>
       <attribute name="id" type="{http://www.w3.org/2001/XMLSchema}ID" />
     </restriction>
   </complexContent>
 </complexType>
 


Field Summary
protected  String abstractSchemaName
           
protected  List<CmpField> cmpField
           
protected  CmpVersion cmpVersion
           
protected  KeyedCollection<String,DataSource> dataSource
           
protected  TextMap description
           
protected  TextMap displayName
           
protected  String ejbClass
           
protected  KeyedCollection<String,EjbLocalRef> ejbLocalRef
           
protected  String ejbName
           
protected  KeyedCollection<String,EjbRef> ejbRef
           
protected  KeyedCollection<String,EnvEntry> envEntry
           
protected  String home
           
protected  LocalCollection<Icon> icon
           
protected  String id
           
protected  String local
           
protected  String localHome
           
protected  String mappedName
           
protected  KeyedCollection<String,MessageDestinationRef> messageDestinationRef
           
protected  KeyedCollection<String,PersistenceContextRef> persistenceContextRef
           
protected  PersistenceType persistenceType
           
protected  KeyedCollection<String,PersistenceUnitRef> persistenceUnitRef
           
protected  List<LifecycleCallback> postConstruct
           
protected  List<LifecycleCallback> preDestroy
           
protected  String primKeyClass
           
protected  String primkeyField
           
protected  List<Query> query
           
protected  boolean reentrant
           
protected  String remote
           
protected  KeyedCollection<String,ResourceEnvRef> resourceEnvRef
           
protected  KeyedCollection<String,ResourceRef> resourceRef
           
protected  SecurityIdentity securityIdentity
           
protected  List<SecurityRoleRef> securityRoleRef
           
protected  KeyedCollection<String,ServiceRef> serviceRef
           
 
Constructor Summary
EntityBean()
           
EntityBean(Class<?> ejbClass, PersistenceType persistenceType)
           
EntityBean(String ejbName, String ejbClass, PersistenceType persistenceType)
           
 
Method Summary
 void addCmpField(String fieldName)
           
 void addPostConstruct(String method)
           
 void addPreDestroy(String method)
           
 String getAbstractSchemaName()
           
 Collection<String> getBusinessLocal()
           
 Collection<String> getBusinessRemote()
           
 List<CmpField> getCmpField()
           
 CmpVersion getCmpVersion()
           
 Collection<DataSource> getDataSource()
           
 Map<String,DataSource> getDataSourceMap()
           
 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(Class value)
           
 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
 

Field Detail

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

dataSource

protected KeyedCollection<String,DataSource> dataSource

securityRoleRef

protected List<SecurityRoleRef> securityRoleRef

securityIdentity

protected SecurityIdentity securityIdentity

query

protected List<Query> query

id

protected String id
Constructor Detail

EntityBean

public EntityBean()

EntityBean

public EntityBean(String ejbName,
                  String ejbClass,
                  PersistenceType persistenceType)

EntityBean

public EntityBean(Class<?> ejbClass,
                  PersistenceType persistenceType)
Method Detail

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

setEjbClass

public void setEjbClass(Class 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()

addCmpField

public void addCmpField(String fieldName)

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

getDataSource

public Collection<DataSource> getDataSource()
Specified by:
getDataSource in interface JndiConsumer

getDataSourceMap

public Map<String,DataSource> getDataSourceMap()
Specified by:
getDataSourceMap in interface JndiConsumer

getSecurityRoleRef

public List<SecurityRoleRef> getSecurityRoleRef()
Specified by:
getSecurityRoleRef in interface EnterpriseBean

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

getTransactionType

public TransactionType getTransactionType()
Specified by:
getTransactionType in interface EnterpriseBean

setTransactionType

public void setTransactionType(TransactionType type)
Specified by:
setTransactionType in interface EnterpriseBean


Copyright © 1999–2015 The Apache Software Foundation. All rights reserved.