public class TombstoneDAOHibernate extends HibernateDao<AbstractTombstone> implements TombstoneDao
batchFinder, batchProcessor, logger, statelessSessionBatchProcessor, timeSource
sessionFactory
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, update
setSessionFactory, withStatelessSession
public void storeUserTombstones(long directoryId, Collection<String> names)
TombstoneDao
storeUserTombstones
in interface TombstoneDao
directoryId
- the directory idnames
- the names of the users to store the tombstone forpublic void storeGroupTombstones(long directoryId, Collection<String> names)
TombstoneDao
storeGroupTombstones
in interface TombstoneDao
directoryId
- the directory idnames
- the names of the groups to store the tombstone forpublic void storeUserMembershipTombstone(long directoryId, String username, String parentGroupName)
TombstoneDao
storeUserMembershipTombstone
in interface TombstoneDao
directoryId
- 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)
TombstoneDao
storeGroupMembershipTombstone
in interface TombstoneDao
directoryId
- the directory idchildGroupName
- the name of the userparentGroupName
- the name of the group the user belonged topublic void storeEventsTombstoneForDirectory(String reason, long directoryId)
TombstoneDao
storeEventsTombstoneForDirectory
in interface TombstoneDao
reason
- describes why this tombstone was writtendirectoryId
- the directory id this affectsTimestampBasedEventStore
public void storeEventsTombstoneForApplication(long applicationId)
TombstoneDao
storeEventsTombstoneForApplication
in interface TombstoneDao
applicationId
- the application id this affectsTimestampBasedEventStore
public void storeEventsTombstone(String reason)
TombstoneDao
storeEventsTombstone
in interface TombstoneDao
reason
- describes why this tombstone was writtenTimestampBasedEventStore
public void storeAliasTombstone(long applicationId, String username)
TombstoneDao
storeAliasTombstone
in interface TombstoneDao
applicationId
- 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)
TombstoneDao
getTombstonesAfter
in interface TombstoneDao
after
- 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)
TombstoneDao
getTombstonesAfter
in interface TombstoneDao
after
- 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)
TombstoneDao
removeAllUpTo
in interface TombstoneDao
public Class<AbstractTombstone> getPersistentClass()
HibernateDao
HibernateDao.load(Serializable)
to work
correctly.getPersistentClass
in class HibernateDao<AbstractTombstone>
Copyright © 2021 Atlassian. All rights reserved.