xdoclet.modules.ejb.dao
Class DaoTagsHandler

java.lang.Object
  extended by xdoclet.template.TemplateTagHandler
      extended by xdoclet.XDocletTagSupport
          extended by xdoclet.modules.ejb.EjbTagsHandler
              extended by xdoclet.modules.ejb.dao.DaoTagsHandler

public class DaoTagsHandler
extends EjbTagsHandler

Version:
$Revision: 1.5 $
Author:
Andrew Stevens
xdoclet.taghandler
namespace = "EjbDao"
created
February 8, 2002

Field Summary
 
Fields inherited from class xdoclet.modules.ejb.EjbTagsHandler
ALL, LOCAL_SUFFIX, SERVICE_ENDPOINT, SERVICE_ENDPOINT_SUFFIX
 
Fields inherited from class xdoclet.XDocletTagSupport
FOR_CLASS, FOR_CONSTRUCTOR, FOR_FIELD, FOR_METHOD, PARAMETER_DELIMITER
 
Constructor Summary
DaoTagsHandler()
           
 
Method Summary
 java.lang.String daoClass(java.util.Properties attributes)
          Returns the full qualified dao class name for the bean
static java.lang.String getDaoClassFor(xjavadoc.XClass clazz)
          Similar to InterfaceTagsHandler.getComponentInterface(java.lang.String, xjavadoc.XClass).
protected static java.lang.String getDaoClassPattern()
          Gets the DaoClassPattern attribute of the DaoTagsHandler class
 void ifDaoMethod(java.lang.String template)
          Evaluates the body block if current method is a DAO method.
 void ifUsingDao(java.lang.String template)
          Evaluate the body block if ejb.dao tag present and DAO subtask being used.
static boolean isDaoMethod(xjavadoc.XMethod method)
          Returns true if method should be added to the DAO, false otherwise.
 
Methods inherited from class xdoclet.modules.ejb.EjbTagsHandler
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
 
Methods inherited from class xdoclet.XDocletTagSupport
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
 
Methods inherited from class xdoclet.template.TemplateTagHandler
getXJavaDoc, setXJavaDoc
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DaoTagsHandler

public DaoTagsHandler()
Method Detail

getDaoClassFor

public static java.lang.String getDaoClassFor(xjavadoc.XClass clazz)
Similar to InterfaceTagsHandler.getComponentInterface(java.lang.String, xjavadoc.XClass). Relies on the ejb.dao tag, which has the following relevant properties:

Parameters:
clazz - Description of Parameter
Returns:
The DAO value

isDaoMethod

public static boolean isDaoMethod(xjavadoc.XMethod method)
                           throws XDocletException
Returns true if method should be added to the DAO, false otherwise. The method should be included if it has a dao.call tag, unless it's a finder or create method which has already been added automatically.

Parameters:
method - XMethod to be evaluated
Returns:
Whether to include in the DAO
Throws:
XDocletException

getDaoClassPattern

protected static java.lang.String getDaoClassPattern()
Gets the DaoClassPattern attribute of the DaoTagsHandler class

Returns:
The DaoClassPattern value

daoClass

public java.lang.String daoClass(java.util.Properties attributes)
                          throws XDocletException
Returns the full qualified dao class name for the bean

Parameters:
attributes - The attributes of the template tag
Returns:
DAO class name
Throws:
XDocletException
doc.tag
type = "content"

ifUsingDao

public void ifUsingDao(java.lang.String template)
                throws XDocletException
Evaluate the body block if ejb.dao tag present and DAO subtask being used.

Parameters:
template -
Throws:
XDocletException
doc.tag
type = "block"

ifDaoMethod

public void ifDaoMethod(java.lang.String template)
                 throws XDocletException
Evaluates the body block if current method is a DAO method.

Parameters:
template - The body of the block tag
Throws:
XDocletException
See Also:
isDaoMethod(xjavadoc.XMethod)
doc.tag
type = "block"

http://xdoclet.sourceforge.net/