xdoclet.modules.ejb.entity

Class DataObjectSubTask

public class DataObjectSubTask extends AbstractEjbCodeGeneratorSubTask

Creates "data objects" for Entity EJBs. This task is currently being deprecated in favour of Value Object which is more powerful in terms of relationships (1-1, 1-n and n-m).

Version: $Revision: 1.12 $

Author: Ara Abrahamian (ara_e@email.com)

UNKNOWN: Oct 15, 2001 display-name = "Data Object" name = "dataobject" parent = "xdoclet.modules.ejb.EjbDocletTask" file = "dataobject-custom.xdt" relates-to = "{0}Data.java" description = "A text file containing * custom template and/or java code to include in the data object class."

Field Summary
protected StringdataObjectClassPattern
A configuration parameter for specifying the data object class name pattern.
static StringDEFAULT_DATAOBJECT_CLASS_PATTERN
protected static StringDEFAULT_TEMPLATE_FILE
Constructor Summary
DataObjectSubTask()
Describe what the DataObjectSubTask constructor does
Method Summary
protected voidengineStarted()
Describe what the method does
protected voidgenerateForClass(XClass clazz)
Describe what the method does
StringgetDataObjectClassPattern()
Returns the configuration parameter for specifying the data object class name pattern.
protected StringgetGeneratedFileName(XClass clazz)
Gets the GeneratedFileName attribute of the DataObjectSubTask object
protected booleanmatchesGenerationRules(XClass clazz)
Describe what the method does
voidsetPattern(String new_pattern)
The pattern by which the data object classes are named.
voidvalidateOptions()
Called to validate configuration parameters.

Field Detail

dataObjectClassPattern

protected String dataObjectClassPattern
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. {0} in the value mean current class's symbolic name which for an EJBean is the EJB name.

See Also: getDataObjectClassPattern

DEFAULT_DATAOBJECT_CLASS_PATTERN

public static final String DEFAULT_DATAOBJECT_CLASS_PATTERN

DEFAULT_TEMPLATE_FILE

protected static final String DEFAULT_TEMPLATE_FILE

Constructor Detail

DataObjectSubTask

public DataObjectSubTask()
Describe what the DataObjectSubTask constructor does

Method Detail

engineStarted

protected void engineStarted()
Describe what the method does

Throws: XDocletException

generateForClass

protected void generateForClass(XClass clazz)
Describe what the method does

Parameters: clazz Describe what the parameter does

Throws: XDocletException

getDataObjectClassPattern

public String getDataObjectClassPattern()
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}Data" is used by default.

Returns: The DataObjectClassPattern value

See Also: dataObjectClassPattern

getGeneratedFileName

protected String getGeneratedFileName(XClass clazz)
Gets the GeneratedFileName attribute of the DataObjectSubTask object

Parameters: clazz Describe what the parameter does

Returns: The GeneratedFileName value

Throws: XDocletException

matchesGenerationRules

protected boolean matchesGenerationRules(XClass clazz)
Describe what the method does

Parameters: clazz Describe what the parameter does

Returns: Describe the return value

Throws: XDocletException

setPattern

public void setPattern(String new_pattern)
The pattern by which the data object classes are named. The placeholder "{0}" designates the EJB name.

Parameters: new_pattern The new Pattern value

UNKNOWN: "No, default is '{0}Data'"

validateOptions

public void validateOptions()
Called to validate configuration parameters.

Throws: XDocletException