org.appfuse.service.impl
Class UniversalManagerImpl

java.lang.Object
  extended by org.appfuse.service.impl.UniversalManagerImpl
All Implemented Interfaces:
UniversalManager
Direct Known Subclasses:
LookupManagerImpl, RoleManagerImpl, UserManagerImpl

public class UniversalManagerImpl
extends java.lang.Object
implements UniversalManager

Base class for Business Services - use this class for utility methods and generic CRUD methods.

View Source

Author:
Matt Raible

Field Summary
protected  org.appfuse.dao.UniversalDao dao
           
protected  org.apache.commons.logging.Log log
           
 
Constructor Summary
UniversalManagerImpl()
           
 
Method Summary
 java.lang.Object get(java.lang.Class clazz, java.io.Serializable id)
          Generic method to get an object based on class and identifier.
 java.util.List getAll(java.lang.Class clazz)
          Generic method used to get a all objects of a particular type.
 void remove(java.lang.Class clazz, java.io.Serializable id)
          Generic method to delete an object based on class and id
 java.lang.Object save(java.lang.Object o)
          Generic method to save an object.
 void setDao(org.appfuse.dao.UniversalDao dao)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected final org.apache.commons.logging.Log log

dao

protected org.appfuse.dao.UniversalDao dao
Constructor Detail

UniversalManagerImpl

public UniversalManagerImpl()
Method Detail

setDao

public void setDao(org.appfuse.dao.UniversalDao dao)

get

public java.lang.Object get(java.lang.Class clazz,
                            java.io.Serializable id)
Description copied from interface: UniversalManager
Generic method to get an object based on class and identifier.

Specified by:
get in interface UniversalManager
Parameters:
clazz - model class to lookup
id - the identifier (primary key) of the class
Returns:
a populated object
See Also:
UniversalManager.get(java.lang.Class, java.io.Serializable)

getAll

public java.util.List getAll(java.lang.Class clazz)
Description copied from interface: UniversalManager
Generic method used to get a all objects of a particular type.

Specified by:
getAll in interface UniversalManager
Parameters:
clazz - the type of objects
Returns:
List of populated objects
See Also:
UniversalManager.getAll(java.lang.Class)

remove

public void remove(java.lang.Class clazz,
                   java.io.Serializable id)
Description copied from interface: UniversalManager
Generic method to delete an object based on class and id

Specified by:
remove in interface UniversalManager
Parameters:
clazz - model class to lookup
id - the identifier of the class
See Also:
UniversalManager.remove(java.lang.Class, java.io.Serializable)

save

public java.lang.Object save(java.lang.Object o)
Description copied from interface: UniversalManager
Generic method to save an object.

Specified by:
save in interface UniversalManager
Parameters:
o - the object to save
See Also:
UniversalManager.save(java.lang.Object)


Copyright © 2003-2007. All Rights Reserved.