|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.crowd.dao.directory.FailoverDirectoryDAO
public class FailoverDirectoryDAO
Delegates to a primary DAO, but only if it is active, or to a secondary DAO otherwise.
Constructor Summary | |
---|---|
FailoverDirectoryDAO(DirectoryDao primaryDao,
DirectoryDao secondaryDao,
DaoDiscriminator daoDiscriminator)
|
Method Summary | |
---|---|
Directory |
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. |
Directory |
findById(long directoryId)
Returns the directory with the specified ID, throwing DirectoryNotFoundException if it cannot be found. |
Directory |
findByName(String name)
Returns the directory with the specified name, throwing DirectoryNotFoundException if it cannot be found. |
void |
remove(Directory directory)
Removes the specified directory from the data store. |
List<Directory> |
search(EntityQuery<Directory> entityQuery)
Search for directories matching the specified query. |
Directory |
update(Directory directory)
Persists any changes made to the provided directory. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FailoverDirectoryDAO(DirectoryDao primaryDao, DirectoryDao secondaryDao, DaoDiscriminator daoDiscriminator)
primaryDao
- DAO that will be used unless it is inactivesecondaryDao
- failover DAO that will be used only if the primary is inactivedaoDiscriminator
- discriminator that indicates whether the primary DAO is active or notMethod Detail |
---|
public Directory findById(long directoryId) throws DirectoryNotFoundException
DirectoryDao
DirectoryNotFoundException
if it cannot be found.
findById
in interface DirectoryDao
directoryId
- the ID of the directory to find
DirectoryNotFoundException
- if there is no directory with the specified IDpublic Directory findByName(String name) throws DirectoryNotFoundException
DirectoryDao
DirectoryNotFoundException
if it cannot be found.
findByName
in interface DirectoryDao
name
- the name of the directory to find
DirectoryNotFoundException
- if there is no directory with the specified namepublic List<Directory> findAll()
DirectoryDao
findAll
in interface DirectoryDao
public Directory add(Directory directory)
DirectoryDao
add
in interface DirectoryDao
directory
- the directory to persist
public Directory update(Directory directory) throws DirectoryNotFoundException
DirectoryDao
update
in interface DirectoryDao
directory
- the directory which has changes to persist
DirectoryNotFoundException
- if the directory is not found in the data storepublic void remove(Directory directory) throws DirectoryNotFoundException
DirectoryDao
remove
in interface DirectoryDao
directory
- the directory to remove
DirectoryNotFoundException
- if the directory does not existpublic List<Directory> search(EntityQuery<Directory> entityQuery)
DirectoryDao
search
in interface DirectoryDao
entityQuery
- the search query to run against the directory data store
QueryBuilder.queryFor(java.lang.Class, com.atlassian.crowd.search.EntityDescriptor)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |