com.acsinet_solutions.cetia4.service.spring
Class HibernateManagerSupport

java.lang.Object
  extended by com.acsinet_solutions.cetia4.service.spring.HibernateManagerSupport
Direct Known Subclasses:
CatalogManagerImpl

public abstract class HibernateManagerSupport
extends java.lang.Object

Base convenience class for service classes based on Hibernate 3 that are placed over Spring containers with AOP transaction management.


Constructor Summary
HibernateManagerSupport()
           
 
Method Summary
protected  void check(PagedSearchFilter filter, int count)
          Check the first value in the given filter is lower than the count provided.
protected  void delete(org.hibernate.Session session, java.lang.Class c, java.io.Serializable id)
          Delete a bean instance by id
protected  java.util.Map<java.lang.Integer,IntKeyDTO> getCatalog(org.hibernate.Session session, java.lang.Class c)
          Get a catalog of Simple int key DTO objects.
protected  org.hibernate.Session getSession()
          Get the current hibernate session.
protected  java.lang.Object load(org.hibernate.Session session, java.lang.Class c, java.io.Serializable id)
          Convenience method for classes that must perform a loading by int id
 void setSessionFactory(org.hibernate.SessionFactory sessionFactory)
          Set the Hibernate session factory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HibernateManagerSupport

public HibernateManagerSupport()
Method Detail

setSessionFactory

public final void setSessionFactory(org.hibernate.SessionFactory sessionFactory)
Set the Hibernate session factory


getSession

protected final org.hibernate.Session getSession()
Get the current hibernate session.


load

protected final java.lang.Object load(org.hibernate.Session session,
                                      java.lang.Class c,
                                      java.io.Serializable id)
                               throws NonExistentObjectException
Convenience method for classes that must perform a loading by int id

Throws:
NonExistentObjectException

delete

protected final void delete(org.hibernate.Session session,
                            java.lang.Class c,
                            java.io.Serializable id)
                     throws NonExistentObjectException
Delete a bean instance by id

Throws:
NonExistentObjectException

getCatalog

protected final java.util.Map<java.lang.Integer,IntKeyDTO> getCatalog(org.hibernate.Session session,
                                                                      java.lang.Class c)
Get a catalog of Simple int key DTO objects.


check

protected final void check(PagedSearchFilter filter,
                           int count)
                    throws ValidationException
Check the first value in the given filter is lower than the count provided.

Throws:
ValidationException