public static boolean validate(Event event) { if (event == null) return false; Validator validator = Validator.getValidator(); validator.notNull(event.getDate(), "\"Date\" must be specified"); validator.notEmpty(event.getMessage(), "\"Message\" must be specified"); boolean isValid = validator.isValid(); return isValid; }
public static Event clone(Event event) { if (event == null) return null; Event clone = create(); clone.setId(ObjectUtil.clone(event.getId())); clone.setDate(ObjectUtil.clone(event.getDate())); clone.setMessage(ObjectUtil.clone(event.getMessage())); return clone; }
public static boolean isEmpty(Event event) { if (event == null) return true; boolean status = false; status |= StringUtils.isEmpty(event.getMessage()); return status; }