public class DirectorySynchronisationStatusDAOHibernate extends HibernateDao<DirectorySynchronisationStatusImpl> implements DirectorySynchronisationStatusDao
batchFinder, batchProcessor, logger, statelessSessionBatchProcessor, timeSource
sessionFactory
Constructor and Description |
---|
DirectorySynchronisationStatusDAOHibernate() |
Modifier and Type | Method and Description |
---|---|
DirectorySynchronisationStatus |
add(DirectorySynchronisationStatus status)
Saves a new synchronisation status
|
Optional<DirectorySynchronisationStatus> |
findActiveForDirectory(long directoryId) |
Collection<DirectorySynchronisationStatus> |
findActiveSyncsWhereNodeIdNotIn(Set<String> nodesIds) |
Optional<DirectorySynchronisationStatus> |
findLastForDirectory(long directoryId) |
Class<DirectorySynchronisationStatusImpl> |
getPersistentClass()
All subclasses of HibernateDao must implement this method for
HibernateDao.load(Serializable) to work
correctly. |
long |
removeAll()
Removes all stored status information
|
long |
removeAllExcept(long directoryId,
int statusId)
Removes all stored status information for the directory except the indicated one
|
long |
removeStatusesForDirectory(Long directoryId)
Removes all stored status information for the directory with the specified id
|
DirectorySynchronisationStatus |
update(DirectorySynchronisationStatus status)
Updates an existing directory status
|
createDeleteQuery, createDeleteQuery, createHibernateQuery, createQuery, createQuery, executeHQLQuery, findAllInternal, findByProperties, findByPropertiesOptional, findByProperty, findByProperty, findByPropertyOptional, findByPropertyOrThrow, load, load, loadOptional, loadReference, loadReference, remove, removeByIdIfPresent, save, saveOrUpdate, session, setBatchFinder, setBatchProcessor, setClock, setStatelessSessionBatchProcessor, toPredicates, update
setSessionFactory, withStatelessSession
public DirectorySynchronisationStatusDAOHibernate()
public Class<DirectorySynchronisationStatusImpl> getPersistentClass()
HibernateDao
HibernateDao.load(Serializable)
to work
correctly.getPersistentClass
in class HibernateDao<DirectorySynchronisationStatusImpl>
public Optional<DirectorySynchronisationStatus> findActiveForDirectory(long directoryId)
findActiveForDirectory
in interface DirectorySynchronisationStatusDao
public Optional<DirectorySynchronisationStatus> findLastForDirectory(long directoryId)
findLastForDirectory
in interface DirectorySynchronisationStatusDao
public DirectorySynchronisationStatus update(DirectorySynchronisationStatus status) throws ObjectNotFoundException
DirectorySynchronisationStatusDao
update
in interface DirectorySynchronisationStatusDao
ObjectNotFoundException
- if a status with the given id doesn't existpublic DirectorySynchronisationStatus add(DirectorySynchronisationStatus status)
DirectorySynchronisationStatusDao
add
in interface DirectorySynchronisationStatusDao
public long removeStatusesForDirectory(Long directoryId)
DirectorySynchronisationStatusDao
removeStatusesForDirectory
in interface DirectorySynchronisationStatusDao
directoryId
- the directory id to remove forpublic long removeAll()
DirectorySynchronisationStatusDao
removeAll
in interface DirectorySynchronisationStatusDao
public long removeAllExcept(long directoryId, int statusId)
DirectorySynchronisationStatusDao
removeAllExcept
in interface DirectorySynchronisationStatusDao
directoryId
- the directory idstatusId
- the id of the status to keeppublic Collection<DirectorySynchronisationStatus> findActiveSyncsWhereNodeIdNotIn(Set<String> nodesIds)
findActiveSyncsWhereNodeIdNotIn
in interface DirectorySynchronisationStatusDao
nodesIds
- the set of node ids to filter onCopyright © 2019 Atlassian. All rights reserved.