001 /* 002 * Copyright 2011 The Kuali Foundation. 003 * 004 * Licensed under the Educational Community License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.opensource.org/licenses/ecl2.php 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016 package org.kuali.kfs.fp.service.impl; 017 018 import java.util.List; 019 020 import org.apache.log4j.Logger; 021 import org.kuali.kfs.fp.dataaccess.CheckDao; 022 import org.kuali.kfs.fp.service.CheckService; 023 import org.kuali.kfs.sys.service.NonTransactional; 024 025 /** 026 * 027 * This is the default implementation of the CheckService interface. 028 */ 029 030 @NonTransactional 031 public class CheckServiceImpl implements CheckService { 032 // set up logging 033 private static Logger LOG = Logger.getLogger(CheckServiceImpl.class); 034 035 private CheckDao checkDao; 036 037 /** 038 * Retrieves a List of Checks by using the document header id given to retrieve a document and then 039 * retrieving all checks associated with that document. 040 * 041 * @param documentHeaderId The document header id to use to find the associated collection of checks. 042 * @return A collection of checks associated with a document with the provided document header id. 043 */ 044 public List getByDocumentHeaderId(String documentHeaderId) { 045 // retrieve the check 046 return checkDao.findByDocumentHeaderId(documentHeaderId); 047 } 048 049 // Spring injection 050 /** 051 * Sets the checkDao attribute. 052 * @param The CheckDao to be set. 053 */ 054 public void setCheckDao(CheckDao d) { 055 this.checkDao = d; 056 } 057 058 /** 059 * Gets the checkDao attribute. 060 * @return An instance of the checkDao attribute. 061 */ 062 public CheckDao getCheckDao() { 063 return checkDao; 064 } 065 }