org.opennms.web.notification
Class NotificationModel

java.lang.Object
  extended by org.opennms.web.notification.NotificationModel

public class NotificationModel
extends Object


Constructor Summary
NotificationModel()
           
 
Method Summary
 void acknowledged(String name, int noticeId)
          This method updates the table when the user acknowledges the pager information.
 Notification[] allNotifications()
           
 Notification[] allNotifications(String order)
          Return all notifications, both outstanding and acknowledged.
 Notification getNoticeInfo(int id)
           
 int getOutstandingNoticeCount()
          This method returns notices not yet acknowledged.
 int getOutstandingNoticeCount(String username)
          This method returns notices not yet acknowledged.
 Notification[] getOutstandingNotices()
          This method returns the count of all outstanding notices.
 Notification[] getOutstandingNotices(String name)
          This method returns notices not yet acknowledged.
 void insert(Notification nbean)
          This method helps insert into the database.
protected  Notification[] rs2NotifyBean(Connection conn, ResultSet rs)
          Returns the data from the result set as an array of Notification objects.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NotificationModel

public NotificationModel()
Method Detail

getNoticeInfo

public Notification getNoticeInfo(int id)
                           throws SQLException
Throws:
SQLException

allNotifications

public Notification[] allNotifications()
                                throws SQLException
Throws:
SQLException

allNotifications

public Notification[] allNotifications(String order)
                                throws SQLException
Return all notifications, both outstanding and acknowledged.

Throws:
SQLException

rs2NotifyBean

protected Notification[] rs2NotifyBean(Connection conn,
                                       ResultSet rs)
                                throws SQLException
Returns the data from the result set as an array of Notification objects. The ResultSet must be positioned before the first result before calling this method (this is the case right after calling java.sql.Connection#createStatement and friends or after calling java.sql.ResultSet#beforeFirst).

Throws:
SQLException

getOutstandingNotices

public Notification[] getOutstandingNotices()
                                     throws SQLException
This method returns the count of all outstanding notices.

Throws:
SQLException

getOutstandingNoticeCount

public int getOutstandingNoticeCount()
                              throws SQLException
This method returns notices not yet acknowledged.

Throws:
SQLException

getOutstandingNoticeCount

public int getOutstandingNoticeCount(String username)
                              throws SQLException
This method returns notices not yet acknowledged.

Throws:
SQLException

getOutstandingNotices

public Notification[] getOutstandingNotices(String name)
                                     throws SQLException
This method returns notices not yet acknowledged.

Throws:
SQLException

acknowledged

public void acknowledged(String name,
                         int noticeId)
                  throws SQLException
This method updates the table when the user acknowledges the pager information.

Throws:
SQLException

insert

public void insert(Notification nbean)
            throws SQLException
This method helps insert into the database.

Throws:
SQLException


Copyright © 2009. All Rights Reserved.