Class GetCoolerLastRead

java.lang.Object
org.deltava.dao.DAO
org.deltava.dao.GetCoolerLastRead

public class GetCoolerLastRead extends DAO
A Data Access Object to read Water Cooler last read marks.
Since:
5.4
Version:
11.3
Author:
Luke
  • Constructor Details

    • GetCoolerLastRead

      public GetCoolerLastRead(Connection c)
      Initializes the Data Access Object.
      Parameters:
      c - the JDBC Connection to use
  • Method Details

    • getLastRead

      public Instant getLastRead(int threadID, int userID) throws DAOException
      Returns the last date/time a user read a particular Cooler message thread.
      Parameters:
      threadID - the Message Thread ID
      userID - the user ID
      Returns:
      the last read date/time or null if never
      Throws:
      DAOException - if a JDBC error occurs
    • getLastRead

      public Map<Integer,Instant> getLastRead(int threadID) throws DAOException
      Returns the date/time all users last read a particular Cooler message thread.
      Parameters:
      threadID - the Message Thread ID
      Returns:
      a Map of last read date/times, keyed by user ID
      Throws:
      DAOException - if a JDBC error occurs
    • getLastRead

      public Map<Integer,Instant> getLastRead(Collection<?> ids, int userID) throws DAOException
      Returns the last date/time a user read several Cooler message threads.
      Parameters:
      ids - the thread IDs or Message Threads
      userID - the user ID
      Returns:
      a Map of last read date/times, keyed by message thread ID
      Throws:
      DAOException - if a JDBC error occurs