Class DirectoryDAOHibernate
java.lang.Object
com.atlassian.crowd.util.persistence.hibernate.StatelessDao
com.atlassian.crowd.util.persistence.hibernate.HibernateDao<DirectoryImpl>
com.atlassian.crowd.dao.directory.DirectoryDAOHibernate
- All Implemented Interfaces:
DirectoryDao
-
Field Summary
Fields inherited from class com.atlassian.crowd.util.persistence.hibernate.HibernateDao
batchFinder, batchProcessor, logger, statelessSessionBatchProcessor, timeSource
Fields inherited from class com.atlassian.crowd.util.persistence.hibernate.StatelessDao
sessionFactory
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionStore a new directory in the data store.findAll()
Returns the list of all directories in the data store, or empty list if there are no directories.findById
(long id) Returns the directory with the specified ID, throwingDirectoryNotFoundException
if it cannot be found.findByName
(String name) Returns the directory with the specified name, throwingDirectoryNotFoundException
if it cannot be found.All subclasses of HibernateDao must implement this method forHibernateDao.load(Serializable)
to work correctly.void
Removes the specified directory from the data store.search
(EntityQuery query) Search for directories matching the specified query.void
setDirectoryInfoDao
(DirectoryInfoDao directoryInfoDao) void
setGroupDao
(InternalGroupDao groupDao) void
setHqlQueryTranslater
(HQLQueryTranslater hqlQueryTranslater) void
setUserDao
(InternalUserDao userDao) Persists any changes made to the provided directory.Methods inherited from class com.atlassian.crowd.util.persistence.hibernate.HibernateDao
createDeleteQuery, createDeleteQuery, createQuery, createQuery, executeHQLQuery, findAllInternal, findByProperties, findByPropertiesOptional, findByProperty, findByProperty, findByPropertyOptional, findByPropertyOrThrow, getCountByProperties, load, load, loadOptional, loadReference, loadReference, remove, removeByIdIfPresent, save, saveOrUpdate, session, setBatchFinder, setBatchProcessor, setClock, setStatelessSessionBatchProcessor, toPredicates, update
Methods inherited from class com.atlassian.crowd.util.persistence.hibernate.StatelessDao
setSessionFactory, withStatelessSession
-
Constructor Details
-
DirectoryDAOHibernate
public DirectoryDAOHibernate()
-
-
Method Details
-
add
Description copied from interface:DirectoryDao
Store a new directory in the data store.- Specified by:
add
in interfaceDirectoryDao
- Parameters:
directory
- the directory to persist- Returns:
- the newly-persisted directory, which should be used for subsequent operations
-
findAll
Description copied from interface:DirectoryDao
Returns the list of all directories in the data store, or empty list if there are no directories.- Specified by:
findAll
in interfaceDirectoryDao
-
findById
Description copied from interface:DirectoryDao
Returns the directory with the specified ID, throwingDirectoryNotFoundException
if it cannot be found.- Specified by:
findById
in interfaceDirectoryDao
- Parameters:
id
- the ID of the directory to find- Returns:
- the directory with the specified ID
- Throws:
DirectoryNotFoundException
- if there is no directory with the specified ID
-
findByName
Description copied from interface:DirectoryDao
Returns the directory with the specified name, throwingDirectoryNotFoundException
if it cannot be found.- Specified by:
findByName
in interfaceDirectoryDao
- Parameters:
name
- the name of the directory to find- Returns:
- the directory with the specified name
- Throws:
DirectoryNotFoundException
- if there is no directory with the specified name
-
getPersistentClass
Description copied from class:HibernateDao
All subclasses of HibernateDao must implement this method forHibernateDao.load(Serializable)
to work correctly.- Specified by:
getPersistentClass
in classHibernateDao<DirectoryImpl>
- Returns:
- the entity class for this DAO
-
remove
Description copied from interface:DirectoryDao
Removes the specified directory from the data store.- Specified by:
remove
in interfaceDirectoryDao
- Parameters:
directory
- the directory to remove- Throws:
DirectoryNotFoundException
- if the directory does not exist
-
search
Description copied from interface:DirectoryDao
Search for directories matching the specified query.- Specified by:
search
in interfaceDirectoryDao
- Parameters:
query
- the search query to run against the directory data store- Returns:
- a list of directories matching the query
- See Also:
-
update
Description copied from interface:DirectoryDao
Persists any changes made to the provided directory.- Specified by:
update
in interfaceDirectoryDao
- Parameters:
directory
- the directory which has changes to persist- Returns:
- the updated directory after it has been persisted, which should be used for subsequent operations
- Throws:
DirectoryNotFoundException
- if the directory is not found in the data store
-
setGroupDao
-
setHqlQueryTranslater
-
setUserDao
-
setDirectoryInfoDao
-