Beispiel #1
0
  /**
   * <br>
   * [機 能] 表示するグループ一覧を設定する。 <br>
   * [解 説] <br>
   * [備 考]
   *
   * @param paramMdl BmkPtl020ParamModel
   * @param con コネクション
   * @throws SQLException SQL実行例外
   */
  private void __setGroupList(BmkPtl020ParamModel paramMdl, Connection con) throws SQLException {

    PtlPortalPositionParamDao paramDao = new PtlPortalPositionParamDao(con);
    int ptlSid = paramMdl.getPtlPortalSid();
    GroupBiz grpBiz = new GroupBiz();
    // 全グループのリスト
    ArrayList<GroupModel> tree = grpBiz.getGroupCombList(con);
    if (tree == null) {
      tree = new ArrayList<GroupModel>();
    }

    // すでに設定されているグループのリスト
    List<PtlPortalPositionParamModel> list = paramDao.getParamList(ptlSid, BMK_PORTLET_PARAM1);
    if (list == null) {
      list = new ArrayList<PtlPortalPositionParamModel>();
    }

    // グループSIDのリストを作成
    List<Integer> grepSidList = new ArrayList<Integer>();
    for (PtlPortalPositionParamModel model : list) {
      int sid = NullDefault.getInt(model.getPpmParamValue(), 0);
      grepSidList.add(sid);
    }

    ArrayList<GroupModel> dspList = new ArrayList<GroupModel>();
    for (GroupModel grepModel : tree) {
      if (!grepSidList.contains(grepModel.getGroupSid())) {
        dspList.add(grepModel);
      }
    }
    paramMdl.setTree(dspList);
  }