Exemplo n.º 1
0
 @Verifier
 public Messages verifyUnit(Unit unit, WhenVerifier when) {
   Messages ret = new Messages();
   if (unit.getName().equals("verify3")) {
     ret.add("unit.name", new Message("errors.duplicate", "3"));
   }
   return ret;
 }
Exemplo n.º 2
0
 @Verifier(when = {WhenVerifier.INSERT})
 public Messages verifyUnit(Unit unit, CallbackEventType eventType, WhenVerifier when) {
   Messages ret = new Messages();
   if (unit.getName().equals("verify4")) {
     ret.add("unit.name", new Message("errors.duplicate", "4"));
   }
   return ret;
 }
Exemplo n.º 3
0
 @Verifier
 public Messages verifyUnit(Unit unit, CallbackEventType eventType) {
   Messages ret = new Messages();
   if (unit.getName().equals("verify2")) {
     ret.add("unit.name", new Message("errors.duplicate", "2"));
   }
   return ret;
 }