01: /*
02: * Copyright 2007 The Kuali Foundation.
03: *
04: * Licensed under the Educational Community License, Version 1.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.opensource.org/licenses/ecl1.php
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16: /*
17: * Created on Aug 2, 2004
18: *
19: */
20: package org.kuali.module.pdp.service.impl;
21:
22: import java.util.List;
23:
24: import org.kuali.kfs.service.ParameterService;
25: import org.kuali.kfs.service.impl.ParameterConstants;
26: import org.kuali.module.pdp.PdpConstants;
27: import org.kuali.module.pdp.bo.BatchSearch;
28: import org.kuali.module.pdp.dao.BatchSearchDao;
29: import org.kuali.module.pdp.service.BatchSearchService;
30: import org.kuali.module.pdp.utilities.GeneralUtilities;
31: import org.springframework.transaction.annotation.Transactional;
32:
33: /**
34: * @author delyea
35: */
36: @Transactional
37: public class BatchSearchServiceImpl implements BatchSearchService {
38: private static org.apache.log4j.Logger LOG = org.apache.log4j.Logger
39: .getLogger(BatchSearchServiceImpl.class);
40:
41: private ParameterService parameterService;
42: private BatchSearchDao batchSearchDao;
43:
44: public void setBatchSearchDao(BatchSearchDao b) {
45: batchSearchDao = b;
46: }
47:
48: public List getAllBatchesForSearchCriteria(BatchSearch bs) {
49: return batchSearchDao.getAllBatchesForSearchCriteria(bs,
50: getMaxSearchTotal());
51: }
52:
53: public List getAllSingleBatchPayments(Integer id) {
54: return batchSearchDao.getAllSingleBatchPayments(id);
55: }
56:
57: private int getMaxSearchTotal() {
58: return GeneralUtilities
59: .getParameterInteger(
60: parameterService,
61: ParameterConstants.PRE_DISBURSEMENT_LOOKUP.class,
62: PdpConstants.ApplicationParameterKeys.SEARCH_RESULTS_TOTAL);
63: }
64:
65: public void setParameterService(ParameterService parameterService) {
66: this.parameterService = parameterService;
67: }
68: }
|