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.coa.service;
017    
018    import org.kuali.kfs.coa.businessobject.A21SubAccount;
019    
020    /**
021     * 
022     * This interface defines the methods for retrieving fully populated A21SubAccount objects
023     */
024    public interface A21SubAccountService {
025        
026        /**
027         * 
028         * This retrieves an A21SubAccount by its primary keys of chart of accounts code, account number and 
029         * sub account number
030         * @param chartOfAccountsCode
031         * @param accountNumber
032         * @param subAccountNumber
033         * @return the A21SubAccount that matches this primary key
034         */
035        public A21SubAccount getByPrimaryKey(String chartOfAccountsCode, String accountNumber, String subAccountNumber);
036        
037        /**
038         * build a CG ICR account
039         * @param chartOfAccountsCode the given chart of account
040         * @param accountNumber the given account number
041         * @param subAccountNumber the given sub account number
042         * @param subAccountTypeCode the type of the CG ICR account
043         * @return a CG ICR account built from the given information
044         */
045        public A21SubAccount buildCgIcrAccount(String chartOfAccountsCode, String accountNumber, String subAccountNumber, String subAccountTypeCode);
046        
047        /**
048         * populate the a21 sub account with the given account
049         * 
050         * @param a21SubAccount the a21 sub account needed to be populated
051         * @param chartOfAccountsCode the given chart of account
052         * @param accountNumber the given account number
053         */
054        public void populateCgIcrAccount(A21SubAccount a21SubAccount, String chartOfAccountsCode, String accountNumber);
055    }