/** * Retrieves date/time of the last received email. * * @param username the username * @return the date/time of the last received email * @throws EntityException if an error occurs */ public long getTimeOfLastReceivedEmail(String username) throws EntityException { long lastReceivedEmailTime = 0; try { lastReceivedEmailTime = cdao.getTimeOfLastReceivedEmail(username); } catch (DBAccessException e) { throw new EntityException("Error getting date/time of the last received email.", e); } return lastReceivedEmailTime; }