xdoclet.modules.ejb.entity

Class EntityBmpSubTask


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)
ant.element
display-name = "BMP" name = "entitybmp" parent = "xdoclet.modules.ejb.EjbDocletTask"
created
Oct 15, 2001

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.

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(XClass clazz)
Gets the GeneratedFileName attribute of the EntityBmpSubTask object
protected boolean
matchesGenerationRules(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.

Field Details

DEFAULT_ENTITYBMP_CLASS_PATTERN

public static final String DEFAULT_ENTITYBMP_CLASS_PATTERN

DEFAULT_TEMPLATE_FILE

protected static final String DEFAULT_TEMPLATE_FILE

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.

Constructor Details

EntityBmpSubTask

public EntityBmpSubTask()
Describe what the EntityBmpSubTask constructor does

Method Details

engineStarted

protected void engineStarted()
            throws xdoclet.XDocletException
Describe what the method does
Throws:
xdoclet.XDocletException -

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

getGeneratedFileName

protected String getGeneratedFileName(XClass clazz)
            throws xdoclet.XDocletException
Gets the GeneratedFileName attribute of the EntityBmpSubTask object
Parameters:
clazz - Describe what the parameter does
Returns:
The GeneratedFileName value
Throws:
xdoclet.XDocletException -

matchesGenerationRules

protected boolean matchesGenerationRules(XClass clazz)
            throws xdoclet.XDocletException
Describe what the method does
Parameters:
clazz - Describe what the parameter does
Returns:
Describe the return value
Throws:
xdoclet.XDocletException -

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
ant.not-required
No,defaultsto {0}BMP

validateOptions

public void validateOptions()
            throws xdoclet.XDocletException
Called to validate configuration parameters.
Throws:
xdoclet.XDocletException -