/** * 検索条件を指定して結果リストを返します. * * @param params 検索条件 * @return 結果リスト * @throws ServiceException */ public List<BeanMap> getSearchResult(BeanMap params) throws ServiceException { try { String searchTarget = (String) params.get(Param.SEARCH_TARGET); if (Constants.SEARCH_TARGET.VALUE_SLIP.equals(searchTarget)) { return findSlipByCondition(params); } else if (Constants.SEARCH_TARGET.VALUE_LINE.equals(searchTarget)) { return findSlipLineByCondition(params); } return null; } catch (ServiceException e) { throw e; } catch (Exception e) { throw new ServiceException(e); } }
/** * 検索条件を指定して結果件数を返します. * * @param params 検索条件 * @return 結果件数 * @throws ServiceException */ public Integer getSearchResultCount(BeanMap params) throws ServiceException { try { Integer count = Integer.valueOf(0); String searchTarget = (String) params.get(Param.SEARCH_TARGET); if (Constants.SEARCH_TARGET.VALUE_SLIP.equals(searchTarget)) { count = findSlipCntByCondition(params); } else if (Constants.SEARCH_TARGET.VALUE_LINE.equals(searchTarget)) { count = findSlipLineCntByCondition(params); } return count; } catch (ServiceException e) { throw e; } catch (Exception e) { throw new ServiceException(e); } }