## EjbCmp

Implemented in class xdoclet.modules.ejb.entity.CmpTagsHandler.

- Block Tags
- Content Tags

### Block Tags:

#### ifUsingCmp2 (block template)

Evaluate the body block if using EJB 2.0 and CMP version 2.x.

#### ifNotUsingCmp2 (block template)

Evaluate the body block if not using EJB 2.0 or using EJB 2.0 but CMP version 1.x.

#### ifEntityIsCmp (block template)

Evaluates the body block if current class is an CMP entity bean.

#### forAllCmpEntityBeans (block template)

Evaluates the body block for each EJBean derived from EntityBean which is CMP.

#### forAllCmpFields (block template)

Evaluates the body block for each persistent field of current class (if entity CMP). Looks at super classes as well. Searches for the getter methods which has ejb:persistent-field defined.

#### ifEntity (block template)

Evaluate the body block if current class is of an entity type.

#### forAllEntityBeans (block template)

Evaluates the body block for each EJBean derived from EntityBean.

#### forAllEjbSelectMethods (block template)

Evaluates the body block for each ejbSelect method.

#### forAllBeans (block template)

Evaluates the body block for each EJBean derived from one of the three EJB types: EntityBean, SessionBean or MessageDrivenBean.

#### ifIsAConcreteEJBean (block template)

Evaluates the body block if current bean is a concrete bean meaning the generate parameter of ejb:bean is either not specified or equals to "true", otherwise the bean is just an abstract base class bean not meant to be used as a EJBean but serve as the base for other EJBeans.

#### ifLocalEjb (block template)

#### ifRemoteEjb (block template)

#### ifServiceEndpointEjb (block template)

#### ifNotLocalEjb (block template)

#### ifNotRemoteEjb (block template)

#### ifNotServiceEndpointEjb (block template)

### Content templates:

#### entityCmpClass (content template)

Returns the name of generated CMP class.

#### fieldName (content template)

Returns the cmp-version 2.x compatible cmp / cmr field name for the current method.

#### persistenceType (content template)

Returns the persistent type of current bean.

#### reentrant (content template)

Returns True if ejb:bean reentrant is true, False otherwise. It does the case conversion trick from true to True and false to False.

#### ejbRefName (content template)

Returns the name of EJB ref.

#### ejbRefName (content template)

Returns the name of EJB ref.

#### ejbName (content template)

Returns the name of current EJB bean.

[prefixWithEjbSlash] | Specifies whether to prefix it with ejb/ or not. False by default. Valid Values = {true,false}

#### ejbExternalRefName (content template)

Returns the name of EJB ref.

#### symbolicClassName (content template)

Returns the symbolic name of the current class. For an EJBean it's the value of ejb:bean's name parameter.

#### shortEjbName (content template)

Returns short version of ejbName(). Example: "foo.bar.MyBean" ->"MyBean", "foo/bar/MyBean" ->"MyBean"

#### beanType (content template)

Returns Bean type : "Entity", "Session" or "Message Driven".

#### concreteFullClassName (content template)

Returns the full-qualified name of the current class's concrete class. This is the class that is generated and is derived from current class.

#### id (content template)

Returns unique id for current ejb.