Class NotificationManagerDB
- java.lang.Object
-
- es.bsc.dataclay.logic.notificationmgr.NotificationManagerDB
-
public final class NotificationManagerDB extends Object
LogicModule data base.
-
-
Constructor Summary
Constructors Constructor Description NotificationManagerDB(SQLiteDataSource dataSource)
NotificationManagerDB constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Close DB.void
createTables()
Create tables of MDS.void
deleteByID(EventMessageID eventMessageID)
Delete event message identified by ID providedvoid
dropTables()
Delete the tables of MDS.List<ECA>
getAllEventListeners()
Get all Event listenersList<EventMessage>
getAllEventMessages()
Get all Event MessagesList<ECA>
getSomeEventListeners(int limit)
Get some Event listenersList<EventMessage>
getSomeEventMessages(int limit)
Get some Event Messagesvoid
store(ECA eventListenerImpl)
Store a EventListenerImpl into databasevoid
store(EventMessage eventMessage)
Store a EventMessage into databasevoid
updateByIDEventListener(ECA newEventListener)
Update eventListenervoid
updateByIDEventMessage(EventMessage newEventMessage)
Update event message
-
-
-
Constructor Detail
-
NotificationManagerDB
public NotificationManagerDB(SQLiteDataSource dataSource)
NotificationManagerDB constructor.
-
-
Method Detail
-
createTables
public void createTables()
Create tables of MDS.
-
dropTables
public void dropTables()
Delete the tables of MDS. Just the other way around of createTables --much simpler.
-
store
public void store(ECA eventListenerImpl)
Store a EventListenerImpl into database- Parameters:
eventListenerImpl
- EventListenerImpl
-
store
public void store(EventMessage eventMessage)
Store a EventMessage into database- Parameters:
eventMessage
- EventMessage
-
deleteByID
public void deleteByID(EventMessageID eventMessageID)
Delete event message identified by ID provided- Parameters:
eventMessageID
- ID of the event message
-
updateByIDEventListener
public void updateByIDEventListener(ECA newEventListener)
Update eventListener- Parameters:
newEventListener
- Event Listener with new values.
-
updateByIDEventMessage
public void updateByIDEventMessage(EventMessage newEventMessage)
Update event message- Parameters:
newEventMessage
- event message with new values.
-
getAllEventListeners
public List<ECA> getAllEventListeners()
Get all Event listeners- Returns:
- The Event listeners
-
getAllEventMessages
public List<EventMessage> getAllEventMessages()
Get all Event Messages- Returns:
- The Event Messages
-
getSomeEventMessages
public List<EventMessage> getSomeEventMessages(int limit)
Get some Event Messages- Parameters:
limit
- Maximum events to get- Returns:
- The Event Message
-
getSomeEventListeners
public List<ECA> getSomeEventListeners(int limit)
Get some Event listeners- Parameters:
limit
- Maximum events to get- Returns:
- The Event listeners
-
close
public void close()
Close DB.
-
-