com.acsinet_solutions.cetia4.service
Interface CatalogManager

All Known Implementing Classes:
CatalogManagerImpl

@Transactional(rollbackFor=java.lang.Exception.class)
public interface CatalogManager

Interface for managers that implement a generic manager ( or DAO ) over a IntKeyDTO instance. This interface is meant for simple catalogs that require a very typical persistence lifecycle.

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

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.
 

Method Detail

getObject

@Transactional(propagation=SUPPORTS,
               readOnly=true)
IntKeyDTO getObject(java.lang.Class c,
                                  java.lang.Integer id)
                    throws NonExistentObjectException,
                           SystemException
Read an object by key.

Throws:
NonExistentObjectException
SystemException

insertObject

java.lang.Integer insertObject(IntKeyDTO object)
                               throws ValidationException,
                                      SystemException
Insert a new object.

Throws:
ValidationException
SystemException

updateObject

void updateObject(IntKeyDTO object)
                  throws ValidationException,
                         NonExistentObjectException,
                         SystemException
Update an object.

Throws:
ValidationException
NonExistentObjectException
SystemException

deleteObject

void deleteObject(java.lang.Class c,
                  java.lang.Integer id)
                  throws NonExistentObjectException,
                         SystemException
Delete an object.

Throws:
NonExistentObjectException
SystemException

getObjects

@Transactional(propagation=SUPPORTS,
               readOnly=true)
java.util.List<IntKeyDTO> getObjects(java.lang.Class c)
                                     throws SystemException
Get a list of the objects in the given catalog.

Throws:
SystemException

getObjectMap

@Transactional(propagation=SUPPORTS,
               readOnly=true)
java.util.Map<java.lang.Integer,IntKeyDTO> getObjectMap(java.lang.Class c)
                                                        throws SystemException
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.

Throws:
SystemException