Class DirectoryDaoTransactionalDecorator
java.lang.Object
com.atlassian.crowd.manager.directory.DirectoryDaoTransactionalDecorator
- All Implemented Interfaces:
DirectoryDao
,TransactionalDirectoryDao
@Transactional
public class DirectoryDaoTransactionalDecorator
extends Object
implements TransactionalDirectoryDao
Wraps
DirectoryDao
calls in a Transactional
. This is helpful when another component needs to
both define a DirectoryDao
method in as transactional and call it.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionMakes a transactional call toDirectoryDao.add(Directory)
findAll()
Deprecated.findById
(long directoryId) Makes a transactional call toDirectoryDao.findById(long)
findByName
(String name) Makes a transactional call toDirectoryDao.findByName(String)
void
Makes a transactional call toDirectoryDao.remove(Directory)
search
(EntityQuery<Directory> entityQuery) Makes a transactional call toDirectoryDao.search(EntityQuery)
Makes a transactional call toDirectoryDao.update(Directory)
-
Constructor Details
-
DirectoryDaoTransactionalDecorator
-
-
Method Details
-
findById
@Transactional(readOnly=true) public Directory findById(long directoryId) throws DirectoryNotFoundException Makes a transactional call toDirectoryDao.findById(long)
- Specified by:
findById
in interfaceDirectoryDao
- Parameters:
directoryId
- dir id- Returns:
- directory
- Throws:
DirectoryNotFoundException
- if directory is not present
-
update
Makes a transactional call toDirectoryDao.update(Directory)
- Specified by:
update
in interfaceDirectoryDao
- Parameters:
directory
- directory to be updated- Returns:
- the updated directory after it has been persisted, which should be used for subsequent operations
- Throws:
DirectoryNotFoundException
- if directory is not present
-
findByName
@Transactional(readOnly=true) public Directory findByName(String name) throws DirectoryNotFoundException Makes a transactional call toDirectoryDao.findByName(String)
- Specified by:
findByName
in interfaceDirectoryDao
- Parameters:
name
- directory name- Returns:
- the directory with the specified name
- Throws:
DirectoryNotFoundException
- if directory is not present
-
add
Makes a transactional call toDirectoryDao.add(Directory)
- Specified by:
add
in interfaceDirectoryDao
- Parameters:
directory
- the directory to persist- Returns:
- the newly-persisted directory, which should be used for subsequent operations
-
remove
Makes a transactional call toDirectoryDao.remove(Directory)
- Specified by:
remove
in interfaceDirectoryDao
- Parameters:
directory
- the directory to remove- Throws:
DirectoryNotFoundException
- if the directory does not exist
-
findAll
Deprecated.Usesearch(EntityQuery)
instead. Since v3.2.0Makes a transactional call toDirectoryDao.findAll()
- Specified by:
findAll
in interfaceDirectoryDao
- Returns:
- all directories
-
search
Makes a transactional call toDirectoryDao.search(EntityQuery)
- Specified by:
search
in interfaceDirectoryDao
- Parameters:
entityQuery
- the search query to run against the directory data store- Returns:
- a list of directories matching the query
- See Also:
-
search(EntityQuery)
instead.