fieldList
public static String fieldList(XClass clazz,
String inclTag,
String exclTag,
int type,
String valueObject,
boolean superclasses)
throws xdoclet.XDocletException
Returns comma-separated list of fields, excluding fields that have tags of exclTag list, including fields that
have tags of inclTag list. If name_value_out is true, then the list is in fieldname="value" format.
clazz
- Description of ParameterinclTag
- Fields that have at least of the tags of this comma-separated list are used.exclTag
- Fields that don't have all of the tags of this comma-separated list are used.type
- Type of return (0: comma separated list - 1: field=value comma separated list - 2:
getter comma sperated list, 3: comma separated name list)valueObject
- superclasses
-
- Description of the Returned Value
xdoclet.XDocletException
-
- This method only takes the field of the current class. I think it's ok. Any
objection ?
forAllPersistentFields
public void forAllPersistentFields(String template,
Properties attributes)
throws xdoclet.XDocletException
Evaluates the body for each persistent field. If only-pk="true" then use only primary keys, if not-pk="true" then
use only persistent fields that are not primary keys. By default use all regardless of being primary key field or
not.
template
- The body of the block tagattributes
- The attributes of the template tag
xdoclet.XDocletException
-
forAllPersistentMatchedFields(java.lang.String,java.lang.String,java.lang.String,boolean,java.lang.String)
- name = "superclasses"
optional = "true"
values = "true,false"
description = "Include
persistent fields of superclasses. True by default."
- name = "valueobject"
optional = "true"
description = "If present, only loop over fields
with a matching \@ejb.value-object tag."
- name = "only-pk"
optional = "true"
values = "true,false"
description = "If true, only loop
over the persistent fields that are in the primary key. False by default."
- name = "not-pk"
optional = "true"
values = "true,false"
description = "If true, only loop
over the persistent fields that are not in the primary key. False by default."
forAllPersistentMatchedFields
protected void forAllPersistentMatchedFields(String template,
String include_tags,
String exclude_tags,
boolean superclasses,
String valueObject)
throws xdoclet.XDocletException
Generate only for all Persisted Fields matching a specific XTag or Persisted fields that do not match a specific
Tag
template
- The body of the block taginclude_tags
- only fields having these tagsexclude_tags
- only fields not having these tagssuperclasses
- traverse superclasses toovalueObject
-
xdoclet.XDocletException
-
forAllPersistentFields(java.lang.String,java.util.Properties)
getPkFieldsInHeader
protected String[] getPkFieldsInHeader()
throws xdoclet.XDocletException
Returns an array containing ejb:pk-field tags defined in class level.
- The PkFieldsInHeader value
xdoclet.XDocletException
-
ifHasAtLeastOnePersistentField
public void ifHasAtLeastOnePersistentField(String template)
throws xdoclet.XDocletException
Evaluates the body if the class has at least one persistent field.
template
- The body of the block tag
xdoclet.XDocletException
-
ifHasAtLeastOnePkField
public void ifHasAtLeastOnePkField(String template)
throws xdoclet.XDocletException
Evaluates the body if the class has at least one primary key field.
template
- The body of the block tag
xdoclet.XDocletException
-
isPersistentField
public static boolean isPersistentField(XMethod method)
Returns true if method is a persistent field, false otherwise. Persistent fields are getter methods marked with a
ejb:persistent-field tag.
method
- Description of Parameter
- The PersistentField value
isPkField
public static boolean isPkField(XMethod method)
Returns true if method is a primary key field, false otherwise. PK fields are getter methods marked with a
ejb:pk-field tag.
method
- Description of Parameter
isPkFieldInHeader
public static boolean isPkFieldInHeader(XClass clazz)
Returns true if clazz has ejb:pk-field defined.
clazz
- Description of Parameter
- The PkFieldInHeader value
isValueObjectField
public static boolean isValueObjectField(XClass clazz,
XMethod method,
String valueObject)
throws xdoclet.XDocletException
Gets the ValueObjectField attribute of the PersistentTagsHandler class
clazz
- Describe what the parameter doesmethod
- Describe what the parameter doesvalueObject
- Describe what the parameter does
- The ValueObjectField value
xdoclet.XDocletException
-
persistentfieldList
public String persistentfieldList(Properties attributes)
throws xdoclet.XDocletException
Returns a string containing comma-separated list of persistent fields with their types.
- A string containing comma-separated list of persistent fields without their types.
xdoclet.XDocletException
-
persistentfieldNameValueList
public String persistentfieldNameValueList()
throws xdoclet.XDocletException
Returns a string containing comma-separated list of persistent fields without their types in fieldname="value"
format.
- A string containing comma-separated list of persistent fields with their types like
an ordinary method parameter definition.
xdoclet.XDocletException
-
persistentfieldNameValueList
public String persistentfieldNameValueList(Properties attributes)
throws xdoclet.XDocletException
Returns a string containing comma-separated list of persistent fields without their types in fieldname="value"
format.
- A string containing comma-separated list of persistent fields with their types like
an ordinary method parameter definition.
xdoclet.XDocletException
-