Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- JexPTCommonUtil util = JexPTCommonUtil.getInstace(request, response);
- Dvut_homeIn input = (Dvut_homeIn)util.getInputDomain();
- Dvut_homeOut result = (Dvut_homeOut)util.createResultDomain();
- // STDY IDO Connection
- JexConnection idoCon = JexIDOManager.createIDOConnection();
- DVUT_LISTUSERIn idoIn1 = (DVUT_LISTUSERIn) util.createIDOData(DVUT_LISTUSERIn.class);
- JexDomainUtil.copyDomain(input, idoIn1);
- /* Pagination Scope */
- JexDataList idoOut1 = null;
- PAGINATIONS pagination = input.getPaginations();
- if(pagination != null) {
- // JexDomainUtil.setIDOPageInfo(idoIn1, NumberUtils.toInt(pagination.getPageNo()), NumberUtils.toInt(pagination.getPageSze()));
- JexDomainUtil.setIDOPageInfo(idoIn1, Integer.parseInt(pagination.getPageNo()), Integer.parseInt(pagination.getPageSze()));
- }
- int totalRows = JexDomainUtil.getResultCount(idoCon.executeList(idoIn1));
- // int totalPages = (int)Math.ceil(totalRows / NumberUtils.toDouble(pagination.getPageSze()));
- int totalPages = (int)Math.ceil(totalRows / Double.parseDouble(pagination.getPageSze()));
- pagination.setTotalRows(totalRows+"");
- pagination.setTotalPages(totalPages+"");
- /* End Pagination Scope */
- idoOut1 = idoCon.executeList(idoIn1);
- // 도메인 에러 검증
- if (JexDomainUtil.isError(idoOut1)) {
- if (util.getLogger().isDebug()) util.getLogger().debug("Error Code ::"+JexDomainUtil.getErrorCode (idoOut1));
- if (util.getLogger().isDebug()) util.getLogger().debug("Error Message::"+JexDomainUtil.getErrorMessage (idoOut1));
- // 아래는 에러 처리 로직. 업무에 맞게 아래의 방법 등을 활용하여 에러처리가 가능하다.
- // 01. Throws 방식 : JCT호출에서 사용하기 편리한 방식.
- // throw new JexBIZException(idoOut1);
- // 02. Result Type 선택 방식 : STRUTS의 형태와 같이 Result Type에 따라 분기할 페이지 선택
- // util.setResult(result,"E");
- }
- JexRecordDataList<Dvut_home_ALL_USERS> recList1 = new JexRecordDataList<Dvut_home_ALL_USERS>();
- JexDomainUtil.changeList(idoOut1, recList1, Dvut_home_ALL_USERS.class);
- result.setAllUsers(recList1);
- result.setPaginations(pagination);
- util.setResult(result, "default");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement