/******************************************************************************* *******************************************************************************/ package at.gv.egiz.eaaf.core.api.idp.process; import at.gv.egiz.eaaf.core.exceptions.EAAFException; import at.gv.egiz.eaaf.core.exceptions.EAAFStorageException; import at.gv.egiz.eaaf.core.impl.idp.process.ProcessInstance; import at.gv.egiz.eaaf.core.impl.idp.process.dao.ProcessInstanceStore; public interface ProcessInstanceStoreDAO { /** * Stores a {@link ProcessInstance} defined by {@code pIStore} in the * database. * * @param pIStore * the {@link ProcessInstanceStore} to persist. * @throws EAAFStorageException * is thrown if a problem occurs while accessing the database. */ void saveOrUpdate(ProcessInstanceStore pIStore) throws EAAFException; /** * Returns a {@link ProcessInstanceStore}, defined by * {@code processInstanceID} from the database, or {@code null} if the * object could not be found. * * @param processInstanceId * the id of the {@code ProcessInstanceStore} to retrieve. * @return a ProcessInstanceStore, or {@code null}. * @throws EAAFStorageException * is thrown if a problem occurs while accessing the database. */ ProcessInstanceStore load(String processInstanceId) throws EAAFException; /** * Deletes the {@link ProcessInstance} corresponding with the * {@code processInstanceId}. * * @param processInstanceId * the id of the {@code ProcessInstance} to be deleted. * @throws EAAFStorageException * is thrown if a problem occurs while accessing the database. */ void remove(String processInstanceId) throws EAAFException; }