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.BankAccount;
23: import org.kuali.module.financial.service.BankAccountService;
24:
25: /**
26: *
27: * This is the default implementation of the BankAccountService interface.
28: *
29: */
30: public class BankAccountServiceImpl implements BankAccountService {
31:
32: BusinessObjectService businessObjectService;
33:
34: /**
35: * Retrieves the BankAccount instance from the database using the provided values as the primary keys to perform the lookup.
36: *
37: * @param financialDocumentBankCode Bank code to use for retrieving the associated bank acocunt object.
38: * @param finDocumentBankAccountNumber Bank account number to use for retrieving the associated bank account object.
39: * @return A BankAccount object which matches the criteria provided.
40: *
41: * @see org.kuali.module.financial.service.BankAccountService#getByPrimaryId(java.lang.String, java.lang.String)
42: */
43: public BankAccount getByPrimaryId(String financialDocumentBankCode,
44: String finDocumentBankAccountNumber) {
45: Map primaryKeys = new HashMap();
46: primaryKeys.put("financialDocumentBankCode",
47: financialDocumentBankCode);
48: primaryKeys.put("finDocumentBankAccountNumber",
49: finDocumentBankAccountNumber);
50: return (BankAccount) businessObjectService.findByPrimaryKey(
51: BankAccount.class, primaryKeys);
52: }
53:
54: /**
55: *
56: * This method is a simple getter for retrieving an instance of a BusinessObjectService.
57: * @return An instance of a BusinessObjectService.
58: */
59: public BusinessObjectService getBusinessObjectService() {
60: return businessObjectService;
61: }
62:
63: /**
64: *
65: * This method is a simple setter for setting the local BusinessObjectService attribute.
66: * @param businessObjectService The BusinessObjectService to be set.
67: */
68: public void setBusinessObjectService(
69: BusinessObjectService businessObjectService) {
70: this.businessObjectService = businessObjectService;
71: }
72:
73: }
|