com.gisgraphy.service
Interface UniversalManager

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

public interface UniversalManager

Business Facade interface.

Author:
Matt Raible Modifications and comments by Bryan Noll This thing used to be named simply 'GenericManager' in versions of AppFuse prior to 2.0. It was renamed in an attempt to distinguish and describe it as something different than GenericManager. GenericManager is intended for subclassing, and was named Generic because 1) it has very general functionality and 2) is 'generic' in the Java 5 sense of the word... aka... it uses Generics. Implementations of this class are not intended for subclassing. You most likely would want to subclass GenericManager. The only real difference is that instances of java.lang.Class are passed into the methods in this class, and they are part of the constructor in the GenericManager, hence you'll have to do some casting if you use this one.

Method Summary
 Object get(Class<?> clazz, Serializable id)
          Generic method to get an object based on class and identifier.
 List<?> getAll(Class<?> clazz)
          Generic method used to get a all objects of a particular type.
 void remove(Class<?> clazz, Serializable id)
          Generic method to delete an object based on class and id
 Object save(Object o)
          Generic method to save an object.
 

Method Detail

getAll

List<?> getAll(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

get

Object get(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

save

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

Parameters:
o - the object to save
Returns:
a populated object

remove

void remove(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 © 2012. All Rights Reserved.