com.acsinet_solutions.cetia4.service.impl
Class CatalogManagerImpl

java.lang.Object
  extended by com.acsinet_solutions.cetia4.service.spring.HibernateManagerSupport
      extended by com.acsinet_solutions.cetia4.service.impl.CatalogManagerImpl
All Implemented Interfaces:
CatalogManager

public class CatalogManagerImpl
extends HibernateManagerSupport
implements CatalogManager

A generic Hibernate based implementation of a simple key based catalog manager. Methods that require the class of the object being persisted will receive so.

Author:
Santiago Arriaga - santiago.arriaga@acsinet-solutions.com

Constructor Summary
CatalogManagerImpl()
           
 
Method Summary
 void deleteObject(java.lang.Class c, java.lang.Integer id)
          Delete an object.
 IntKeyDTO getObject(java.lang.Class c, java.lang.Integer id)
          Read an object by key.
 java.util.Map<java.lang.Integer,IntKeyDTO> getObjectMap(java.lang.Class c)
          Get a linked Map of the objects in the given catalog, the keys of the map are int values; the values are instances of the DTO class.
 java.util.List<IntKeyDTO> getObjects(java.lang.Class c)
          Get a list of the objects in the given catalog.
 java.lang.Integer insertObject(IntKeyDTO object)
          Insert a new object.
 void updateObject(IntKeyDTO object)
          Update an object.
 
Methods inherited from class com.acsinet_solutions.cetia4.service.spring.HibernateManagerSupport
check, delete, getCatalog, getSession, load, setSessionFactory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CatalogManagerImpl

public CatalogManagerImpl()
Method Detail

getObject

public IntKeyDTO getObject(java.lang.Class c,
                           java.lang.Integer id)
                    throws NonExistentObjectException,
                           SystemException
Description copied from interface: CatalogManager
Read an object by key.

Specified by:
getObject in interface CatalogManager
Throws:
NonExistentObjectException
SystemException

insertObject

public java.lang.Integer insertObject(IntKeyDTO object)
                               throws ValidationException,
                                      SystemException
Description copied from interface: CatalogManager
Insert a new object.

Specified by:
insertObject in interface CatalogManager
Throws:
ValidationException
SystemException

updateObject

public void updateObject(IntKeyDTO object)
                  throws ValidationException,
                         NonExistentObjectException,
                         SystemException
Description copied from interface: CatalogManager
Update an object.

Specified by:
updateObject in interface CatalogManager
Throws:
ValidationException
NonExistentObjectException
SystemException

deleteObject

public void deleteObject(java.lang.Class c,
                         java.lang.Integer id)
                  throws NonExistentObjectException,
                         SystemException
Description copied from interface: CatalogManager
Delete an object.

Specified by:
deleteObject in interface CatalogManager
Throws:
NonExistentObjectException
SystemException

getObjects

public java.util.List<IntKeyDTO> getObjects(java.lang.Class c)
                                     throws SystemException
Description copied from interface: CatalogManager
Get a list of the objects in the given catalog.

Specified by:
getObjects in interface CatalogManager
Throws:
SystemException

getObjectMap

public java.util.Map<java.lang.Integer,IntKeyDTO> getObjectMap(java.lang.Class c)
                                                        throws SystemException
Description copied from interface: CatalogManager
Get a linked Map of the objects in the given catalog, the keys of the map are int values; the values are instances of the DTO class. This instance can be used in combo boxes if it contains a meaningful toString() method overriden.

Specified by:
getObjectMap in interface CatalogManager
Throws:
SystemException