xdoclet.modules.ejb.entity
public class PersistentTagsHandler extends CmpTagsHandler
ALL, LOCAL_SUFFIX, SERVICE_ENDPOINT, SERVICE_ENDPOINT_SUFFIX
FOR_CLASS, FOR_CONSTRUCTOR, FOR_FIELD, FOR_METHOD, PARAMETER_DELIMITER
Constructor and Description |
---|
PersistentTagsHandler() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
fieldList(xjavadoc.XClass clazz,
java.lang.String inclTag,
java.lang.String exclTag,
int type,
java.lang.String valueObject,
boolean superclasses)
Returns comma-separated list of fields, excluding fields that have tags of exclTag list, including fields that
have tags of inclTag list.
|
void |
forAllPersistentFields(java.lang.String template,
java.util.Properties attributes)
Evaluates the body for each persistent field.
|
protected void |
forAllPersistentMatchedFields(java.lang.String template,
java.lang.String include_tags,
java.lang.String exclude_tags,
boolean superclasses,
java.lang.String valueObject)
Generate only for all Persisted Fields matching a specific XTag or Persisted fields that do not match a specific
Tag
|
protected java.lang.String[] |
getPkFieldsInHeader()
Returns an array containing ejb:pk-field tags defined in class level.
|
void |
ifHasAtLeastOnePersistentField(java.lang.String template)
Evaluates the body if the class has at least one persistent field.
|
void |
ifHasAtLeastOnePkField(java.lang.String template)
Evaluates the body if the class has at least one primary key field.
|
static boolean |
isPersistentField(xjavadoc.XMethod method)
Returns true if method is a persistent field, false otherwise.
|
static boolean |
isPkField(xjavadoc.XMethod method)
Returns true if method is a primary key field, false otherwise.
|
static boolean |
isPkFieldInHeader(xjavadoc.XClass clazz)
Returns true if clazz has ejb:pk-field defined.
|
static boolean |
isValueObjectField(xjavadoc.XClass clazz,
xjavadoc.XMethod method,
java.lang.String valueObject)
Gets the ValueObjectField attribute of the PersistentTagsHandler class
|
java.lang.String |
persistentfieldList(java.util.Properties attributes)
Returns a string containing comma-separated list of persistent fields with their types.
|
java.lang.String |
persistentfieldNameValueList()
Returns a string containing comma-separated list of persistent fields without their types in fieldname="value"
format.
|
java.lang.String |
persistentfieldNameValueList(java.util.Properties attributes)
Returns a string containing comma-separated list of persistent fields without their types in fieldname="value"
format.
|
dbmsColumn, dbmsTable, entityCmpClass, fieldName, forAllCmpEntityBeans, forAllCmpFields, getEntityCmpClassFor, getEntityCmpClassPattern, getFieldNameFor, ifEntityIsCmp, ifIsPersistent, ifNotUsingCmp2, ifUsingCmp2, isEntityCmp, isUsingCmp2Impl
forAllEjbSelectMethods, forAllEntityBeans, ifEntity, isEjbSelectMethod, isEntity, persistenceType, reentrant
beanType, choosePackage, concreteFullClassName, ejbExternalRefName, ejbName, ejbRefName, ejbRefName, extendsFromFor, forAllBeans, getDependentClassFor, getDependentClassTagName, getEjb, getEjbIdFor, getEjbNameFor, getEjbSpec, getShortEjbNameFor, hasTransaction, id, ifIsAConcreteEJBean, ifLocalEjb, ifNotLocalEjb, ifNotRemoteEjb, ifNotServiceEndpointEjb, ifRemoteEjb, ifServiceEndpointEjb, isAConcreteEJBean, isEjb, isLocalEjb, isOnlyLocalEjb, isOnlyRemoteEjb, isOnlyServiceEndpointEjb, isRemoteEjb, isServiceEndpointEjb, prefixWithEjbSlash, shortEjbName, shouldTraverseSuperclassForDependentClass, symbolicClassName
delimit, expandClassName, generate, getCurrentClass, getCurrentClassTag, getCurrentConstructor, getCurrentField, getCurrentFieldTag, getCurrentMethod, getCurrentMethodTag, getCurrentPackage, getDocletContext, getEngine, getExpandedDelimitedTagValue, getTagValue, getTagValue, getTagValue, hasHavingClassTag, hasTag, isTagValueEqual, mandatoryParamNotFound, mandatoryTemplateTagParamNotFound, modifiers, popCurrentClass, pushCurrentClass, setCurrentClass, setCurrentClassTag, setCurrentConstructor, setCurrentField, setCurrentFieldTag, setCurrentMethod, setCurrentMethodTag, setCurrentPackage
getXJavaDoc, setXJavaDoc
public static boolean isPersistentField(xjavadoc.XMethod method)
method
- Description of Parameterpublic static boolean isValueObjectField(xjavadoc.XClass clazz, xjavadoc.XMethod method, java.lang.String valueObject) throws XDocletException
clazz
- Describe what the parameter doesmethod
- Describe what the parameter doesvalueObject
- Describe what the parameter doesXDocletException
public static boolean isPkField(xjavadoc.XMethod method)
method
- Description of Parameterpublic static boolean isPkFieldInHeader(xjavadoc.XClass clazz)
clazz
- Description of Parameterpublic static java.lang.String fieldList(xjavadoc.XClass clazz, java.lang.String inclTag, java.lang.String exclTag, int type, java.lang.String valueObject, boolean superclasses) throws XDocletException
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
- XDocletException
public void ifHasAtLeastOnePkField(java.lang.String template) throws XDocletException
template
- The body of the block tagXDocletException
public void ifHasAtLeastOnePersistentField(java.lang.String template) throws XDocletException
template
- The body of the block tagXDocletException
public void forAllPersistentFields(java.lang.String template, java.util.Properties attributes) throws XDocletException
template
- The body of the block tagattributes
- The attributes of the template tagXDocletException
forAllPersistentMatchedFields(java.lang.String,java.lang.String,java.lang.String,boolean,java.lang.String)
public java.lang.String persistentfieldNameValueList(java.util.Properties attributes) throws XDocletException
attributes
- XDocletException
fieldList(XClass, String, String, int, String, boolean)
public java.lang.String persistentfieldList(java.util.Properties attributes) throws XDocletException
attributes
- XDocletException
fieldList(XClass, String, String, int, String, boolean)
public java.lang.String persistentfieldNameValueList() throws XDocletException
XDocletException
fieldList(XClass, String, String, int, String, boolean)
protected java.lang.String[] getPkFieldsInHeader() throws XDocletException
XDocletException
protected void forAllPersistentMatchedFields(java.lang.String template, java.lang.String include_tags, java.lang.String exclude_tags, boolean superclasses, java.lang.String valueObject) throws XDocletException
template
- The body of the block taginclude_tags
- only fields having these tagsexclude_tags
- only fields not having these tagssuperclasses
- traverse superclasses toovalueObject
- XDocletException
forAllPersistentFields(java.lang.String,java.util.Properties)