public class DirectoryDAOHibernate extends HibernateDao implements DirectoryDao
batchFinder, batchProcessor, logger, 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 |
getPersistentClass()
All subclasses of HibernateDao must implement this method for
HibernateDao.load(long) 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 |
setGroupDao(InternalGroupDao groupDao) |
void |
setHqlQueryTranslater(HQLQueryTranslater hqlQueryTranslater) |
void |
setUserDao(InternalUserDao userDao) |
DirectoryImpl |
update(Directory directory)
Persists any changes made to the provided directory.
|
createHibernateQuery, load, load, loadReference, loadReference, remove, save, saveOrUpdate, session, setBatchFinder, setBatchProcessor, setSessionFactory, update
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 getPersistentClass()
HibernateDao
HibernateDao.load(long)
to work correctly.getPersistentClass
in class HibernateDao
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)
Copyright © 2016 Atlassian. All rights reserved.