xdoclet.modules.ejb.entity

Class DataObjectTagsHandler

public class DataObjectTagsHandler extends EjbTagsHandler

Version: $Revision: 1.12 $

Author: Ara Abrahamian (ara_e@email.com)

UNKNOWN: 13. juni 2002 namespace = "EjbDataObj"

Field Summary
protected static StringcurrentDataObjectClassname
protected static HashMapdataObjectClassnames
Method Summary
StringdataMostSuperObjectClass()
Returns the data-object class name highest in the hierarchy of derived beans.
StringdataObjectClass()
Returns data-object class name for the bean.
StringdataObjectClassNameFromInterfaceName()
Return the dataobject class name from interface name.
StringextendsFrom()
Returns the name of the class dataobject class extends.
protected voidforAllSuper(String template, String methodName)
Browse all super classes and search for a special method to generate it in the current CMP/BMP class.
voidforAllSuperSetData(String template)
Evaluates the body block for each setData method.
static StringgenerateDataObjectClass(XClass clazz)
Used by dataMostSuperObjectClass() to get the data object's full qualified class name.
StringgenerateDataObjectClass()
static StringgetCurrentDataObjectClassname()
static StringgetDataMostSuperObjectClass(XClass clazz)
static StringgetDataObjectClassFor(XClass clazz)
protected static StringgetDataObjectClassPattern()
protected StringgetDependentClassFor(XClass clazz, String type)
Gets the DependentClassFor attribute of the DataObjectTagsHandler object
static booleanhasCustomBulkData(XClass clazz)
protected static booleanhasDataEquals(XClass clazz)
voidifIsAggregate(String template)
Evaluate the body block if ejb:aggregate is defined for current getter method, denoting that the specified getter method returns an aggregated object.
voidifIsNotAggregate(String template)
Evaluate the body block if ejb:aggregate is not defined for current getter method.
voidifIsWithDataContainer(String pTemplate)
Evaluate the body block if ejb:data-object container="true".
voidifIsWithDataMethod(String pTemplate)
Evaluate the body block if ejb:data-object setdata="true".
protected booleanisAggregate(XMethod method)
Returns true if method has ejb:aggregate, false otherwise.
voidisDataContentEquals(String pTemplate)
static booleanisDataObjectMethod(XMethod method)
Gets the DataObjectMethod attribute of the DataObjectTagsHandler class
static booleanisGenerationNeeded(XClass clazz)
Returns true if ejb:data-object defined and generate param is true, false if not true.
StringparentDataObjectClass()
static voidputDataObjectClassnames(String name, String value)
static voidsetCurrentDataObjectClassname(String current_data_object_classname)

Field Detail

currentDataObjectClassname

protected static String currentDataObjectClassname

dataObjectClassnames

protected static HashMap dataObjectClassnames

Method Detail

dataMostSuperObjectClass

public String dataMostSuperObjectClass()
Returns the data-object class name highest in the hierarchy of derived beans. Because of possible inheritance between entity bean, the type of the generated getData method must be the one of the most super class of the current entity bean. The current Data class must extend the corresponding super Data class.

Returns: The data-object class name highest in the hierarchy of derived beans.

Throws: XDocletException

UNKNOWN: type = "content"

dataObjectClass

public String dataObjectClass()
Returns data-object class name for the bean.

Returns: The data-object class name for the bean.

Throws: XDocletException

UNKNOWN: type = "content"

dataObjectClassNameFromInterfaceName

public String dataObjectClassNameFromInterfaceName()
Return the dataobject class name from interface name.

Returns: the data-object class name

Throws: XDocletException

UNKNOWN: type = "content"

extendsFrom

public String extendsFrom()
Returns the name of the class dataobject class extends.

Returns: The name of generated PK class.

Throws: XDocletException

UNKNOWN: type = "content"

forAllSuper

protected void forAllSuper(String template, String methodName)
Browse all super classes and search for a special method to generate it in the current CMP/BMP class.

Parameters: template The body of the block tag methodName Description of Parameter

Throws: XDocletException

forAllSuperSetData

public void forAllSuperSetData(String template)
Evaluates the body block for each setData method.

Parameters: template The body of the block tag

Throws: XDocletException

See Also: DataObjectTagsHandler

UNKNOWN: type = "block"

generateDataObjectClass

public static String generateDataObjectClass(XClass clazz)
Used by dataMostSuperObjectClass() to get the data object's full qualified class name. If name and package parameters of ejb:data-object defined, theire values are used, otherwise defaults are used.

Parameters: clazz Description of Parameter

Returns: Description of the Returned Value

See Also: dataMostSuperObjectClass

generateDataObjectClass

public String generateDataObjectClass()

Returns: Description of the Returned Value

Throws: XDocletException

UNKNOWN: type = "content"

getCurrentDataObjectClassname

public static String getCurrentDataObjectClassname()

Returns: the current data-object class name

getDataMostSuperObjectClass

public static String getDataMostSuperObjectClass(XClass clazz)

Parameters: clazz Description of Parameter

Returns: the full qualified data-object class name

Throws: XDocletException

getDataObjectClassFor

public static String getDataObjectClassFor(XClass clazz)

Parameters: clazz Description of Parameter

Returns: the full qualified data-object class name

getDataObjectClassPattern

protected static String getDataObjectClassPattern()

Returns: the data-object class pattern

getDependentClassFor

protected String getDependentClassFor(XClass clazz, String type)
Gets the DependentClassFor attribute of the DataObjectTagsHandler object

Parameters: clazz Describe what the parameter does type Describe what the parameter does

Returns: The DependentClassFor value

Throws: XDocletException

hasCustomBulkData

public static boolean hasCustomBulkData(XClass clazz)

Parameters: clazz Description of Parameter

Returns: Description of the Returned Value

hasDataEquals

protected static boolean hasDataEquals(XClass clazz)

Parameters: clazz

Returns: True if there is a Data Container equals() needed because user set tag "data-equals" to true or ommitted it

Throws: XDocletException

ifIsAggregate

public void ifIsAggregate(String template)
Evaluate the body block if ejb:aggregate is defined for current getter method, denoting that the specified getter method returns an aggregated object.

Parameters: template The body of the block tag

Throws: XDocletException

See Also: DataObjectTagsHandler DataObjectTagsHandler

UNKNOWN: type = "block"

ifIsNotAggregate

public void ifIsNotAggregate(String template)
Evaluate the body block if ejb:aggregate is not defined for current getter method.

Parameters: template The body of the block tag

Throws: XDocletException

See Also: DataObjectTagsHandler DataObjectTagsHandler

UNKNOWN: type = "block"

ifIsWithDataContainer

public void ifIsWithDataContainer(String pTemplate)
Evaluate the body block if ejb:data-object container="true". If not defined then default is true.

Parameters: pTemplate Description of Parameter

Throws: XDocletException

UNKNOWN: type = "block"

ifIsWithDataMethod

public void ifIsWithDataMethod(String pTemplate)
Evaluate the body block if ejb:data-object setdata="true". If not defined then default is true.

Parameters: pTemplate Description of Parameter

Throws: XDocletException

See Also: DataObjectTagsHandler

UNKNOWN: type = "block"

isAggregate

protected boolean isAggregate(XMethod method)
Returns true if method has ejb:aggregate, false otherwise.

Parameters: method Description of Parameter

Returns: The Aggregate value

Throws: XDocletException

isDataContentEquals

public void isDataContentEquals(String pTemplate)

Parameters: pTemplate Description of Parameter

Throws: XDocletException

isDataObjectMethod

public static boolean isDataObjectMethod(XMethod method)
Gets the DataObjectMethod attribute of the DataObjectTagsHandler class

Parameters: method Describe what the parameter does

Returns: The DataObjectMethod value

Throws: XDocletException

isGenerationNeeded

public static boolean isGenerationNeeded(XClass clazz)
Returns true if ejb:data-object defined and generate param is true, false if not true.

Parameters: clazz Description of Parameter

Returns: Description of the Returned Value

parentDataObjectClass

public String parentDataObjectClass()

Returns: Description of the Returned Value

Throws: XDocletException

putDataObjectClassnames

public static void putDataObjectClassnames(String name, String value)

Parameters: name Description of Parameter value Description of Parameter

setCurrentDataObjectClassname

public static void setCurrentDataObjectClassname(String current_data_object_classname)

Parameters: current_data_object_classname