/*
 * Copyright 2008 The Kuali Foundation.
 * 
 * Licensed under the Educational Community License, Version 1.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 * http://www.opensource.org/licenses/ecl1.php
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.kuali.module.budget.service.impl;

import org.kuali.module.budget.dao.BudgetReportsControlListDao;
import org.kuali.module.budget.service.BudgetReportsControlListService;

public class BudgetReportsControlListServiceImpl implements BudgetReportsControlListService {

    BudgetReportsControlListDao budgetReportsControlListDao;
    
    public void subFundSelectList() {
        String personUserIdentifier = ""; 
        budgetReportsControlListDao.cleanSubFundSelectList(personUserIdentifier);
        budgetReportsControlListDao.buildSubFundSelectList();
    }

    public void cleanAndupdateReportsControlList(String idForSession, String personUserIdentifier, String chartOfAcocuntCode, Integer universityFiscalYear, String organizationCode){
        
        budgetReportsControlListDao.cleanReportsControlList(personUserIdentifier);
        budgetReportsControlListDao.cleanReportsControlListPart1(idForSession);
        budgetReportsControlListDao.cleanReportsControlListPart2(idForSession);
        
        budgetReportsControlListDao.updateReportsControlListpart1(idForSession, personUserIdentifier, universityFiscalYear);
        budgetReportsControlListDao.updateReportsControlListpart2(idForSession, personUserIdentifier, chartOfAcocuntCode, organizationCode);
        budgetReportsControlListDao.updateReportsControlListDisp1(idForSession);
        
    }
    
    public void setBudgetReportsControlListDao(BudgetReportsControlListDao budgetReportsControlListDao) {
        this.budgetReportsControlListDao = budgetReportsControlListDao;
    }

    
}

/*
 * Copyright 2008 The Kuali Foundation.
 * 
 * Licensed under the Educational Community License, Version 1.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 * http://www.opensource.org/licenses/ecl1.php
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.kuali.module.budget.service.impl;

import org.kuali.module.budget.dao.BudgetReportsControlListDao;
import org.kuali.module.budget.service.BudgetReportsControlListService;
import org.springframework.transaction.annotation.Transactional;

@Transactional
public class BudgetReportsControlListServiceImpl implements BudgetReportsControlListService {

    BudgetReportsControlListDao budgetReportsControlListDao;
    
    public void subFundSelectList() {
        String personUserIdentifier = ""; 
        budgetReportsControlListDao.cleanSubFundSelectList(personUserIdentifier);
        budgetReportsControlListDao.buildSubFundSelectList();
    }

    public void cleanAndupdateReportsControlList(String idForSession, String personUserIdentifier, String chartOfAcocuntCode, Integer universityFiscalYear, String organizationCode){
        
        budgetReportsControlListDao.cleanReportsControlList(personUserIdentifier);
        budgetReportsControlListDao.cleanReportsControlListPart1(idForSession);
        budgetReportsControlListDao.cleanReportsControlListPart2(idForSession);
        
        budgetReportsControlListDao.updateReportsControlListpart1(idForSession, personUserIdentifier, universityFiscalYear);
        budgetReportsControlListDao.updateReportsControlListpart2(idForSession, personUserIdentifier, chartOfAcocuntCode, organizationCode);
        budgetReportsControlListDao.updateReportsControlListDisp1(idForSession);
        
    }
    
    public void setBudgetReportsControlListDao(BudgetReportsControlListDao budgetReportsControlListDao) {
        this.budgetReportsControlListDao = budgetReportsControlListDao;
    }

    
}

Fix the failed unit test through annoted the class with @Transactional