Пример #1
0
 @Override
 protected final boolean entityValues(EntityFields data) {
   data.put("username", username);
   data.put("encodedpassword", encodedpassword);
   data.put("usercode", usercode);
   data.put("enabled", enabled);
   return true;
 }
Пример #2
0
 @Override
 protected final boolean entityDiffs(EntityFields data) {
   if (!username.equals(usernameOriginal)) {
     data.put("username", username);
   }
   if (!encodedpassword.equals(encodedpasswordOriginal)) {
     data.put("encodedpassword", encodedpassword);
   }
   if (!usercode.equals(usercodeOriginal)) {
     data.put("usercode", usercode);
   }
   if (enabled != enabledOriginal) {
     data.put("enabled", enabled);
   }
   return true;
 }
Пример #3
0
 @Override
 protected final void entityLoad(EntityFields data) {
   username = (String) data.get("username");
   encodedpassword = (String) data.get("encodedpassword");
   usercode = (String) data.get("usercode");
   enabled = (Boolean) data.get("enabled");
   id = (Integer) data.get("id");
   createdby = (String) data.get("createdby");
   try {
     createdon.setDateUsingSQLString((String) data.get("createdon"));
   } catch (BadFormatException ex) {
     throw new LogicException("Load reported bad Timestamp format - should never happen!!");
   }
   updatedby = (String) data.get("updatedby");
   try {
     updatedon.setDateUsingSQLString((String) data.get("updatedon"));
   } catch (BadFormatException ex) {
     throw new LogicException("Load reported bad Timestamp format - should never happen!!");
   }
 }