Date lastCompleted = toDate(m.get(LAST_COMPLETED_TIMESTAMP)); Date lastFailed = toDate(m.get(LAST_FAILED_TIMESTAMP)); Date lastMessage = (lastCompleted == null && lastFailed != null) || : lastCompleted; Date resetDate = toDate(m.get(RESET_TIMESTAMP)); Date startDate = toDate(m.get(START_TIMESTAMP));