package at.gv.egovernment.moa.id.process.dao; import java.util.List; import at.gv.egovernment.moa.id.commons.db.ex.MOADatabaseException; import at.gv.egovernment.moa.id.process.ProcessInstance; public interface ProcessInstanceStoreDAO { /** * Stores a {@link ProcessInstance} defined by {@code pIStore} in the * database. * * @param pIStore * the {@link ProcessInstanceStore} to persist. * @throws MOADatabaseException * is thrown if a problem occurs while accessing the database. */ void save(ProcessInstanceStore pIStore) throws MOADatabaseException; /** * 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 MOADatabaseException * is thrown if a problem occurs while accessing the database. */ ProcessInstanceStore load(String processInstanceId) throws MOADatabaseException; /** * Deletes the {@link ProcessInstance} corresponding with the * {@code processInstanceId}. * * @param processInstanceID * the id of the {@code ProcessInstance} to be deleted. * @throws MOADatabaseException * is thrown if a problem occurs while accessing the database. */ void remove(String processInstanceId) throws MOADatabaseException; /** * Returns all {@link ProcessInstanceStore} objects stored in the database. * The returned list may be empty, but never {@code null}. * * @return a list of {@link ProcessInstanceStore} (never {@code null}). * @throws MOADatabaseException * is thrown if a problem occurs while accessing the database. */ List getAllProcessInstanceStores() throws MOADatabaseException; }