org.appfuse.service
Interface Manager

All Known Subinterfaces:
LookupManager, RoleManager
All Known Implementing Classes:
BaseManager, LookupManagerImpl, RoleManagerImpl, UserManagerImpl

public interface Manager


Method Summary
 Object getObject(Class clazz, Serializable id)
          Generic method to get an object based on class and identifier.
 List getObjects(Class clazz)
          Generic method used to get a all objects of a particular type.
 void removeObject(Class clazz, Serializable id)
          Generic method to delete an object based on class and id
 void saveObject(Object o)
          Generic method to save an object.
 void setDao(Dao dao)
          Expose the setDao method for testing purposes
 

Method Detail

setDao

void setDao(Dao dao)
Expose the setDao method for testing purposes

Parameters:
dao -

getObjects

List getObjects(Class clazz)
Generic method used to get a all objects of a particular type.

Parameters:
clazz - the type of objects
Returns:
List of populated objects

getObject

Object getObject(Class clazz,
                 Serializable id)
Generic method to get an object based on class and identifier.

Parameters:
clazz - model class to lookup
id - the identifier (primary key) of the class
Returns:
a populated object
See Also:
ObjectRetrievalFailureException

saveObject

void saveObject(Object o)
Generic method to save an object.

Parameters:
o - the object to save

removeObject

void removeObject(Class clazz,
                  Serializable id)
Generic method to delete an object based on class and id

Parameters:
clazz - model class to lookup
id - the identifier of the class


Copyright � 2002-2006