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 boolean
isWatchingContent(@NonNull ConfluenceUser user, @NonNull ContentEntityObject content)
Returns true if the given user is directly watching the given content.void
remove(com.atlassian.core.bean.EntityObject object)
Deprecated.since 6.10.0.void
removeEntity(Notification objectToRemove)
Remove object from persistence.void
save(com.atlassian.core.bean.EntityObject objectToSave)
Deprecated.since 6.10.0.void
saveEntity(Notification objectToSave)
Saves the given object to the database.void
saveRaw(com.atlassian.core.bean.EntityObject objectToSave)
Deprecated.since 6.10.0.void
saveRawEntity(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:NotificationDao
Returns true if the given user is directly watching the given content.- Specified by:
isWatchingContent
in interfaceNotificationDao
- Overrides:
isWatchingContent
in 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:ObjectDaoInternal
Remove object from persistence.- Specified by:
remove
in interfaceObjectDao
- Specified by:
remove
in interfaceObjectDaoInternal<Notification>
- Overrides:
remove
in classDelegatingObjectDaoInternal<Notification>
-
removeEntity
public void removeEntity(Notification objectToRemove)
Description copied from interface:ObjectDaoInternal
Remove object from persistence.- Specified by:
removeEntity
in interfaceObjectDaoInternal<Notification>
- Overrides:
removeEntity
in classDelegatingObjectDaoInternal<Notification>
-
save
@Deprecated public void save(com.atlassian.core.bean.EntityObject objectToSave)
Deprecated.since 6.10.0. UsesaveEntity(Notification)
instead.- Specified by:
save
in interfaceObjectDao
- Specified by:
save
in interfaceObjectDaoInternal<Notification>
- Overrides:
save
in classDelegatingObjectDaoInternal<Notification>
-
saveEntity
public void saveEntity(Notification objectToSave)
Description copied from interface:ObjectDaoInternal
Saves the given object to the database.- Specified by:
saveEntity
in interfaceObjectDaoInternal<Notification>
- Overrides:
saveEntity
in 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:ObjectDaoInternal
Saves 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:
saveRaw
in interfaceObjectDao
- Specified by:
saveRaw
in interfaceObjectDaoInternal<Notification>
- Overrides:
saveRaw
in classDelegatingObjectDaoInternal<Notification>
- Parameters:
objectToSave
- the object to save.
-
saveRawEntity
public void saveRawEntity(Notification objectToSave)
Description copied from interface:ObjectDaoInternal
Saves 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:
saveRawEntity
in interfaceObjectDaoInternal<Notification>
- Overrides:
saveRawEntity
in classDelegatingObjectDaoInternal<Notification>
- Parameters:
objectToSave
- the object to save.
-
-