package at.gv.egovernment.moa.id.process.dao; 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 saveOrUpdate(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; }