@Override public int getNumberLastMessage() { int numberLastMessage = CHAT_DAO.getLastNumberMessage(); if (LOG.isInfoEnabled()) { LOG.info("get number last message. Number last message : " + numberLastMessage); } return numberLastMessage; }
@Override public List<Message> getMessageMiss(int number) { List<Message> resultMessages = CHAT_DAO.getMessageMiss(number); if (LOG.isInfoEnabled()) { LOG.info("get miss messages. Messages : " + resultMessages); } return resultMessages; };
@Override public void addMessage(User user, String text) { if (text == null || text.isEmpty()) { return; } serviceStatistics.incAmountSendMessage(user); CHAT_DAO.addMessage(user, text, new Timestamp(new Date().getTime())); if (LOG.isInfoEnabled()) { LOG.info("add message"); } }