Class AppIssuesWithMailsScanResultDAOHibernate
java.lang.Object
com.atlassian.crowd.util.persistence.hibernate.StatelessDao
com.atlassian.crowd.util.persistence.hibernate.HibernateDao<AppIssuesWithMailScanResultEntity>
com.atlassian.crowd.dao.application.AppIssuesWithMailsScanResultDAOHibernate
- All Implemented Interfaces:
AppIssuesWithMailsScanResultDAO
public class AppIssuesWithMailsScanResultDAOHibernate
extends HibernateDao<AppIssuesWithMailScanResultEntity>
implements AppIssuesWithMailsScanResultDAO
-
Field Summary
Fields inherited from class com.atlassian.crowd.util.persistence.hibernate.HibernateDao
batchFinder, batchProcessor, logger, statelessSessionBatchProcessor, timeSource
Fields inherited from class com.atlassian.crowd.util.persistence.hibernate.StatelessDao
sessionFactory
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetLatestResult
(long appId) Gets latest scan result for a given application.All subclasses of HibernateDao must implement this method forHibernateDao.load(Serializable)
to work correctly.void
persistLatestResult
(AppIssuesWithMailScanResultEntity appIssuesWithMailScanResultEntity) Persists scan result for a given application.void
removeLatestResultIfPresent
(long appId) Removes latest scan result for a given application.Methods inherited from class com.atlassian.crowd.util.persistence.hibernate.HibernateDao
createDeleteQuery, createDeleteQuery, createQuery, createQuery, 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
Methods inherited from class com.atlassian.crowd.util.persistence.hibernate.StatelessDao
setSessionFactory, withStatelessSession
-
Constructor Details
-
AppIssuesWithMailsScanResultDAOHibernate
public AppIssuesWithMailsScanResultDAOHibernate()
-
-
Method Details
-
persistLatestResult
public void persistLatestResult(AppIssuesWithMailScanResultEntity appIssuesWithMailScanResultEntity) Description copied from interface:AppIssuesWithMailsScanResultDAO
Persists scan result for a given application. Overrides old scan result for given app if exists.- Specified by:
persistLatestResult
in interfaceAppIssuesWithMailsScanResultDAO
- Parameters:
appIssuesWithMailScanResultEntity
- scan result entity
-
getLatestResult
Description copied from interface:AppIssuesWithMailsScanResultDAO
Gets latest scan result for a given application.- Specified by:
getLatestResult
in interfaceAppIssuesWithMailsScanResultDAO
- Parameters:
appId
- application ID- Returns:
- optional containing scan results or empty optional if no scan results found
-
removeLatestResultIfPresent
public void removeLatestResultIfPresent(long appId) Description copied from interface:AppIssuesWithMailsScanResultDAO
Removes latest scan result for a given application. Does nothing when there is no scan result present.- Specified by:
removeLatestResultIfPresent
in interfaceAppIssuesWithMailsScanResultDAO
- Parameters:
appId
- application ID
-
getPersistentClass
Description copied from class:HibernateDao
All subclasses of HibernateDao must implement this method forHibernateDao.load(Serializable)
to work correctly.- Specified by:
getPersistentClass
in classHibernateDao<AppIssuesWithMailScanResultEntity>
- Returns:
- the entity class for this DAO
-