xdoclet.modules.ejb.dao

Class DaoTagsHandler


public class DaoTagsHandler
extends EjbTagsHandler

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

Method Summary

String
daoClass(Properties attributes)
Returns the full qualified dao class name for the bean
static String
getDaoClassFor(XClass clazz)
Similar to InterfaceTagsHandler.getComponentInterface(String,XClass).
protected static String
getDaoClassPattern()
Gets the DaoClassPattern attribute of the DaoTagsHandler class
void
ifDaoMethod(String template)
Evaluates the body block if current method is a DAO method.
void
ifUsingDao(String template)
Evaluate the body block if ejb.dao tag present and DAO subtask being used.
static boolean
isDaoMethod(XMethod method)
Returns true if method should be added to the DAO, false otherwise.

Method Details

daoClass

public String daoClass(Properties attributes)
            throws xdoclet.XDocletException
Returns the full qualified dao class name for the bean
Parameters:
attributes - The attributes of the template tag
Returns:
DAO class name
Throws:
xdoclet.XDocletException -
doc.tag
type = "content"

getDaoClassFor

public static String getDaoClassFor(XClass clazz)
Similar to InterfaceTagsHandler.getComponentInterface(String,XClass). Relies on the ejb.dao tag, which has the following relevant properties:
  • class: The fully qualified name of the DAO class - overrides all set patterns
  • pattern: The pattern to be used to determine the unqualified name of the DAO class
  • package: The package the DAO is to be placed in
Parameters:
clazz - Description of Parameter
Returns:
The DAO value

getDaoClassPattern

protected static String getDaoClassPattern()
Gets the DaoClassPattern attribute of the DaoTagsHandler class
Returns:
The DaoClassPattern value

ifDaoMethod

public void ifDaoMethod(String template)
            throws xdoclet.XDocletException
Evaluates the body block if current method is a DAO method.
Parameters:
template - The body of the block tag
Throws:
xdoclet.XDocletException -
See Also:
isDaoMethod(xjavadoc.XMethod)
doc.tag
type = "block"

ifUsingDao

public void ifUsingDao(String template)
            throws xdoclet.XDocletException
Evaluate the body block if ejb.dao tag present and DAO subtask being used.
Parameters:
template -
Throws:
xdoclet.XDocletException -
doc.tag
type = "block"

isDaoMethod

public static boolean isDaoMethod(XMethod method)
            throws xdoclet.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:
xdoclet.XDocletException -