Package esmska.data

Class History


  • public class History
    extends java.lang.Object
    SMS history entity
    • Field Detail

      • ACTION_ADD_RECORD

        public static final int ACTION_ADD_RECORD
        new record added
        See Also:
        Constant Field Values
      • ACTION_REMOVE_RECORD

        public static final int ACTION_REMOVE_RECORD
        existing record removed
        See Also:
        Constant Field Values
      • ACTION_CLEAR_RECORDS

        public static final int ACTION_CLEAR_RECORDS
        all records removed
        See Also:
        Constant Field Values
    • Method Detail

      • addActionListener

        public void addActionListener​(java.awt.event.ActionListener actionListener)
      • removeActionListener

        public void removeActionListener​(java.awt.event.ActionListener actionListener)
      • getInstance

        public static History getInstance()
        Get shared instance
      • getRecords

        public java.util.List<History.Record> getRecords()
        get all records in unmodifiable list
      • getRecord

        public History.Record getRecord​(int index)
        get record at index
      • addRecord

        public void addRecord​(History.Record record)
        add new record
      • addRecords

        public void addRecords​(java.util.Collection<History.Record> records)
        add new records
      • removeRecord

        public void removeRecord​(History.Record record)
        remove existing record
      • removeRecords

        public void removeRecords​(java.util.Collection<History.Record> records)
        remove existing records
      • removeRecordsOlderThan

        public void removeRecordsOlderThan​(java.util.Date date)
        Remove all records older than limit time
        Parameters:
        date - limit time which records to keep, older are removed; not null
      • clearRecords

        public void clearRecords()
        delete all records
      • findLastRecord

        public History.Record findLastRecord​(java.lang.String gatewayName)
        Find last (as in time) record sent to specified gateway.
        Parameters:
        gatewayName - name of the gateway
        Returns:
        the last (the most recent) record sent to specified gateway. Null when none found.