/** * validate before remove. * * @param id */ public static boolean rm(Long id) { return BaseValidator.gtZero(id); }
/** * 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())); }