示例#1
0
 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;
 }
示例#2
0
 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;
 }
示例#3
0
 public static boolean isEmpty(Event event) {
   if (event == null) return true;
   boolean status = false;
   status |= StringUtils.isEmpty(event.getMessage());
   return status;
 }