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.module.bc.document.dataaccess;
017    
018    import java.util.List;
019    
020    import org.kuali.kfs.module.bc.businessobject.BudgetConstructionFundingLock;
021    import org.kuali.kfs.module.bc.businessobject.BudgetConstructionHeader;
022    import org.kuali.kfs.module.bc.businessobject.BudgetConstructionPosition;
023    import org.kuali.kfs.module.bc.businessobject.PendingBudgetConstructionAppointmentFunding;
024    
025    /**
026     * Provides methods for retrieving locks.
027     */
028    public interface BudgetConstructionLockDao {
029    
030        /**
031         * Retrieves all current account locks for the given user (or all locks if user is null/empty).
032         * 
033         * @param lockUnivId - universal id that will be used in lock query
034         * @return budget headers that are locked
035         */
036        public List<BudgetConstructionHeader> getAllAccountLocks(String lockUnivId);
037    
038        /**
039         * Retrieves all current transaction locks for the given user (or all locks if user is null/empty).
040         * 
041         * @param lockUnivId - universal id that will be used in lock query
042         * @return budget headers that are locked
043         */
044        public List<BudgetConstructionHeader> getAllTransactionLocks(String lockUnivId);
045    
046        /**
047         * Retrieves all funding locks that do not have a corresponding position lock for the given user (or all locks if user is
048         * null/empty).
049         * 
050         * @param lockUnivId - universal id that will be used in lock query
051         * @return funding locks records
052         */
053        public List<BudgetConstructionFundingLock> getOrphanedFundingLocks(String lockUnivId);
054    
055        /**
056         * Retrieves all current position/funding locks for the given user (or all locks if user is null/empty).
057         * 
058         * @param lockUnivId - universal id that will be used in lock query
059         * @return position/funding records that are locked.
060         */
061        public List<PendingBudgetConstructionAppointmentFunding> getAllPositionFundingLocks(String lockUnivId);
062    
063        /**
064         * Retrieves all current position locks without a funding lock for the given user (or all locks if user is null/empty).
065         * 
066         * @param lockUnivId universal id that will be used in lock query
067         * @return positions that are locked.
068         */
069        public List<BudgetConstructionPosition> getOrphanedPositionLocks(String lockUnivId);
070    
071    }