org.j2ee.dao
Interface DAOAction

All Known Subinterfaces:
HibernateDAOAction, JdbcDAOAction
All Known Implementing Classes:
AbstractHibernateDAOAction, AbstractJdbcDAOAction, MacroDAOAction

public interface DAOAction

This interface is the common behavior of all actions.
Based on an example of book Code Notes for J2EE, Edited by GREGORY BRILL, e-ISBN 0-679-64727-9
Last modified $Date: 2004/05/18 10:50:12 $

Version:
$Revision: 1.1.1.1 $
Author:
jvlio (jvlio@users.sourceforge.net)

Method Summary
 void execute(org.j2ee.dao.DAOActionProcessor processor)
          This is the mainly method of an action.
 java.lang.Object getTO()
          The transfer object used or setted by the action.
 void setErrorHandler(org.j2ee.dao.DAOErrorHandler handler)
          This method allows to the action to set a class which manage application errors such as integrity constraint violated.
 void setTO(java.lang.Object to)
          Set the private attribute, the transfer object.
 

Method Detail

execute

public void execute(org.j2ee.dao.DAOActionProcessor processor)
             throws DAOException
This is the mainly method of an action. Every action in this pattern must be executed with this method

Parameters:
processor - (The procesor wich carry out with the action
Throws:
DAOException - If there where errors

setTO

public void setTO(java.lang.Object to)
Set the private attribute, the transfer object. Concrete implementation of this interface must be properly implement this method to provide an uniform interface for all the actions.

Parameters:
to - (The Transfer Object used by the action)

getTO

public java.lang.Object getTO()
The transfer object used or setted by the action.

Returns:
the transfer object

setErrorHandler

public void setErrorHandler(org.j2ee.dao.DAOErrorHandler handler)
This method allows to the action to set a class which manage application errors such as integrity constraint violated.

Parameters:
handler - a instance with the application code to manage the exception
See Also:
interface for a list of the code passed to method


Copyright © 2004 DAO Action Patterm. All Rights Reserved.