@ejb.pk

Scope: Class

Multiplicity

(0..1): You can use this tag zero or one time in the Java™ source file.

Purpose

This tag defines the primary key of an entity bean. If the <entitypk/> subtask is included, then primary-key classes will be generated for all entity beans, unless a generate="false" parameter is present, or the primary class is in the java.lang package. Applies to entity beans.

Parameters

Parameter Type Applicability Description Mandatory
class text   The fully qualified name of the primary key class. If the class parameter is absent, the primary key class name will be determined using the pattern and package parameters. false
pattern text   Defines the pattern (using {0} for the EJB name) to be used for constructing the unqualified (package-specific) name of the primary key class. false
package text   Defines the package that the pk class is in (generated or not). Use <packageSubstitution/> to specify the package where the interface will reside. false
generate boolean   Indicates if the primary-key class should be generated. You must specify one of the following attributes:
  • true
  • false
The default value is
  • true
false
extends text   Defines which class the generated primary keyextends. false
implements text   Defines which interface the generated primary key implements. false
role-name text   A comma-separated list of roles that can execute findByPrimaryKey. false
unchecked boolean Entity beans, EJB 2.0 Flags the PK-finder with unchecked permission. If the unchecked parameter is present, role-name must be omitted. You must specify one of the following attributes:
  • true
  • false
The default value is
  • true
false
method-intf text   Indicates the interface (Home or LocalHome) for which the findByPrimaryKey permissions should be set. Applies only if role-name or unchecked is specified. If the permissions should apply to both Home or LocalHome interfaces, you do not use this parameter. You must specify one of the following attributes:
  • Home
  • LocalHome
The default value is
  • Home
 
Related reference
@ejb.bean
@ejb.create-method
@ejb.ejb-external-ref
@ejb.ejb-ref
@ejb.env-entry
@ejb.facade
@ejb.facade-method
@ejb.finder
@ejb.home
@ejb.home-method
@ejb.interface
@ejb.interface-method
@ejb.permission
@ejb.persistence
@ejb.persistence (method)
@ejb.pk-field
@ejb.relation
@ejb.remote-facade
@ejb.resource-env-ref
@ejb.resource-ref
@ejb.security-identity
@ejb.security-role-ref
@ejb.select
@ejb.session
@ejb.transaction
@ejb.util
@ejb.value-object
@ejb.value-object-method
Terms of use | Feedback
(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.