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.gl.dataaccess;
017
018 import java.util.Collection;
019
020 import org.kuali.kfs.gl.businessobject.CorrectionChangeGroup;
021
022 /**
023 * a DAO interface that declares methods needed for CorrectionChangeGroups to deal with the database
024 */
025 public interface CorrectionChangeGroupDao {
026 /**
027 * Saves a Correction Group to the database
028 *
029 * @param group the group to save
030 */
031 void save(CorrectionChangeGroup group);
032
033 /**
034 * Deletes a CorrectionChangeGroup from the database
035 *
036 * @param group the group to delete
037 */
038 void delete(CorrectionChangeGroup group);
039
040 /**
041 * Finds all CorrectionChange groups associated with a document
042 *
043 * @param documentNumber the document number of a GLCP document
044 * @return a Collection of CorrectionChangeGroup records
045 */
046 Collection findByDocumentNumber(String documentNumber);
047
048 /**
049 * Finds a correction change group, based on GLCP document number and the group number
050 *
051 * @param documentNumber the document number of the correction change group to retrieve
052 * @param CorrectionChangeGroupNumber the number of the group to retrieve
053 * @return the found CorrectionChangeGroup, or null if not found
054 */
055 CorrectionChangeGroup findByDocumentNumberAndCorrectionChangeGroupNumber(String documentNumber, Integer CorrectionChangeGroupNumber);
056 }