|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.mywork.host.dao.ao.AbstractAODao<AONotification,java.lang.Long>
com.atlassian.mywork.host.dao.ao.AONotificationDao
public class AONotificationDao
| Field Summary |
|---|
| Fields inherited from class com.atlassian.mywork.host.dao.ao.AbstractAODao |
|---|
ao |
| Constructor Summary | |
|---|---|
AONotificationDao(com.atlassian.activeobjects.external.ActiveObjects ao)
|
|
| 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)
|
protected Notification |
create(Notification notification,
java.util.Date date)
|
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 lastReadNotificationId,
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)
|
protected static boolean |
isMetadataMatch(org.codehaus.jackson.node.ObjectNode metadata,
org.codehaus.jackson.node.ObjectNode condition)
|
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)
|
protected Notification |
update(Notification notification,
java.util.Date date)
|
void |
updateMetadata(java.lang.String username,
java.lang.String globalId,
org.codehaus.jackson.node.ObjectNode condition,
org.codehaus.jackson.node.ObjectNode newMetadata)
|
| Methods inherited from class com.atlassian.mywork.host.dao.ao.AbstractAODao |
|---|
findOnly, findOnly, getAO, streamOnly, toObjectNode |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AONotificationDao(com.atlassian.activeobjects.external.ActiveObjects ao)
| Method Detail |
|---|
public Notification get(long id)
get in interface NotificationDaopublic Notification create(Notification notification)
create in interface NotificationDao
protected Notification create(Notification notification,
java.util.Date date)
public Notification update(Notification notification)
update in interface NotificationDao
protected Notification update(Notification notification,
java.util.Date date)
public void updateMetadata(java.lang.String username,
java.lang.String globalId,
org.codehaus.jackson.node.ObjectNode condition,
org.codehaus.jackson.node.ObjectNode newMetadata)
updateMetadata in interface NotificationDao
protected static boolean isMetadataMatch(org.codehaus.jackson.node.ObjectNode metadata,
org.codehaus.jackson.node.ObjectNode condition)
public Notification delete(long id)
delete in interface NotificationDaopublic java.lang.Iterable<Notification> deleteByGlobalId(java.lang.String globalId)
deleteByGlobalId in interface NotificationDaopublic int deleteAll(java.lang.String username)
deleteAll in interface NotificationDao
public void setStatusByGlobalId(java.lang.String username,
java.lang.String globalId,
Status status)
setStatusByGlobalId in interface NotificationDaopublic java.lang.Iterable<Notification> findAll(java.lang.String username)
NotificationDao
findAll in interface NotificationDaousername - username of the user to retrieve notifications for
public java.lang.Iterable<Notification> findAllUnread(java.lang.String username)
NotificationDao
findAllUnread in interface NotificationDaousername - username of the user to retrieve notifications for
public java.lang.Iterable<Notification> findAllUnreadAfter(java.lang.String username,
long notificationId)
findAllUnreadAfter in interface NotificationDao
public java.lang.Iterable<Notification> findAllAfter(java.lang.String username,
long lastReadNotificationId,
long before,
int limit)
NotificationDao
findAllAfter in interface NotificationDaousername - username of the user to retrieve notifications forlastReadNotificationId - notification id to search frombefore - notification id to search tolimit - maximum number of results to return
public java.lang.Iterable<Notification> findByGlobalId(java.lang.String username,
java.lang.String globalId)
NotificationDao
findByGlobalId in interface NotificationDaousername - username of the user to retrieve notifications for
public int countByGlobalId(java.lang.String username,
java.lang.String globalId)
NotificationDao
countByGlobalId in interface NotificationDaousername - username of the user to retrieve number of notifications for
public int deleteOldNotifications(int days,
boolean read)
NotificationDao
deleteOldNotifications in interface NotificationDaodays - number of days that notifications should be kept forread - where to delete read or unread
public void markAllRead(java.lang.String username,
long before)
markAllRead in interface NotificationDao
public void setRead(java.lang.String username,
java.util.List<java.lang.Long> notificationIds)
setRead in interface NotificationDao
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||