コード例 #1
0
  public void save(Privilege privilege) {
    // 唯一性判断
    List uniquePropertyNames = new LinkedList();
    uniquePropertyNames.add("privilName");
    super.isUnique(true, privilege, uniquePropertyNames, X27Exception.privil_name_has_exist());

    super.save(privilege);
  }
コード例 #2
0
  public void updatePrivilege(Privilege param) {
    /*
     * Privilege entity = findById(param.getIdStr()); Privilege example = new Privilege();
     * example.setPrivilName(param.getPrivilName()); if ((!entity.getPrivilName().equals(param.getPrivilName())) &&
     * (super.findListByExample(example).size() != 0)) { throw new X27Exception(X27Exception.PRIVILNAME_HAS_EXIST); }
     */
    // 唯一性判断
    List uniquePropertyNames = new LinkedList();
    uniquePropertyNames.add("privilName");
    super.isUnique(true, param, uniquePropertyNames, X27Exception.privil_name_has_exist());

    super.updateByParam(param);
  }