示例#1
0
 /**
  * validate before remove.
  *
  * @param id
  */
 public static boolean rm(Long id) {
   return BaseValidator.gtZero(id);
 }
示例#2
0
 /**
  * validate before update.
  *
  * @param g
  */
 public static boolean update(Goods g) {
   return BaseValidator.gtZero(g.getId())
       && Strings.isNotBlank(g.getCateCode())
       && Strings.isNotBlank(g.getGname())
       && (Goods.STATE_OK.equals(g.getState()) || Goods.STATE_RM.equals(g.getState()));
 }