001    /**
002     * Copyright 2005-2014 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.rice.kew.actionrequest.dao;
017    
018    import org.kuali.rice.kew.actionrequest.ActionRequestValue;
019    
020    import java.util.Collection;
021    import java.util.List;
022    
023    
024    /**
025     * Data Access Object for {@link ActionRequestValue}s.
026     *
027     * @author Kuali Rice Team (rice.collab@kuali.org)
028     */
029    public interface ActionRequestDAO {
030    
031        public ActionRequestValue getActionRequestByActionRequestId(String actionRequestId);
032    
033        public void saveActionRequest(ActionRequestValue actionRequest);
034    
035        public List<ActionRequestValue> findPendingRootRequestsByDocIdAtRouteLevel(String documentId, Integer routeLevel);
036    
037        public List<ActionRequestValue> findPendingByDocIdAtOrBelowRouteLevel(String documentId, Integer routeLevel);
038    
039        public List<ActionRequestValue> findPendingRootRequestsByDocIdAtOrBelowRouteLevel(String documentId, Integer routeLevel);
040    
041        public void delete(String actionRequestId);
042    
043         public List<ActionRequestValue> findPendingByActionRequestedAndDocId(String actionRequestedCd, String documentId);
044    
045        public List<ActionRequestValue> findAllPendingByDocId(String documentId);
046    
047        public List<ActionRequestValue> findAllByDocId(String documentId);
048    
049        public List<ActionRequestValue> findAllRootByDocId(String documentId);
050    
051        public List<ActionRequestValue> findByStatusAndDocId(String statusCd, String documentId);
052    
053        public List<ActionRequestValue> findByDocumentIdIgnoreCurrentInd(String documentId);
054    
055        public List<ActionRequestValue> findActivatedByGroup(String groupId);
056    
057        public List<ActionRequestValue> findPendingByResponsibilityIds(Collection responsibilityIds);
058    
059        public  void deleteByDocumentId(String documentId);
060    
061        public List<ActionRequestValue> findPendingRootRequestsByDocumentType(String documentTypeId);
062    
063        public List<ActionRequestValue> findPendingRootRequestsByDocIdAtRouteNode(String documentId, String nodeInstanceId);
064    
065        public List<ActionRequestValue> findRootRequestsByDocIdAtRouteNode(String documentId, String nodeInstanceId);
066    
067        //public List findFutureAdHocRequestsByDocIdAtRouteNode(String documentId, String nodeName);
068    
069        public boolean doesDocumentHaveUserRequest(String workflowId, String documentId);
070      
071        public List<String> getRequestGroupIds(String documentId);
072    
073        public ActionRequestValue getRoleActionRequestByActionTakenId(String actionTakenId);
074    
075    }