Class CachingNotificationDao
- java.lang.Object
-
- com.atlassian.confluence.internal.persistence.DelegatingObjectDaoInternal<Notification>
-
- com.atlassian.confluence.internal.notification.persistence.DelegatingNotificationDaoInternal
-
- com.atlassian.confluence.impl.mail.notification.persistence.CachingNotificationDao
-
- All Implemented Interfaces:
ObjectDao,NotificationDaoInternal,ObjectDaoInternal<Notification>,NotificationDao
public class CachingNotificationDao extends DelegatingNotificationDaoInternal
Caching for NotificationDao.Only
isWatchingContent(ConfluenceUser, ContentEntityObject)method is currently cached in a thread local cache.- Since:
- 5.9
-
-
Field Summary
-
Fields inherited from class com.atlassian.confluence.internal.notification.persistence.DelegatingNotificationDaoInternal
delegate
-
-
Constructor Summary
Constructors Constructor Description CachingNotificationDao(NotificationDaoInternal delegate, com.atlassian.cache.CacheFactory cacheFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanisWatchingContent(@NonNull ConfluenceUser user, @NonNull ContentEntityObject content)Returns true if the given user is directly watching the given content.voidremove(com.atlassian.core.bean.EntityObject object)Deprecated.since 6.10.0.voidremoveEntity(Notification objectToRemove)Remove object from persistence.voidsave(com.atlassian.core.bean.EntityObject objectToSave)Deprecated.since 6.10.0.voidsaveEntity(Notification objectToSave)Saves the given object to the database.voidsaveRaw(com.atlassian.core.bean.EntityObject objectToSave)Deprecated.since 6.10.0.voidsaveRawEntity(Notification objectToSave)Saves the object without updating modification daa.-
Methods inherited from class com.atlassian.confluence.internal.notification.persistence.DelegatingNotificationDaoInternal
findAllDailyReportNotifications, findAllNotificationsBySpace, findAllNotificationsByUser, findDailyReportNotification, findGlobalBlogWatchForUser, findNetworkNotificationByUser, findNotificationById, findNotificationByUserAndContent, findNotificationByUserAndLabel, findNotificationByUserAndSpace, findNotificationByUserAndSpace, findNotificationByUserAndSpaceAndType, findNotificationsByContent, findNotificationsByContents, findNotificationsByFollowing, findNotificationsByLabel, findNotificationsBySpaceAndType, findNotificationsBySpacesAndType, findNotificationsByUser, findPageAndSpaceNotificationIdsFromSpace, findSiteBlogNotifications
-
Methods inherited from class com.atlassian.confluence.internal.persistence.DelegatingObjectDaoInternal
findAll, findAllSorted, findAllSorted, findByClassIds, findByClassIdsFiltered, getPersistentClass, refresh, refreshEntity, replicate, replicateEntity
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.atlassian.confluence.internal.persistence.ObjectDaoInternal
findAll, findAllSorted, findAllSorted, findByClassIds, findByClassIdsFiltered, getPersistentClass, refresh, refreshEntity, replicate, replicateEntity
-
-
-
-
Constructor Detail
-
CachingNotificationDao
public CachingNotificationDao(NotificationDaoInternal delegate, com.atlassian.cache.CacheFactory cacheFactory)
- Since:
- 7.6
-
-
Method Detail
-
isWatchingContent
public boolean isWatchingContent(@NonNull ConfluenceUser user, @NonNull ContentEntityObject content)
Description copied from interface:NotificationDaoReturns true if the given user is directly watching the given content.- Specified by:
isWatchingContentin interfaceNotificationDao- Overrides:
isWatchingContentin classDelegatingNotificationDaoInternal- Parameters:
user- user to checkcontent- content to check- Returns:
- true if the given user is directly watching the given content
-
remove
@Deprecated public void remove(com.atlassian.core.bean.EntityObject object)
Deprecated.since 6.10.0. UseremoveEntity(Notification)instead.Description copied from interface:ObjectDaoInternalRemove object from persistence.- Specified by:
removein interfaceObjectDao- Specified by:
removein interfaceObjectDaoInternal<Notification>- Overrides:
removein classDelegatingObjectDaoInternal<Notification>
-
removeEntity
public void removeEntity(Notification objectToRemove)
Description copied from interface:ObjectDaoInternalRemove object from persistence.- Specified by:
removeEntityin interfaceObjectDaoInternal<Notification>- Overrides:
removeEntityin classDelegatingObjectDaoInternal<Notification>
-
save
@Deprecated public void save(com.atlassian.core.bean.EntityObject objectToSave)
Deprecated.since 6.10.0. UsesaveEntity(Notification)instead.- Specified by:
savein interfaceObjectDao- Specified by:
savein interfaceObjectDaoInternal<Notification>- Overrides:
savein classDelegatingObjectDaoInternal<Notification>
-
saveEntity
public void saveEntity(Notification objectToSave)
Description copied from interface:ObjectDaoInternalSaves the given object to the database.- Specified by:
saveEntityin interfaceObjectDaoInternal<Notification>- Overrides:
saveEntityin classDelegatingObjectDaoInternal<Notification>- Parameters:
objectToSave- the object to save.
-
saveRaw
@Deprecated public void saveRaw(com.atlassian.core.bean.EntityObject objectToSave)
Deprecated.since 6.10.0. UsesaveRawEntity(Notification)instead.Description copied from interface:ObjectDaoInternalSaves the object without updating modification data.If the object is new, this won't set the creation date on the object. If it already exists, then it won't set the date that it was updated.
- Specified by:
saveRawin interfaceObjectDao- Specified by:
saveRawin interfaceObjectDaoInternal<Notification>- Overrides:
saveRawin classDelegatingObjectDaoInternal<Notification>- Parameters:
objectToSave- the object to save.
-
saveRawEntity
public void saveRawEntity(Notification objectToSave)
Description copied from interface:ObjectDaoInternalSaves the object without updating modification daa.If the object is new, this won't set the creation date on the object. If it already exists, then it won't set the date that it was updated.
- Specified by:
saveRawEntityin interfaceObjectDaoInternal<Notification>- Overrides:
saveRawEntityin classDelegatingObjectDaoInternal<Notification>- Parameters:
objectToSave- the object to save.
-
-