package com.jpsoft.shinestar.modules.workflow.dao;

import java.util.List;
import org.springframework.stereotype.Repository;
import com.jpsoft.shinestar.modules.workflow.entity.ProcinstActivity;
import java.util.Map;
import com.jpsoft.shinestar.modules.common.dto.Sort;

@Repository
public interface ProcinstActivityDAO {
	int insert(ProcinstActivity entity);
	int update(ProcinstActivity entity);
	int exist(String id);
	ProcinstActivity get(String id);
	int delete(String id);
	List<ProcinstActivity> list();
	List<ProcinstActivity> search(Map<String,Object> searchParams,List<Sort> sortList);

	List<ProcinstActivity> searchRecode(Map<String,Object> searchParams,List<Sort> sortList);

    List<ProcinstActivity> findByProcinstId(String procinstId);

    ProcinstActivity findByActivityIndexAndActivityId(int activityIndex, String activityId);

    List<ProcinstActivity> findProcinstIdAndAction(String procinstId, String action);

	ProcinstActivity findByActivityIndexAndProcinstId(int activityIndex, String procinstId);

    ProcinstActivity findProcinstIdAndStatus(String procinstId, String status);
}