public class DirectoryDAOHibernate extends HibernateDao<DirectoryImpl> implements DirectoryDao
batchFinder, batchProcessor, logger, statelessSessionBatchProcessor, timeSource
sessionFactory
Constructor and Description |
---|
DirectoryDAOHibernate() |
Modifier and Type | Method and Description |
---|---|
DirectoryImpl |
add(Directory directory)
Store a new directory in the data store.
|
List<Directory> |
findAll()
Returns the list of all directories in the data store, or empty list if there are no directories.
|
DirectoryImpl |
findById(long id)
Returns the directory with the specified ID, throwing
DirectoryNotFoundException if it cannot be found. |
DirectoryImpl |
findByName(String name)
Returns the directory with the specified name, throwing
DirectoryNotFoundException if it cannot be found. |
Class<DirectoryImpl> |
getPersistentClass()
All subclasses of HibernateDao must implement this method for
HibernateDao.load(Serializable) to work
correctly. |
void |
remove(Directory directory)
Removes the specified directory from the data store.
|
List<Directory> |
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) |
DirectoryImpl |
update(Directory directory)
Persists any changes made to the provided directory.
|
createDeleteQuery, createDeleteQuery, createQuery, createQuery, executeHQLQuery, 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
setSessionFactory, withStatelessSession
public DirectoryImpl add(Directory directory)
DirectoryDao
add
in interface DirectoryDao
directory
- the directory to persistpublic List<Directory> findAll()
DirectoryDao
findAll
in interface DirectoryDao
public DirectoryImpl findById(long id) throws DirectoryNotFoundException
DirectoryDao
DirectoryNotFoundException
if it cannot be found.findById
in interface DirectoryDao
id
- the ID of the directory to findDirectoryNotFoundException
- if there is no directory with the specified IDpublic DirectoryImpl findByName(String name) throws DirectoryNotFoundException
DirectoryDao
DirectoryNotFoundException
if it cannot be found.findByName
in interface DirectoryDao
name
- the name of the directory to findDirectoryNotFoundException
- if there is no directory with the specified namepublic Class<DirectoryImpl> getPersistentClass()
HibernateDao
HibernateDao.load(Serializable)
to work
correctly.getPersistentClass
in class HibernateDao<DirectoryImpl>
public void remove(Directory directory) throws DirectoryNotFoundException
DirectoryDao
remove
in interface DirectoryDao
directory
- the directory to removeDirectoryNotFoundException
- if the directory does not existpublic List<Directory> search(EntityQuery query)
DirectoryDao
search
in interface DirectoryDao
query
- the search query to run against the directory data storeQueryBuilder.queryFor(java.lang.Class<T>, com.atlassian.crowd.search.EntityDescriptor)
public DirectoryImpl update(Directory directory) throws DirectoryNotFoundException
DirectoryDao
update
in interface DirectoryDao
directory
- the directory which has changes to persistDirectoryNotFoundException
- if the directory is not found in the data store@Autowired public void setGroupDao(InternalGroupDao groupDao)
@Autowired public void setHqlQueryTranslater(HQLQueryTranslater hqlQueryTranslater)
@Autowired public void setUserDao(InternalUserDao userDao)
@Autowired public void setDirectoryInfoDao(DirectoryInfoDao directoryInfoDao)
Copyright © 2020 Atlassian. All rights reserved.