## xdoclet.modules.ejb.entity
Class EntityCmpSubTask

    java.lang.Object
      xdoclet.DocletSupport
          xdoclet.SubTask
              xdoclet.TemplateSubTask
                  xdoclet.modules.ejb.AbstractEjbCodeGeneratorSubTask
                      xdoclet.modules.ejb.entity.EntityCmpSubTask

All Implemented Interfaces:
  Serializable

public class EntityCmpSubTask
extends AbstractEjbCodeGeneratorSubTask

Version:
  $Revision: 1.8 $
Author:
  Ara Abrahamian (ara_e@email.com)
See Also:
  Serialized Form
ant.element
  display-name="CMP" name="entitycmp" parent="xdoclet.modules.ejb.EjbDocletTask"
created
  Oct 15, 2001

Nested Class Summary
`static class` `EntityCmpSubTask.CmpSpecVersion`

Nested classes inherited from class xdoclet.TemplateSubTask
`TemplateSubTask.ExtentTypes, TemplateSubTask.OfType`

Field Summary
`static String` `DEFAULT_ENTITYCMP_CLASS_PATTERN`
`protected static String` `DEFAULT_TEMPLATE_FILE`
`protected String` `entityCmpClassPattern` A configuration parameter for specifying the concrete CMP entity bean class name pattern.

Fields inherited from class xdoclet.DocletSupport
`currentClassTag, currentFieldTag, currentMethodTag`

Constructor Summary
`EntityCmpSubTask()` Describe what the EntityCmpSubTask constructor does

Method Summary
`protected void` `engineStarted()` Describe what the method does
`String` `getCmpSpec()` Gets the CmpSpec attribute of the EntityCmpSubTask object
`String` `getEntityCmpClassPattern()` Returns the configuration parameter for specifying the concrete CMP entity bean class name pattern.
`protected String` `getGeneratedFileName(xjavadoc.XClass clazz)` Gets the GeneratedFileName attribute of the EntityCmpSubTask object
`protected boolean` `matchesGenerationRules(xjavadoc.XClass clazz)` Returns true if output not already generated for clazz, and is of the specified type and has the specified class tag; false otherwise.
`void` `setCmpSpec(EntityCmpSubTask.CmpSpecVersion cmpspec)` Sets the CmpSpec attribute of the EntityCmpSubTask object
`void` `setPattern(String new_pattern)` Sets the Pattern attribute of the EntityCmpSubTask object
`void` `validateOptions()` Called to validate configuration parameters.

Methods inherited from class xdoclet.TemplateSubTask

`addOfType, addOfType, addPackageSubstitution, copyAttributesFrom, engineFinished, execute, generateForClass, getAcceptAbstractClasses, getAcceptInterfaces, getDestinationFile, getEngine, getExtent, getGenerationManager, getHavingClassTag, getOfType, getPackageSubstitutions, getSubTaskClassName, getTemplateURL, init, isPackageSubstitutionInheritanceSupported, isPrefixWithPackageStructure, javaFile, processInnerClasses, setAcceptAbstractClasses, setAcceptInterfaces, setDestinationFile, setEngine, setExtent, setExtentValue, setGenerationManager, setHavingClassTag, setOfType, setPackageSubstitutionInheritanceSupported, setPackageSubstitutions, setPrefixWithPackageStructure, setSubTaskClassName, setTemplateFile, setTemplateURL, startEngine, startProcess, startProcessForAll, startProcessPerClass`

Methods inherited from class xdoclet.SubTask
`addConfigParam, getConfigParams, getConfigParamsAsMap, getContext, getDestDir, getMergeDir, getSubTaskName, getXJavaDoc, setDestDir, setMergeDir, setSubTaskName`

Methods inherited from class xdoclet.DocletSupport
`getCurrentClass, getCurrentClassTag, getCurrentConstructor, getCurrentField, getCurrentFieldTag, getCurrentMethod, getCurrentMethodTag, getCurrentPackage, getCurrentTag, isDocletGenerated, popCurrentClass, pushCurrentClass, setCurrentClass, setCurrentClassTag, setCurrentConstructor, setCurrentField, setCurrentFieldTag, setCurrentMethod, setCurrentMethodTag, setCurrentPackage`

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

Field Detail

### DEFAULT_ENTITYCMP_CLASS_PATTERN

    public static final String DEFAULT_ENTITYCMP_CLASS_PATTERN

See Also:
  Constant Field Values

### DEFAULT_TEMPLATE_FILE

    protected static final String DEFAULT_TEMPLATE_FILE

See Also:
  Constant Field Values

### entityCmpClassPattern

    protected String entityCmpClassPattern

  A configuration parameter for specifying the concrete CMP entity bean class name pattern. By default the value is used for deciding the concrete CMP entity bean class name. {0} in the value mean current class's symbolic name which for an EJBean is the EJB name.

  See Also:
    `getEntityCmpClassPattern()`

Constructor Detail

### EntityCmpSubTask

    public EntityCmpSubTask()

  Describe what the EntityCmpSubTask constructor does

Method Detail

### getCmpSpec

    public String getCmpSpec()

  Gets the CmpSpec attribute of the EntityCmpSubTask object

  Returns:
    The CmpSpec value

### getEntityCmpClassPattern

    public String getEntityCmpClassPattern()

  Returns the configuration parameter for specifying the concrete CMP entity bean class name pattern. By default the value is used for deciding the concrete CMP entity bean class name. {0} in the value mean current class's symbolic name which for an EJBean is the EJB name. If nothing explicitly specified by user then "{0}CMP" is used by default.

  Returns:
    The EntityCmpClassPattern value
  See Also:
    `entityCmpClassPattern`

### setCmpSpec

    public void setCmpSpec(EntityCmpSubTask.CmpSpecVersion cmpspec)

  Sets the CmpSpec attribute of the EntityCmpSubTask object

  Parameters:
    `cmpspec` - The new CmpSpec value

### setPattern

    public void setPattern(String new_pattern)

  Sets the Pattern attribute of the EntityCmpSubTask object

  Parameters:
    `new_pattern` - The new Pattern value

### validateOptions

    public void validateOptions()
                         throws XDocletException

  Called to validate configuration parameters.

  Overrides:
    `validateOptions` in class `TemplateSubTask`
  Throws:
    `XDocletException`

### getGeneratedFileName

    protected String getGeneratedFileName(xjavadoc.XClass clazz)
                                   throws XDocletException

  Gets the GeneratedFileName attribute of the EntityCmpSubTask object

  Overrides:
    `getGeneratedFileName` in class `TemplateSubTask`
  Parameters:
    `clazz` - Describe what the parameter does
  Returns:
    The GeneratedFileName value
  Throws:
    `XDocletException`

### matchesGenerationRules

    protected boolean matchesGenerationRules(xjavadoc.XClass clazz)
                                      throws XDocletException

  Description copied from class: `TemplateSubTask`
  Returns true if output not already generated for clazz, and is of the specified type and has the specified class tag; false otherwise. If returned false, no output file is generated for clazz.

  Overrides:
    `matchesGenerationRules` in class `TemplateSubTask`
  Parameters:
    `clazz` - Describe what the parameter does
  Returns:
    Describe the return value
  Throws:
    `XDocletException`
  To do:
    refactor/merge this method with matchesGenerationRules from EntityBmpSubTask

### engineStarted

    protected void engineStarted()
                          throws XDocletException

  Describe what the method does

  Overrides:
    `engineStarted` in class `TemplateSubTask`
  Throws:
    `XDocletException`

http://xdoclet.sourceforge.net/