com.jenkov.mrpersister.itf
Interface IGenericDaoCommand


public interface IGenericDaoCommand

NOTE: Experimental!!

This interface represents a command that is executed inside one Mr. Persisters dao instances (fx. by calling IGenericDao.executeCommand()). A dao command may contain multiple actions, for instance reading and updating various objects in the database.

The advantage of dao commands is typically that some of the standard JDBC work can be taken over by the dao instance. For instance closing the connection after the command is executed.

Author:
Jakob Jenkov - Copyright 2005 Jenkov Development

Method Summary
 java.lang.Object execute(IGenericDao dao)
          Executes this dao command.
 

Method Detail

execute

java.lang.Object execute(IGenericDao dao)
                         throws PersistenceException
Executes this dao command.

Returns:
The result to be returned, if any, of this command.
Note: If you need to return multiple objects you can either put the objects into a collection, or add the objects as members of the class implementing this interface.
Throws:
PersistenceException