org.apache.openejb.jee.was.v6.ejb
Class Entity

java.lang.Object
  extended by org.apache.openejb.jee.was.v6.common.DescriptionGroup
      extended by org.apache.openejb.jee.was.v6.common.CompatibilityDescriptionGroup
          extended by org.apache.openejb.jee.was.v6.common.JNDIEnvRefsGroup
              extended by org.apache.openejb.jee.was.v6.ejb.EnterpriseBean
                  extended by org.apache.openejb.jee.was.v6.ejb.Entity
Direct Known Subclasses:
ContainerManagedEntity

public class Entity
extends EnterpriseBean

The entity element declares an entity bean. The declaration consists of: an optional description; optional display name; optional small icon file name; optional large icon file name; a unique name assigned to the enterprise bean in the deployment descriptor; the names of the entity bean's home and remote interfaces, if any; the names of the entity bean's local home and local interface, if any; the entity bean's implementation class; the entity bean's persistence management type; 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 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 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 local-home and local elements must be specified if the entity bean has a local home and local interface. 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.

Java class for Entity complex type.

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

 <complexType name="Entity">
   <complexContent>
     <extension base="{ejb.xmi}EnterpriseBean">
       <choice maxOccurs="unbounded" minOccurs="0">
         <element name="primaryKey" type="{java.xmi}JavaClass"/>
       </choice>
       <attribute name="primaryKey" type="{http://www.w3.org/2001/XMLSchema}string" />
       <attribute name="reentrant" type="{http://www.w3.org/2001/XMLSchema}boolean" />
     </extension>
   </complexContent>
 </complexType>
 


Field Summary
protected  String primaryKey
           
protected  List<JavaClass> primaryKeys
           
protected  Boolean reentrant
           
 
Fields inherited from class org.apache.openejb.jee.was.v6.ejb.EnterpriseBean
ejbClass, ejbClasses, homeInterface, homeInterfaces, localHomeInterface, localHomeInterfaces, localInterface, localInterfaces, name, remoteInterface, remoteInterfaces, securityIdentities, securityRoleRefs
 
Fields inherited from class org.apache.openejb.jee.was.v6.common.JNDIEnvRefsGroup
ejbLocalRefs, ejbRefs, environmentProperties, messageDestinationRefs, resourceEnvRefs, resourceRefs, serviceRefs
 
Fields inherited from class org.apache.openejb.jee.was.v6.common.CompatibilityDescriptionGroup
description, displayName, largeIcon, smallIcon
 
Fields inherited from class org.apache.openejb.jee.was.v6.common.DescriptionGroup
descriptions, displayNames, extensions, href, icons, id, idref, label, type, uuid, version
 
Constructor Summary
Entity()
           
 
Method Summary
 String getPrimaryKey()
          Gets the value of the primaryKey property.
 List<JavaClass> getPrimaryKeys()
          Gets the value of the primaryKeys property.
 Boolean isReentrant()
          Gets the value of the reentrant property.
 void setPrimaryKey(String value)
          Sets the value of the primaryKey property.
 void setReentrant(Boolean value)
          Sets the value of the reentrant property.
 
Methods inherited from class org.apache.openejb.jee.was.v6.ejb.EnterpriseBean
getEjbClass, getEjbClasses, getHomeInterface, getHomeInterfaces, getLocalHomeInterface, getLocalHomeInterfaces, getLocalInterface, getLocalInterfaces, getName, getRemoteInterface, getRemoteInterfaces, getSecurityIdentities, getSecurityRoleRefs, setEjbClass, setHomeInterface, setLocalHomeInterface, setLocalInterface, setName, setRemoteInterface
 
Methods inherited from class org.apache.openejb.jee.was.v6.common.JNDIEnvRefsGroup
getEjbLocalRefs, getEjbRefs, getEnvironmentProperties, getMessageDestinationRefs, getResourceEnvRefs, getResourceRefs, getServiceRefs
 
Methods inherited from class org.apache.openejb.jee.was.v6.common.CompatibilityDescriptionGroup
getDescription, getDisplayName, getLargeIcon, getSmallIcon, setDescription, setDisplayName, setLargeIcon, setSmallIcon
 
Methods inherited from class org.apache.openejb.jee.was.v6.common.DescriptionGroup
getDescriptions, getDisplayNames, getExtensions, getHref, getIcons, getId, getIdref, getLabel, getType, getUuid, getVersion, setHref, setId, setIdref, setLabel, setType, setUuid, setVersion
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

primaryKeys

protected List<JavaClass> primaryKeys

primaryKey

protected String primaryKey

reentrant

protected Boolean reentrant
Constructor Detail

Entity

public Entity()
Method Detail

getPrimaryKeys

public List<JavaClass> getPrimaryKeys()
Gets the value of the primaryKeys property.

This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is not a set method for the primaryKeys property.

For example, to add a new item, do as follows:

 getPrimaryKeys().add(newItem);
 

Objects of the following type(s) are allowed in the list JavaClass


getPrimaryKey

public String getPrimaryKey()
Gets the value of the primaryKey property.

Returns:
possible object is String

setPrimaryKey

public void setPrimaryKey(String value)
Sets the value of the primaryKey property.

Parameters:
value - allowed object is String

isReentrant

public Boolean isReentrant()
Gets the value of the reentrant property.

Returns:
possible object is Boolean

setReentrant

public void setReentrant(Boolean value)
Sets the value of the reentrant property.

Parameters:
value - allowed object is Boolean


Copyright © 1999-2013 The Apache OpenEJB development community. All Rights Reserved.