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 */
016package org.kuali.rice.kew.actiontaken.dao;
017
018import org.kuali.rice.kew.actiontaken.ActionTakenValue;
019import org.kuali.rice.kew.api.action.ActionType;
020
021import java.sql.Timestamp;
022
023
024/**
025 * Data Access Object for {@link ActionTakenValue}s.
026 *
027 * @author Kuali Rice Team (rice.collab@kuali.org)
028 */
029public interface ActionTakenDao {
030
031    /**
032     * Returns the Timestamp of the last action of the given type taken against the document.
033     *
034     * <p>Both {@code documentId} and {@code actionType} must be supplied to this query. Otherwise an
035     * {@code IllegalArgumentException} will be thrown.</p>
036     *
037     * @param documentId the id of the document to check
038     * @param actionType the type of the action to look for
039     *
040     * @return the Timestamp of the last action of the given type taken against the document, or null if the document
041     * has no actions
042     *
043     * @throws IllegalArgumentException if documentId is null or blank, or if actionType is null
044     */
045    Timestamp getLastActionTakenDate(String documentId, ActionType actionType);
046
047}