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: package org.kuali.module.financial.service.impl;
17:
18: import java.util.HashMap;
19: import java.util.Map;
20:
21: import org.kuali.core.service.BusinessObjectService;
22: import org.kuali.module.financial.bo.Bank;
23: import org.kuali.module.financial.service.BankService;
24:
25: /**
26: *
27: * This is the default implementation of the BankService interface.
28: *
29: */
30: public class BankServiceImpl implements BankService {
31:
32: BusinessObjectService businessObjectService;
33:
34: /**
35: * This method retrieves an instance of a Bank object by using the attributes given as the primary keys to perform the database query.
36: *
37: * @param financialDocumentBankCode The bank code to be used to perform the database lookup.
38: * @return The bank object which has a matching primary key to the values provided.
39: *
40: * @see org.kuali.module.financial.service.BankService#getByPrimaryId(java.lang.String)
41: */
42: public Bank getByPrimaryId(String financialDocumentBankCode) {
43: Map primaryKeys = new HashMap();
44: primaryKeys.put("financialDocumentBankCode",
45: financialDocumentBankCode);
46: return (Bank) businessObjectService.findByPrimaryKey(
47: Bank.class, primaryKeys);
48: }
49:
50: /**
51: *
52: * This method is a simple getter for retrieving an instance of a BusinessObjectService.
53: * @return A BusinessObjectService instance.
54: */
55: public BusinessObjectService getBusinessObjectService() {
56: return businessObjectService;
57: }
58:
59: /**
60: *
61: * This method is a simple setter for setting the local BusinessObjectService attribute.
62: * @param businessObjectService The BusinessObjectService to be set.
63: */
64: public void setBusinessObjectService(
65: BusinessObjectService businessObjectService) {
66: this.businessObjectService = businessObjectService;
67: }
68:
69: }
|