org.dentaku.services.persistence
Interface PersistenceManager

All Known Implementing Classes:
AbstractPersistenceManager, DefaultPersistenceManager

public interface PersistenceManager

A PersistenceManager is the lookup component for multiple PersistenceEngines. This is pluggable, but little need to replace it is foreseen. PersistenceEngines understand what classes they are responsible for, and when they are added to the manager, they populate the ability for a client to recover a factory for a given class. The factory is responsible for the creation and read of objects, but the manager is responsible for update and delete.


Field Summary
static java.lang.String ROLE
           
 
Method Summary
 void delete(ModelEntity object)
           
 java.util.Collection filter(java.util.Collection c, java.lang.String filter)
           
 java.util.List find(java.lang.String query, java.lang.Object[] values, net.sf.hibernate.type.Type[] types)
           
 java.util.List find(java.lang.String query, java.lang.Object value, net.sf.hibernate.type.Type type)
           
 PersistenceFactory getPersistenceFactory(java.lang.String name)
           
 SessionProvider getSessionProvider()
           
 java.lang.Object load(java.lang.Class theClass, java.io.Serializable id)
           
 void refresh(java.lang.Object o)
           
 void releaseSession()
           
 void rollback()
           
 void saveOrUpdate(ModelEntity object)
           
 

Field Detail

ROLE

public static final java.lang.String ROLE
Method Detail

getSessionProvider

public SessionProvider getSessionProvider()
                                   throws PersistenceException
Throws:
PersistenceException

getPersistenceFactory

public PersistenceFactory getPersistenceFactory(java.lang.String name)
                                         throws PersistenceException
Throws:
PersistenceException

load

public java.lang.Object load(java.lang.Class theClass,
                             java.io.Serializable id)
                      throws PersistenceException
Throws:
PersistenceException

saveOrUpdate

public void saveOrUpdate(ModelEntity object)
                  throws PersistenceException
Throws:
PersistenceException

delete

public void delete(ModelEntity object)
            throws PersistenceException
Throws:
PersistenceException

find

public java.util.List find(java.lang.String query,
                           java.lang.Object value,
                           net.sf.hibernate.type.Type type)
                    throws PersistenceException
Throws:
PersistenceException

find

public java.util.List find(java.lang.String query,
                           java.lang.Object[] values,
                           net.sf.hibernate.type.Type[] types)
                    throws PersistenceException
Throws:
PersistenceException

filter

public java.util.Collection filter(java.util.Collection c,
                                   java.lang.String filter)
                            throws PersistenceException
Throws:
PersistenceException

refresh

public void refresh(java.lang.Object o)
             throws PersistenceException
Throws:
PersistenceException

releaseSession

public void releaseSession()
                    throws PersistenceException
Throws:
PersistenceException

rollback

public void rollback()


Copyright © -2004 . All Rights Reserved.