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
manager
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) |
void |
dispose() |
org.hibernate.cfg.Configuration |
getConfiguration() |
org.hibernate.SessionFactory |
getSessionFactory()
Lazy loads the sessionFactory if it hasn't been requested yet.
|
void |
initialize() |
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, service
public void removeEntity(SecurityEntity entity) throws DataBackendException
removeEntity
in interface PersistenceHelper
entity
- The object to be removedDataBackendException
- if there was an error accessing the data backend.public void updateEntity(SecurityEntity entity) throws DataBackendException
updateEntity
in interface PersistenceHelper
entity
- The object to be savedDataBackendException
- if there was an error accessing the data backend.public void addEntity(SecurityEntity entity) throws DataBackendException
addEntity
in interface PersistenceHelper
entity
- The object to be savedDataBackendException
- if there was an error accessing the data backend.public org.hibernate.Session retrieveSession() throws org.hibernate.HibernateException
retrieveSession
in interface PersistenceHelper
org.hibernate.HibernateException
- generic exceptionpublic org.hibernate.cfg.Configuration getConfiguration()
getConfiguration
in interface PersistenceHelper
public void setSessionFactory(org.hibernate.SessionFactory sessionFactory)
sessionFactory
- The hibernateService to set.public org.hibernate.SessionFactory getSessionFactory() throws org.hibernate.HibernateException
org.hibernate.HibernateException
public void initialize() throws Exception
initialize
in interface org.apache.avalon.framework.activity.Initializable
Exception
public void dispose()
dispose
in interface org.apache.avalon.framework.activity.Disposable
dispose
in class AbstractManager
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.Configurable
org.apache.avalon.framework.configuration.ConfigurationException
Copyright © 2011–2019 The Apache Software Foundation. All rights reserved.