com.atlassian.crowd.model.directory
Class DirectoryDAOHibernate

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
              extended by com.atlassian.crowd.model.directory.DirectoryDAOHibernate
All Implemented Interfaces:
DirectoryDAO, ObjectDao, org.springframework.beans.factory.InitializingBean

public class DirectoryDAOHibernate
extends HibernateDao
implements DirectoryDAO

Hibernate implementation of the DirectoryDAO interface.


Field Summary
 
Fields inherited from class com.atlassian.crowd.util.persistence.hibernate.HibernateDao
batchProcessor
 
Constructor Summary
DirectoryDAOHibernate()
           
 
Method Summary
 Directory add(Directory directory)
          Adds the Directory to the datastore.
 Directory findByID(long ID)
          Finds a given Directory based on the passed in ID.
 Directory findByName(java.lang.String name)
          Finds the Directory based on the passed in directory name.
 java.lang.Class getPersistentClass()
          All subclasses of HibernateDAO must implement this method for HibernateDao.load(long) to work correctly
 void remove(Directory directory)
          Removes a Directory from the datastore.
 java.util.List search(SearchContext searchContext)
          Performs a search for Directorys based on a given SearchContext
 Directory update(Directory directory)
          Updates an Directory in the datastore.
 
Methods inherited from class com.atlassian.crowd.util.persistence.hibernate.HibernateDao
load, remove, save, saveOrUpdate, setBatchProcessor, update
 
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
 
Methods inherited from interface com.atlassian.crowd.util.persistence.hibernate.ObjectDao
load, remove, save, update
 

Constructor Detail

DirectoryDAOHibernate

public DirectoryDAOHibernate()
Method Detail

add

public Directory add(Directory directory)
Description copied from interface: DirectoryDAO
Adds the Directory to the datastore.

Specified by:
add in interface DirectoryDAO
Parameters:
directory - The directory to persist.
Returns:
The persisted directory.
See Also:
DirectoryDAO.add(Directory)

findByID

public Directory findByID(long ID)
                   throws ObjectNotFoundException
Description copied from interface: DirectoryDAO
Finds a given Directory based on the passed in ID.

Specified by:
findByID in interface DirectoryDAO
Parameters:
ID - the id of the Directory you are trying to find.
Returns:
the Directory
Throws:
ObjectNotFoundException - If the Directory based on the passed in ID is not found
See Also:
DirectoryDAO.findByID(long)

search

public java.util.List search(SearchContext searchContext)
Description copied from interface: DirectoryDAO
Performs a search for Directorys based on a given SearchContext

Specified by:
search in interface DirectoryDAO
Parameters:
searchContext - The search context to find a given list of directories.
Returns:
A List of Directorys found from the SearchContext.
See Also:
DirectoryDAO.search(SearchContext)

findByName

public Directory findByName(java.lang.String name)
                     throws ObjectNotFoundException
Description copied from interface: DirectoryDAO
Finds the Directory based on the passed in directory name.

Specified by:
findByName in interface DirectoryDAO
Parameters:
name - The name of the directory to find.
Returns:
The Directory from the datastore.
Throws:
ObjectNotFoundException - If the Directory based on the passed in name is not found.
See Also:
DirectoryDAO.findByName(String)

update

public Directory update(Directory directory)
                 throws ObjectNotFoundException
Description copied from interface: DirectoryDAO
Updates an Directory in the datastore.

Specified by:
update in interface DirectoryDAO
Parameters:
directory - The directory to update.
Returns:
The updated Directory.
Throws:
ObjectNotFoundException - if the given Directory cannot be found
See Also:
DirectoryDAO.update(Directory)

remove

public void remove(Directory directory)
Description copied from interface: DirectoryDAO
Removes a Directory from the datastore.

Specified by:
remove in interface DirectoryDAO
Parameters:
directory - The directory to remove.
See Also:
DirectoryDAO.remove(Directory)

getPersistentClass

public java.lang.Class getPersistentClass()
Description copied from class: HibernateDao
All subclasses of HibernateDAO must implement this method for HibernateDao.load(long) to work correctly

Specified by:
getPersistentClass in interface ObjectDao
Specified by:
getPersistentClass in class HibernateDao
Returns:
Class
See Also:
ObjectDao.getPersistentClass()


Copyright © 2008 Atlassian Pty Ltd. All Rights Reserved.