diff options
Diffstat (limited to 'src/main/java/at/ac/tuwien/sepm/assignment/groupphase/missioncontrol/dao/RegistrationDAO.java')
-rw-r--r-- | src/main/java/at/ac/tuwien/sepm/assignment/groupphase/missioncontrol/dao/RegistrationDAO.java | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/main/java/at/ac/tuwien/sepm/assignment/groupphase/missioncontrol/dao/RegistrationDAO.java b/src/main/java/at/ac/tuwien/sepm/assignment/groupphase/missioncontrol/dao/RegistrationDAO.java new file mode 100644 index 0000000..4a35f86 --- /dev/null +++ b/src/main/java/at/ac/tuwien/sepm/assignment/groupphase/missioncontrol/dao/RegistrationDAO.java @@ -0,0 +1,28 @@ +package at.ac.tuwien.sepm.assignment.groupphase.missioncontrol.dao; + +import at.ac.tuwien.sepm.assignment.groupphase.exception.ElementNotFoundException; +import at.ac.tuwien.sepm.assignment.groupphase.exception.PersistenceException; +import at.ac.tuwien.sepm.assignment.groupphase.missioncontrol.dto.Registration; +import java.util.Set; + +public interface RegistrationDAO { + + /** + * Persist the given registration. + * + * @param vehicleId the id of the target vehicle + * @param registrations that should be stored + * @return a list of the ids that were assigned + * @throws PersistenceException if the registration could not be persisted + */ + Set<Long> add(long vehicleId, Set<Registration> registrations) throws PersistenceException; + + /** + * Make registration with the given id inactive. + * + * @param id of the registration that should be made inactive + * @throws ElementNotFoundException if no registration with the given id exists + * @throws PersistenceException if the registration could not be made inactive + */ + void remove(long id) throws ElementNotFoundException, PersistenceException; +} |