Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## xdoclet.modules.ejb.entity
Class CmpTagsHandler

    java.lang.Object
      xdoclet.template.TemplateTagHandler
          xdoclet.XDocletTagSupport
              xdoclet.modules.ejb.EjbTagsHandler
                  xdoclet.modules.ejb.entity.EntityTagsHandler
                      xdoclet.modules.ejb.entity.CmpTagsHandler

Direct Known Subclasses:
  PersistentTagsHandler

public class CmpTagsHandler
extends EntityTagsHandler

Version:
  $Revision: 1.17 $
Author:
  Ara Abrahamian (ara_e@email.com)
xdoclet.taghandler
  namespace="EjbCmp"
created
  Oct 16, 2001

Field Summary

Fields inherited from class xdoclet.modules.ejb.EjbTagsHandler
`ALL, LOCAL_SUFFIX, SERVICE_ENDPOINT, SERVICE_ENDPOINT_SUFFIX`

Fields inherited from class xdoclet.XDocletTagSupport
`FOR_CLASS, FOR_CONSTRUCTOR, FOR_FIELD, FOR_METHOD, PARAMETER_DELIMITER`

Constructor Summary
`CmpTagsHandler()`

Method Summary
`String` | `dbmsColumn()` Returns the dbms column.
`String` | `dbmsTable()` Returns the table name for the current class.
`String` | `entityCmpClass()` Returns the name of generated CMP class.
`String` | `fieldName()` Returns the cmp-version 2.x compatible cmp / cmr field name for the current method.
`void` | `forAllCmpEntityBeans(String template)` Evaluates the body block for each EJBean derived from EntityBean which is CMP.
`void` | `forAllCmpFields(String template)` Evaluates the body block for each persistent field of current class (if entity CMP).
`static String` | `getEntityCmpClassFor(xjavadoc.XClass clazz)` Gets the EntityCmpClassFor attribute of the CmpTagsHandler class
`protected static String` | `getEntityCmpClassPattern()` Gets the EntityCmpClassPattern attribute of the CmpTagsHandler class
`static String` | `getFieldNameFor(xjavadoc.XMethod method)` Returns the cmp-version 2.x compatible cmp / cmr field name for the passed method.
`void` | `ifEntityIsCmp(String template)` Evaluates the body block if current class is an CMP entity bean.
`void` | `ifIsPersistent(String template)`
`void` | `ifNotUsingCmp2(String template)` Evaluate the body block if not using EJB 2.0 or using EJB 2.0 but CMP version 1.x.
`void` | `ifUsingCmp2(String template)` Evaluate the body block if using EJB 2.0 and CMP version 2.x.
`static boolean` | `isEntityCmp(xjavadoc.XClass clazz)` Returns true if clazz is an CMP entity bean, false otherwise.
`static boolean` | `isUsingCmp2Impl(xjavadoc.XClass clazz)` Returns true if ejbspec config parameter is "2.0" and ejb:bean's cmp-version either not defined or is "2.x", false otherwise.

Methods inherited from class xdoclet.modules.ejb.entity.EntityTagsHandler
`forAllEjbSelectMethods, forAllEntityBeans, ifEntity, isEjbSelectMethod, isEntity, persistenceType, reentrant`

Methods inherited from class xdoclet.modules.ejb.EjbTagsHandler
`beanType, choosePackage, concreteFullClassName, ejbExternalRefName, ejbName, ejbRefName, ejbRefName, extendsFromFor, forAllBeans, getDependentClassFor, getDependentClassTagName, getEjb, getEjbIdFor, getEjbNameFor, getEjbSpec, getShortEjbNameFor, hasTransaction, id, ifIsAConcreteEJBean, ifLocalEjb, ifNotLocalEjb, ifNotRemoteEjb, ifNotServiceEndpointEjb, ifRemoteEjb, ifServiceEndpointEjb, isAConcreteEJBean, isEjb, isLocalEjb, isOnlyLocalEjb, isOnlyRemoteEjb, isOnlyServiceEndpointEjb, isRemoteEjb, isServiceEndpointEjb, prefixWithEjbSlash, shortEjbName, shouldTraverseSuperclassForDependentClass, symbolicClassName`

Methods inherited from class xdoclet.XDocletTagSupport
`delimit, expandClassName, generate, getCurrentClass, getCurrentClassTag, getCurrentConstructor, getCurrentField, getCurrentFieldTag, getCurrentMethod, getCurrentMethodTag, getCurrentPackage, getDocletContext, getEngine, getExpandedDelimitedTagValue, getTagValue, getTagValue, getTagValue, hasHavingClassTag, hasTag, isTagValueEqual, mandatoryParamNotFound, mandatoryTemplateTagParamNotFound, modifiers, popCurrentClass, pushCurrentClass, setCurrentClass, setCurrentClassTag, setCurrentConstructor, setCurrentField, setCurrentFieldTag, setCurrentMethod, setCurrentMethodTag, setCurrentPackage`

Methods inherited from class xdoclet.template.TemplateTagHandler
`getXJavaDoc, setXJavaDoc`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### CmpTagsHandler

    public CmpTagsHandler()

Method Detail

### getEntityCmpClassFor

    public static String getEntityCmpClassFor(xjavadoc.XClass clazz)

  Gets the EntityCmpClassFor attribute of the CmpTagsHandler class

  Parameters:
    `clazz` - Describe what the parameter does
  Returns:
    The EntityCmpClassFor value

### isEntityCmp

    public static boolean isEntityCmp(xjavadoc.XClass clazz)
                               throws XDocletException

  Returns true if clazz is an CMP entity bean, false otherwise. Entity type is determined by looking at the ejb:bean's type parameter.

  Parameters:
    `clazz` - Description of Parameter
  Returns:
    The EntityCmp value
  Throws:
    `XDocletException`
  To do:
    refactor this method up in superclass with isEntityBmp

### isUsingCmp2Impl

    public static boolean isUsingCmp2Impl(xjavadoc.XClass clazz)
                                   throws XDocletException

  Returns true if ejbspec config parameter is "2.0" and ejb:bean's cmp-version either not defined or is "2.x", false otherwise.

  Parameters:
    `clazz` -
  Returns:
    Description of the Returned Value
  Throws:
    `XDocletException`

### getFieldNameFor

    public static String getFieldNameFor(xjavadoc.XMethod method)
                                  throws XDocletException

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

  Parameters:
    `method` - the method
  Returns:
    the field name
  Throws:
    `XDocletException`

### getEntityCmpClassPattern

    protected static String getEntityCmpClassPattern()

  Gets the EntityCmpClassPattern attribute of the CmpTagsHandler class

  Returns:
    The EntityCmpClassPattern value

### entityCmpClass

    public String entityCmpClass()
                          throws XDocletException

  Returns the name of generated CMP class.

  Returns:
    The name of generated CMP class.
  Throws:
    `XDocletException`
  doc.tag
    type="content"

### ifUsingCmp2

    public void ifUsingCmp2(String template)
                     throws XDocletException

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

  Parameters:
    `template` - The body of the block tag
  Throws:
    `XDocletException`
  See Also:
    `isUsingCmp2Impl(xjavadoc.XClass)`, `ifNotUsingCmp2(java.lang.String)`
  doc.tag
    type="block"

### ifNotUsingCmp2

    public void ifNotUsingCmp2(String template)
                        throws XDocletException

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

  Parameters:
    `template` - The body of the block tag
  Throws:
    `XDocletException`
  See Also:
    `isUsingCmp2Impl(xjavadoc.XClass)`, `ifUsingCmp2(java.lang.String)`
  doc.tag
    type="block"

### ifEntityIsCmp

    public void ifEntityIsCmp(String template)
                       throws XDocletException

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

  Parameters:
    `template` - The body of the block tag
  Throws:
    `XDocletException`
  doc.tag
    type="block"

### forAllCmpEntityBeans

    public void forAllCmpEntityBeans(String template)
                              throws XDocletException

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

  Parameters:
    `template` - The body of the block tag
  Throws:
    `XDocletException`
  See Also:
    `isEntityCmp(xjavadoc.XClass)`
  doc.tag
    type="block"

### forAllCmpFields

    public void forAllCmpFields(String template)
                         throws XDocletException

  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.

  Parameters:
    `template` - The body of the block tag
  Throws:
    `XDocletException`
  See Also:
    `isEntityCmp(xjavadoc.XClass)`, `PersistentTagsHandler.isPersistentField(xjavadoc.XMethod)`, `MethodTagsHandler.isGetter(java.lang.String)`
  doc.tag
    type="block"

### dbmsColumn

    public String dbmsColumn()
                      throws XDocletException

  Returns the dbms column. Looks for ejb.persistence column-name, then for legacy app-server specific tags, then propertyName as a fall-back

  Returns:
  Throws:
    `XDocletException`
  To do:
    add more tags/params here

### dbmsTable

    public String dbmsTable()
                     throws XDocletException

  Returns the table name for the current class.

  Returns:
  Throws:
    `XDocletException`
  To do:
    add more tags/params here

### ifIsPersistent

    public void ifIsPersistent(String template)
                        throws XDocletException

  Throws:
    `XDocletException`

### fieldName

    public String fieldName()
                     throws XDocletException

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

  Returns:
    the field name
  Throws:
    `XDocletException`
  doc.tag
    type="content"

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| http://xdoclet.sourceforge.net/
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD