xdoclet.modules.ejb.entity
Class CmpTagsHandler
EntityTagsHandler
xdoclet.modules.ejb.entity.CmpTagsHandler
public class CmpTagsHandler
extends EntityTagsHandler
- Ara Abrahamian (ara_e@email.com)
String | dbmsColumn() - Returns the dbms column.
|
String | dbmsTable() - Returns the table name for the current class.
|
String | entityCmpClass() - Returns the name of generated CMP class.
|
String | fieldName() - Returns the cmp-version 2.x compatible cmp / cmr field name for the current method.
|
void | forAllCmpEntityBeans(String template) - Evaluates the body block for each EJBean derived from EntityBean which is CMP.
|
void | forAllCmpFields(String template) - Evaluates the body block for each persistent field of current class (if entity CMP).
|
static String | getEntityCmpClassFor(XClass clazz) - Gets the EntityCmpClassFor attribute of the CmpTagsHandler class
|
protected static String | getEntityCmpClassPattern() - Gets the EntityCmpClassPattern attribute of the CmpTagsHandler class
|
static String | getFieldNameFor(XMethod method) - Returns the cmp-version 2.x compatible cmp / cmr field name for the passed method.
|
void | ifEntityIsCmp(String template) - Evaluates the body block if current class is an CMP entity bean.
|
void | ifIsPersistent(String template)
|
void | ifNotUsingCmp2(String template) - Evaluate the body block if not using EJB 2.0 or using EJB 2.0 but CMP version 1.x.
|
void | ifUsingCmp2(String template) - Evaluate the body block if using EJB 2.0 and CMP version 2.x.
|
static boolean | isEntityCmp(XClass clazz) - Returns true if clazz is an CMP entity bean, false otherwise.
|
static boolean | isUsingCmp2Impl(XClass clazz) - Returns true if ejbspec config parameter is "2.0" and ejb:bean's cmp-version either not defined or is "2.x",
false otherwise.
|
dbmsColumn
public String dbmsColumn()
throws xdoclet.XDocletException
Returns the dbms column. Looks for ejb.persistence column-name, then for legacy app-server specific tags, then
propertyName as a fall-back
xdoclet.XDocletException
-
- add more tags/params here
dbmsTable
public String dbmsTable()
throws xdoclet.XDocletException
Returns the table name for the current class.
xdoclet.XDocletException
-
- add more tags/params here
entityCmpClass
public String entityCmpClass()
throws xdoclet.XDocletException
Returns the name of generated CMP class.
- The name of generated CMP class.
xdoclet.XDocletException
-
fieldName
public String fieldName()
throws xdoclet.XDocletException
Returns the cmp-version 2.x compatible cmp / cmr field name for the current method.
xdoclet.XDocletException
-
forAllCmpEntityBeans
public void forAllCmpEntityBeans(String template)
throws xdoclet.XDocletException
Evaluates the body block for each EJBean derived from EntityBean which is CMP.
template
- The body of the block tag
xdoclet.XDocletException
-
isEntityCmp(xjavadoc.XClass)
forAllCmpFields
public void forAllCmpFields(String template)
throws xdoclet.XDocletException
Evaluates the body block for each persistent field of current class (if entity CMP). Looks at super classes as
well. Searches for the getter methods which has ejb:persistent-field defined.
template
- The body of the block tag
xdoclet.XDocletException
-
isEntityCmp(xjavadoc.XClass)
, xdoclet.modules.ejb.entity.PersistentTagsHandler.isPersistentField(xjavadoc.XMethod)
, xdoclet.tagshandler.MethodTagsHandler.isGetter(java.lang.String)
getEntityCmpClassFor
public static String getEntityCmpClassFor(XClass clazz)
Gets the EntityCmpClassFor attribute of the CmpTagsHandler class
clazz
- Describe what the parameter does
- The EntityCmpClassFor value
getEntityCmpClassPattern
protected static String getEntityCmpClassPattern()
Gets the EntityCmpClassPattern attribute of the CmpTagsHandler class
- The EntityCmpClassPattern value
getFieldNameFor
public static String getFieldNameFor(XMethod method)
throws xdoclet.XDocletException
Returns the cmp-version 2.x compatible cmp / cmr field name for the passed method.
xdoclet.XDocletException
-
ifEntityIsCmp
public void ifEntityIsCmp(String template)
throws xdoclet.XDocletException
Evaluates the body block if current class is an CMP entity bean.
template
- The body of the block tag
xdoclet.XDocletException
-
ifIsPersistent
public void ifIsPersistent(String template)
throws xdoclet.XDocletException
ifNotUsingCmp2
public void ifNotUsingCmp2(String template)
throws xdoclet.XDocletException
Evaluate the body block if not using EJB 2.0 or using EJB 2.0 but CMP version 1.x.
template
- The body of the block tag
xdoclet.XDocletException
-
isUsingCmp2Impl(xjavadoc.XClass)
, ifUsingCmp2(java.lang.String)
ifUsingCmp2
public void ifUsingCmp2(String template)
throws xdoclet.XDocletException
Evaluate the body block if using EJB 2.0 and CMP version 2.x.
template
- The body of the block tag
xdoclet.XDocletException
-
isUsingCmp2Impl(xjavadoc.XClass)
, ifNotUsingCmp2(java.lang.String)
isEntityCmp
public static boolean isEntityCmp(XClass clazz)
throws xdoclet.XDocletException
Returns true if clazz is an CMP entity bean, false otherwise. Entity type is determined by looking at the
ejb:bean's type parameter.
clazz
- Description of Parameter
xdoclet.XDocletException
-
- refactor this method up in superclass with isEntityBmp
isUsingCmp2Impl
public static boolean isUsingCmp2Impl(XClass clazz)
throws xdoclet.XDocletException
Returns true if ejbspec config parameter is "2.0" and ejb:bean's cmp-version either not defined or is "2.x",
false otherwise.
- Description of the Returned Value
xdoclet.XDocletException
-