xdoclet.modules.ejb.entity
Class ValueObjectSubTask
AbstractEjbCodeGeneratorSubTask
xdoclet.modules.ejb.entity.ValueObjectSubTask
public class ValueObjectSubTask
extends AbstractEjbCodeGeneratorSubTask
Creates "value objects" for Entity EJBs. This task replaces
Data Object .
- Vincent Harcq (vincent.harcq@hubmethods.com)
- display-name = "Value Object"
name = "valueobject"
parent = "xdoclet.modules.ejb.EjbDocletTask"
DEFAULT_DATAOBJECT_CLASS_PATTERN
public static final String DEFAULT_DATAOBJECT_CLASS_PATTERN
DEFAULT_TEMPLATE_FILE
protected static final String DEFAULT_TEMPLATE_FILE
currentDataObjectTag
protected XTag currentDataObjectTag
Form tag being processed right now
valueObjectClassPattern
protected String valueObjectClassPattern
A configuration parameter for specifying the data object class name pattern. By default the value is used for
deciding the entity data object class name. The placeholder "{0}" in the value means the current class's symbolic
name which for an EJBean is the EJB name.
ValueObjectSubTask
public ValueObjectSubTask()
Describe what the ValueObjectSubTask constructor does
engineStarted
protected void engineStarted()
throws xdoclet.XDocletException
Describe what the method does
xdoclet.XDocletException
-
generateForClass
protected void generateForClass(XClass clazz)
throws xdoclet.XDocletException
Describe what the method does
clazz
- Describe what the parameter does
xdoclet.XDocletException
-
getCurrentValueObjectClass
public static String getCurrentValueObjectClass()
Gets the CurrentValueObjectClass attribute of the ValueObjectSubTask class
- The CurrentValueObjectClass value
getCurrentValueObjectExtends
public static String getCurrentValueObjectExtends()
getCurrentValueObjectImplements
public static String getCurrentValueObjectImplements()
getCurrentValueObjectMatch
public static String getCurrentValueObjectMatch()
Gets the CurrentValueObjectMatch attribute of the ValueObjectSubTask class
- The CurrentValueObjectMatch value
getCurrentValueObjectName
public static String getCurrentValueObjectName()
Gets the CurrentValueObjectName attribute of the ValueObjectSubTask class
- The CurrentValueObjectName value
getGeneratePKConstructor
public boolean getGeneratePKConstructor()
getGeneratedFileName
protected String getGeneratedFileName(XClass clazz)
throws xdoclet.XDocletException
Gets the GeneratedFileName attribute of the ValueObjectSubTask object
clazz
- Describe what the parameter does
- The GeneratedFileName value
xdoclet.XDocletException
-
getValueObjectClassPattern
public String getValueObjectClassPattern()
Returns the configuration parameter for specifying the data object class name pattern. By default the value is
used for deciding the entity data object 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}Value" is
used by default.
- The ValueObjectClassPattern value
matchesGenerationRules
protected boolean matchesGenerationRules(XClass clazz)
throws xdoclet.XDocletException
Describe what the method does
clazz
- Describe what the parameter does
- Describe the return value
xdoclet.XDocletException
-
setGeneratePKConstructor
public void setGeneratePKConstructor(String generatePKConstructor)
Whether to generate a single-parameter constructor in the ValueObject, which only sets up the PK.
generatePKConstructor
- The new GeneratePKConstructor value
setPattern
public void setPattern(String new_pattern)
The pattern by which the value object classes are named. The placeholder "{0}" designates the EJB name.
new_pattern
- The new Pattern value
- "No, default is '{0}Value'"
validateOptions
public void validateOptions()
throws xdoclet.XDocletException
Called to validate configuration parameters.
xdoclet.XDocletException
-