xdoclet.modules.ejb.entity

Class EntityPkSubTask

public class EntityPkSubTask extends AbstractEjbCodeGeneratorSubTask

Generates primary key classes for entity EJBs.

Version: $Revision: 1.11 $

Author: Ara Abrahamian (ara_e@email.com)

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

Field Summary
static StringDEFAULT_ENTITY_PK_CLASS_PATTERN
protected static StringDEFAULT_TEMPLATE_FILE
protected StringentityPkClassPattern
A configuration parameter for specifying the entity bean primary class name pattern.
Constructor Summary
EntityPkSubTask()
Describe what the EntityPkSubTask constructor does
Method Summary
protected voidengineStarted()
Describe what the method does
StringgetEntityPkClassPattern()
Returns the configuration parameter for specifying the entity bean primary class name pattern.
protected StringgetGeneratedFileName(XClass clazz)
Gets the GeneratedFileName attribute of the EntityPkSubTask object
protected booleanmatchesGenerationRules(XClass clazz)
Describe what the method does
voidsetPattern(String new_pattern)
The pattern by which the primary key classes are named.
voidvalidateOptions()
Called to validate configuration parameters.

Field Detail

DEFAULT_ENTITY_PK_CLASS_PATTERN

public static final String DEFAULT_ENTITY_PK_CLASS_PATTERN

DEFAULT_TEMPLATE_FILE

protected static final String DEFAULT_TEMPLATE_FILE

entityPkClassPattern

protected String entityPkClassPattern
A configuration parameter for specifying the entity bean primary class name pattern. By default the value is used for deciding the entity bean primary 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: getEntityPkClassPattern

Constructor Detail

EntityPkSubTask

public EntityPkSubTask()
Describe what the EntityPkSubTask constructor does

Method Detail

engineStarted

protected void engineStarted()
Describe what the method does

Throws: XDocletException

getEntityPkClassPattern

public String getEntityPkClassPattern()
Returns the configuration parameter for specifying the entity bean primary class name pattern. By default the value is used for deciding the entity bean primary 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}PK" is used by default.

Returns: The EntityPkClassPattern value

See Also: entityPkClassPattern

getGeneratedFileName

protected String getGeneratedFileName(XClass clazz)
Gets the GeneratedFileName attribute of the EntityPkSubTask 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 primary key classes are named. The placeholder "{0}" designates the EJB name.

Parameters: new_pattern The new Pattern value

UNKNOWN: No,defaultsto {0}PK

validateOptions

public void validateOptions()
Called to validate configuration parameters.

Throws: XDocletException