|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
@Transactional public interface NotificationDao
| Method Summary | |
|---|---|
int |
countByGlobalId(java.lang.String username,
java.lang.String globalId)
Returns number of notifications for the given user with a given globalId. |
Notification |
create(Notification notification)
|
Notification |
delete(long id)
|
int |
deleteAll(java.lang.String username)
|
java.lang.Iterable<Notification> |
deleteByGlobalId(java.lang.String globalId)
|
int |
deleteOldNotifications(int days,
boolean read)
Deletes notifications that are older than the given number of days. |
java.lang.Iterable<Notification> |
findAll(java.lang.String username)
Returns all notifications for the given user. |
java.lang.Iterable<Notification> |
findAllAfter(java.lang.String username,
long after,
long before,
int limit)
Returns all notifications for the given user after a given notification. |
java.lang.Iterable<Notification> |
findAllUnread(java.lang.String username)
Returns all unread notifications for the given user. |
java.lang.Iterable<Notification> |
findAllUnreadAfter(java.lang.String username,
long notificationId)
|
java.lang.Iterable<Notification> |
findByGlobalId(java.lang.String username,
java.lang.String globalId)
Returns all notifications for the given user with a given globalId. |
Notification |
get(long id)
|
void |
markAllRead(java.lang.String username,
long before)
|
void |
setRead(java.lang.String username,
java.util.List<java.lang.Long> notificationIds)
|
void |
setStatusByGlobalId(java.lang.String username,
java.lang.String globalId,
Status status)
|
Notification |
update(Notification notification)
|
void |
updateMetadata(java.lang.String username,
java.lang.String globalId,
org.codehaus.jackson.node.ObjectNode condition,
org.codehaus.jackson.node.ObjectNode metadata)
|
| Method Detail |
|---|
Notification get(long id)
Notification create(Notification notification)
Notification update(Notification notification)
void updateMetadata(java.lang.String username,
java.lang.String globalId,
org.codehaus.jackson.node.ObjectNode condition,
org.codehaus.jackson.node.ObjectNode metadata)
Notification delete(long id)
java.lang.Iterable<Notification> deleteByGlobalId(java.lang.String globalId)
java.lang.Iterable<Notification> findAll(java.lang.String username)
username - username of the user to retrieve notifications for
java.lang.Iterable<Notification> findAllUnread(java.lang.String username)
username - username of the user to retrieve notifications for
java.lang.Iterable<Notification> findAllAfter(java.lang.String username,
long after,
long before,
int limit)
username - username of the user to retrieve notifications forafter - notification id to search frombefore - notification id to search tolimit - maximum number of results to return
java.lang.Iterable<Notification> findAllUnreadAfter(java.lang.String username,
long notificationId)
java.lang.Iterable<Notification> findByGlobalId(java.lang.String username,
java.lang.String globalId)
username - username of the user to retrieve notifications for
int countByGlobalId(java.lang.String username,
java.lang.String globalId)
username - username of the user to retrieve number of notifications for
void markAllRead(java.lang.String username,
long before)
void setRead(java.lang.String username,
java.util.List<java.lang.Long> notificationIds)
void setStatusByGlobalId(java.lang.String username,
java.lang.String globalId,
Status status)
int deleteOldNotifications(int days,
boolean read)
days - number of days that notifications should be kept forread - where to delete read or unread
int deleteAll(java.lang.String username)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||