Entity

The entity element declares an entity bean. The declaration consists of:
Description Optional
Display name Optional
Small icon file name Optional
Large icon file name Optional
Unique name assigned to the enterprise bean in the deployment descriptor
Names of the entity bean's home and remote interfaces, if any
Names of the entity bean's local home and local interface, if any
Entity bean's implementation class
Entity bean's persistence management type
Entity bean's primary key class name
Indication of the entity bean's reentrancy
Specification of the entity bean's cmp-version Optional
Specification of the entity bean's abstract schema name Optional
List of container-managed fields Optional
Specification of the primary key field Optional
Declaration of the bean's environment entries Optional
Declaration of the bean's EJB references Optional
Declaration of the bean's local EJB references Optional
Declaration of the security role references Optional
Declaration of the security identity to be used for the execution of the bean's methods Optional
Declaration of the bean's resource manager connection factory references Optional
Declaration of the bean's resource environment references Optional
Set of query declarations for finder and select methods for an entity bean with cmp-version 2.x. Optional

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 ifthe 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.

Inherits from type EnterpriseBean and adds the following.


 

Attributes Summary

isReentrant The reentrant element specifies whether an entity bean is reentrant or not.
primaryKey The primkey-field element is used to specify the name of the primary key field for an entity with container-managed persistence.
/roles  

 

Attribute Details


isReentrant

The reentrant element specifies whether an entity bean is reentrant or not.

Data type:   Boolean
Default value:   unspecified



primaryKey

The primkey-field element is used to specify the name of the primary key field for an entity with container-managed persistence. The primkey-field must be one of the fields declared in the cmp-fieldelement, and the type of the field must be the same as the primary key type. The primkey-field element is not used if the primary key maps to multiple container-managed fields (i.e. the key is a compound key). In this case, the fields of the primary key class must be public, and their names must correspond to the field names of the entity bean class that comprise the key.Examples:<prim-key-class>java.lang.String</prim-key-class> <prim-key-class>com.wombat.empl.EmployeeID</prim-key-class> <prim-key-class>java.lang.Object</prim-key-class>

Data type:  



/roles

 

Data type: