public class TombstoneDAOHibernate extends HibernateDao<AbstractTombstone> implements TombstoneDao
batchFinder, batchProcessor, logger, statelessSessionBatchProcessor, timeSourcesessionFactory| Constructor and Description |
|---|
TombstoneDAOHibernate() |
| Modifier and Type | Method and Description |
|---|---|
Class<AbstractTombstone> |
getPersistentClass()
All subclasses of HibernateDao must implement this method for
HibernateDao.load(Serializable) to work
correctly. |
<T extends AbstractTombstone> |
getTombstonesAfter(long after,
Collection<Long> directoryIds,
Class<T> type)
Retrieves tombstone of the specified type, after the timestamp specified, optionally constrained to a directory set
|
<T extends ApplicationTombstone> |
getTombstonesAfter(long after,
Long applicationId,
Class<T> type)
Retrieves tombstone for the specified application, after the timestamp specified
|
int |
removeAllUpTo(long timestamp)
Removes all tombstones with the timestamp less or equal than the specified one.
|
void |
storeAliasTombstone(long applicationId,
String username)
Stores a tombstone for an alias
|
void |
storeEventsTombstone(String reason)
Stores a tombstone denoting any events can't be reconstructed
|
void |
storeEventsTombstoneForApplication(long applicationId)
Stores a tombstone denoting events for the given application can't be reconstructed
|
void |
storeEventsTombstoneForDirectory(String reason,
long directoryId)
Stores a tombstone denoting events for the given directory can't be reconstructed
|
void |
storeGroupMembershipTombstone(long directoryId,
String childGroupName,
String parentGroupName)
Stores a tombstone for group-group memberships
|
void |
storeGroupTombstones(long directoryId,
Collection<String> names)
Stores a tombstone for groups with the given names
|
<T extends AbstractTombstone> |
storeTombstones(Iterable<T> tombstones) |
void |
storeUserMembershipTombstone(long directoryId,
String username,
String parentGroupName)
Stores a tombstone for user-group memberships
|
void |
storeUserTombstones(long directoryId,
Collection<String> names)
Stores a tombstone for users with the given names
|
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, updatesetSessionFactory, withStatelessSessionpublic void storeUserTombstones(long directoryId,
Collection<String> names)
TombstoneDaostoreUserTombstones in interface TombstoneDaodirectoryId - the directory idnames - the names of the users to store the tombstone forpublic void storeGroupTombstones(long directoryId,
Collection<String> names)
TombstoneDaostoreGroupTombstones in interface TombstoneDaodirectoryId - the directory idnames - the names of the groups to store the tombstone forpublic void storeUserMembershipTombstone(long directoryId,
String username,
String parentGroupName)
TombstoneDaostoreUserMembershipTombstone in interface TombstoneDaodirectoryId - the directory idusername - the name of the userparentGroupName - the name of the group the user belonged topublic void storeGroupMembershipTombstone(long directoryId,
String childGroupName,
String parentGroupName)
TombstoneDaostoreGroupMembershipTombstone in interface TombstoneDaodirectoryId - the directory idchildGroupName - the name of the userparentGroupName - the name of the group the user belonged topublic void storeEventsTombstoneForDirectory(String reason, long directoryId)
TombstoneDaostoreEventsTombstoneForDirectory in interface TombstoneDaoreason - describes why this tombstone was writtendirectoryId - the directory id this affectsTimestampBasedEventStorepublic void storeEventsTombstoneForApplication(long applicationId)
TombstoneDaostoreEventsTombstoneForApplication in interface TombstoneDaoapplicationId - the application id this affectsTimestampBasedEventStorepublic void storeEventsTombstone(String reason)
TombstoneDaostoreEventsTombstone in interface TombstoneDaoreason - describes why this tombstone was writtenTimestampBasedEventStorepublic void storeAliasTombstone(long applicationId,
String username)
TombstoneDaostoreAliasTombstone in interface TombstoneDaoapplicationId - the application id this affectsusername - the original user name for the aliaspublic <T extends AbstractTombstone> void storeTombstones(Iterable<T> tombstones)
public <T extends AbstractTombstone> List<T> getTombstonesAfter(long after, Collection<Long> directoryIds, Class<T> type)
TombstoneDaogetTombstonesAfter in interface TombstoneDaoafter - only tombstones persisted after this timestamp will be returneddirectoryIds - if empty all tombstones will be returned, otherwise only tombstones for the specified directories.
Should be when retrieving tombstones that aren't directory specific.type - only retrieve tombstone of the specified type. Use AbstractTombstone to search for all types.public <T extends ApplicationTombstone> List<T> getTombstonesAfter(long after, Long applicationId, Class<T> type)
TombstoneDaogetTombstonesAfter in interface TombstoneDaoafter - only tombstones persisted after this timestamp will be returnedapplicationId - if null all tombstones will be returned, otherwise only tombstones for the specified application.
Should be when retrieving tombstones that aren't directory specific.public int removeAllUpTo(long timestamp)
TombstoneDaoremoveAllUpTo in interface TombstoneDaopublic Class<AbstractTombstone> getPersistentClass()
HibernateDaoHibernateDao.load(Serializable) to work
correctly.getPersistentClass in class HibernateDao<AbstractTombstone>Copyright © 2023 Atlassian. All rights reserved.