public class PersistenceHelperDefaultImpl extends AbstractManager implements PersistenceHelper, org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.activity.Initializable, org.apache.avalon.framework.activity.Disposable
ROLE| Constructor and Description |
|---|
PersistenceHelperDefaultImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
addEntity(SecurityEntity entity)
adds an entity
|
void |
configure(org.apache.avalon.framework.configuration.Configuration conf)
Avalon lifecycle method
|
void |
dispose()
Avalon lifecycle method
|
org.hibernate.cfg.Configuration |
getConfiguration()
Return the hibernate configuration
|
org.hibernate.SessionFactory |
getSessionFactory()
Lazy loads the sessionFactory if it hasn't been requested yet.
|
void |
initialize()
Avalon lifecycle method
|
void |
removeEntity(SecurityEntity entity)
Deletes an entity object
|
org.hibernate.Session |
retrieveSession()
Returns a hibernate session, or if is null, opens one.
|
void |
setSessionFactory(org.hibernate.SessionFactory sessionFactory)
In some environments we will load the session factory up and pass it in.
|
void |
updateEntity(SecurityEntity entity)
Stores changes made to an object
|
getGroupManager, getPermissionManager, getRoleManager, getServiceManager, getUserManager, release, resolve, servicepublic void removeEntity(SecurityEntity entity) throws DataBackendException
removeEntity in interface PersistenceHelperrole - The object to be removedDataBackendException - if there was an error accessing the data backend.UnknownEntityException - if the object does not exist.public void updateEntity(SecurityEntity entity) throws DataBackendException
updateEntity in interface PersistenceHelperrole - The object to be savedDataBackendException - if there was an error accessing the data backend.UnknownEntityException - if the role does not exist.public void addEntity(SecurityEntity entity) throws DataBackendException
addEntity in interface PersistenceHelperrole - The object to be savedDataBackendException - if there was an error accessing the data backend.UnknownEntityException - if the role does not exist.public org.hibernate.Session retrieveSession()
throws org.hibernate.HibernateException
retrieveSession in interface PersistenceHelperorg.hibernate.HibernateExceptionpublic org.hibernate.cfg.Configuration getConfiguration()
getConfiguration in interface PersistenceHelperpublic void setSessionFactory(org.hibernate.SessionFactory sessionFactory)
hibernateService - The hibernateService to set.public org.hibernate.SessionFactory getSessionFactory()
throws org.hibernate.HibernateException
org.hibernate.HibernateExceptionpublic void initialize()
throws Exception
initialize in interface org.apache.avalon.framework.activity.InitializableExceptionInitializable.initialize()public void dispose()
dispose in interface org.apache.avalon.framework.activity.Disposabledispose in class AbstractManagerAbstractManager.dispose()public void configure(org.apache.avalon.framework.configuration.Configuration conf)
throws org.apache.avalon.framework.configuration.ConfigurationException
configure in interface org.apache.avalon.framework.configuration.Configurableorg.apache.avalon.framework.configuration.ConfigurationExceptionConfigurable.configure(org.apache.avalon.framework.configuration.Configuration)Copyright © 2011-2015 The Apache Software Foundation. All Rights Reserved.