com.atlassian.crowd.util.persistence.hibernate
Class HibernateDao

java.lang.Object
  extended by org.springframework.dao.support.DaoSupport
      extended by org.springframework.orm.hibernate3.support.HibernateDaoSupport
          extended by com.atlassian.crowd.util.persistence.hibernate.HibernateDao
All Implemented Interfaces:
ObjectDao, org.springframework.beans.factory.InitializingBean
Direct Known Subclasses:
ApplicationDAOHibernate, ApplicationDirectoryPermissionDAOHibernate, DirectoryDAOHibernate, EntityObjectDAOHibernate, GroupDAOHibernate, GroupMembershipDAOHibernate, PrincipalDAOHibernate, PropertyDAOHibernate, RoleDAOHibernate, RoleMembershipDAOHibernate, SALPropertyDAOHibernate, TokenDAOHibernate

public abstract class HibernateDao
extends org.springframework.orm.hibernate3.support.HibernateDaoSupport
implements ObjectDao

Generic persistence class for storing Hibernate persistence objects.


Field Summary
protected  BatchProcessor batchProcessor
           
 
Constructor Summary
HibernateDao()
           
 
Method Summary
abstract  java.lang.Class getPersistentClass()
          All subclasses of HibernateDAO must implement this method for load(long) to work correctly
 java.lang.Object load(long ID)
          Loads a persistnce DAO object from the persistence store.
 void remove(java.lang.Object persistentObject)
          Removes the DAO object from the persistence store.
 void save(java.lang.Object persistentObject)
          Saves a new DAO object to the persistence store.
 void saveOrUpdate(java.lang.Object persistentObject)
          Saves or updates DAO object to the persistence store.
 void setBatchProcessor(BatchProcessor batchProcessor)
           
 void update(java.lang.Object persistentObject)
          Updates an existing DAO object, if the object does not exist it will be added to the persistence store.
 
Methods inherited from class org.springframework.orm.hibernate3.support.HibernateDaoSupport
checkDaoConfig, convertHibernateAccessException, createHibernateTemplate, getHibernateTemplate, getSession, getSession, getSessionFactory, releaseSession, setHibernateTemplate, setSessionFactory
 
Methods inherited from class org.springframework.dao.support.DaoSupport
afterPropertiesSet, initDao
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

batchProcessor

protected BatchProcessor batchProcessor
Constructor Detail

HibernateDao

public HibernateDao()
Method Detail

save

public void save(java.lang.Object persistentObject)
          throws org.springframework.dao.DataAccessException
Saves a new DAO object to the persistence store.

Specified by:
save in interface ObjectDao
Parameters:
persistentObject - The object to save.
Throws:
org.springframework.dao.DataAccessException - A persistence exception has occurred.

saveOrUpdate

public void saveOrUpdate(java.lang.Object persistentObject)
                  throws org.springframework.dao.DataAccessException
Saves or updates DAO object to the persistence store.

Parameters:
persistentObject - The object to save or update.
Throws:
org.springframework.dao.DataAccessException - A persistence exception has occurred.

update

public void update(java.lang.Object persistentObject)
            throws org.springframework.dao.DataAccessException
Updates an existing DAO object, if the object does not exist it will be added to the persistence store.

Specified by:
update in interface ObjectDao
Parameters:
persistentObject - The object to update.
Throws:
org.springframework.dao.DataAccessException - A persistence exception has occurred.

remove

public void remove(java.lang.Object persistentObject)
            throws org.springframework.dao.DataAccessException
Removes the DAO object from the persistence store.

Specified by:
remove in interface ObjectDao
Parameters:
persistentObject - The object to remove.
Throws:
org.springframework.dao.DataAccessException - A persistence exception has occurred.

load

public java.lang.Object load(long ID)
                      throws ObjectNotFoundException
Loads a persistnce DAO object from the persistence store.

Specified by:
load in interface ObjectDao
Parameters:
ID - The unique identifier of the object to load from the persistence store.
Returns:
The populated object from the database.
Throws:
ObjectNotFoundException - if the given object with ID for the persistent class does not exist

getPersistentClass

public abstract java.lang.Class getPersistentClass()
All subclasses of HibernateDAO must implement this method for load(long) to work correctly

Specified by:
getPersistentClass in interface ObjectDao
Returns:
Class

setBatchProcessor

public void setBatchProcessor(BatchProcessor batchProcessor)


Copyright © 2009 Atlassian Pty Ltd. All Rights Reserved.