## xdoclet.modules.ejb.entity
Class EntityBmpSubTask

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

All Implemented Interfaces:
  Serializable

public class EntityBmpSubTask
extends AbstractEjbCodeGeneratorSubTask

Creates "entity bean classes" for BMP entity EJBs. The classes are derived from the abstract entity bean class.
Attention: To give the developer more control over when the EJB becomes dirty (data changed) there is now a method called "makeDirty()" in the generated wrapper class. To use this please add to your EJB an abstract method called "makeDirty" and call it when you change data w/o using the setter methods. As example you could store the Data Object instead of storing all the attributes one by one (be aware that you have to clone the data object before storing to avoid side effects).

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

Nested Class Summary

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

Field Summary
`static String` `DEFAULT_ENTITYBMP_CLASS_PATTERN`
`protected static String` `DEFAULT_TEMPLATE_FILE`
`protected String` `entityBmpClassPattern` A configuration parameter for specifying the concrete BMP entity bean class name pattern.

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

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

Method Summary
`protected void` `engineStarted()` Describe what the method does
`String` `getEntityBmpClassPattern()` Returns the configuration parameter for specifying the concrete BMP entity bean class name pattern.
`protected String` `getGeneratedFileName(xjavadoc.XClass clazz)` Gets the GeneratedFileName attribute of the EntityBmpSubTask object
`protected boolean` `matchesGenerationRules(xjavadoc.XClass clazz)` Describe what the method does
`void` `setPattern(String new_pattern)` The pattern by which the BMP implementation classes are named.
`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_ENTITYBMP_CLASS_PATTERN

    public static final String DEFAULT_ENTITYBMP_CLASS_PATTERN

See Also:
  Constant Field Values

### DEFAULT_TEMPLATE_FILE

    protected static final String DEFAULT_TEMPLATE_FILE

See Also:
  Constant Field Values

### entityBmpClassPattern

    protected String entityBmpClassPattern

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

  See Also:
    `getEntityBmpClassPattern()`

Constructor Detail

### EntityBmpSubTask

    public EntityBmpSubTask()

  Describe what the EntityBmpSubTask constructor does

Method Detail

### getEntityBmpClassPattern

    public String getEntityBmpClassPattern()

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

  Returns:
    The EntityBmpClassPattern value
  See Also:
    `entityBmpClassPattern`

### setPattern

    public void setPattern(String new_pattern)

  The pattern by which the BMP implementation classes are named. The placeholder "{0}" designates the EJB name.

  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 EntityBmpSubTask 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

  Describe what the method does

  Overrides:
    `matchesGenerationRules` in class `TemplateSubTask`
  Parameters:
    `clazz` - Describe what the parameter does
  Returns:
    Describe the return value
  Throws:
    `XDocletException`

### engineStarted

    protected void engineStarted()
                          throws XDocletException

  Describe what the method does

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

http://xdoclet.sourceforge.net/