aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/at/ac/tuwien/sepm/assignment/groupphase/einsatzverwaltung/dao/RegistrationDAO.java7
-rw-r--r--src/main/java/at/ac/tuwien/sepm/assignment/groupphase/einsatzverwaltung/service/RegistrationService.java7
2 files changed, 8 insertions, 6 deletions
diff --git a/src/main/java/at/ac/tuwien/sepm/assignment/groupphase/einsatzverwaltung/dao/RegistrationDAO.java b/src/main/java/at/ac/tuwien/sepm/assignment/groupphase/einsatzverwaltung/dao/RegistrationDAO.java
index f2c461a..ba8f909 100644
--- a/src/main/java/at/ac/tuwien/sepm/assignment/groupphase/einsatzverwaltung/dao/RegistrationDAO.java
+++ b/src/main/java/at/ac/tuwien/sepm/assignment/groupphase/einsatzverwaltung/dao/RegistrationDAO.java
@@ -3,6 +3,7 @@ package at.ac.tuwien.sepm.assignment.groupphase.einsatzverwaltung.dao;
import at.ac.tuwien.sepm.assignment.groupphase.einsatzverwaltung.dto.Registration;
import at.ac.tuwien.sepm.assignment.groupphase.exception.ElementNotFoundException;
import at.ac.tuwien.sepm.assignment.groupphase.exception.PersistenceException;
+import java.util.List;
public interface RegistrationDAO {
@@ -10,11 +11,11 @@ public interface RegistrationDAO {
* Persist the given registration.
*
* @param vehicleId the id of the target vehicle
- * @param registration that should be stored
- * @return the id that was assigned
+ * @param registrations that should be stored
+ * @return a list of the ids that were assigned
* @throws PersistenceException if the registration could not be persisted
*/
- long add(long vehicleId, Registration registration) throws PersistenceException;
+ List<Long> add(long vehicleId, List<Registration> registrations) throws PersistenceException;
/**
* Make registration with the given id inactive.
diff --git a/src/main/java/at/ac/tuwien/sepm/assignment/groupphase/einsatzverwaltung/service/RegistrationService.java b/src/main/java/at/ac/tuwien/sepm/assignment/groupphase/einsatzverwaltung/service/RegistrationService.java
index 6723f32..801148c 100644
--- a/src/main/java/at/ac/tuwien/sepm/assignment/groupphase/einsatzverwaltung/service/RegistrationService.java
+++ b/src/main/java/at/ac/tuwien/sepm/assignment/groupphase/einsatzverwaltung/service/RegistrationService.java
@@ -4,6 +4,7 @@ import at.ac.tuwien.sepm.assignment.groupphase.einsatzverwaltung.dto.Registratio
import at.ac.tuwien.sepm.assignment.groupphase.exception.InvalidRegistrationException;
import at.ac.tuwien.sepm.assignment.groupphase.exception.InvalidVehicleException;
import at.ac.tuwien.sepm.assignment.groupphase.exception.ServiceException;
+import java.util.List;
public interface RegistrationService {
@@ -11,13 +12,13 @@ public interface RegistrationService {
* Register employee to a vehicle.
*
* @param vehicleId the id of the target vehicle
- * @param registration that should be added to the vehicle
- * @return the id that was assigned
+ * @param registrations that should be added to the vehicle
+ * @return a list of the ids that were assigned
* @throws InvalidVehicleException if the vehicleId is invalid or does not exist
* @throws InvalidRegistrationException if the registration is invalid
* @throws ServiceException if the registration could not be persisted
*/
- long add(long vehicleId, Registration registration)
+ List<Long> add(long vehicleId, List<Registration> registrations)
throws InvalidVehicleException, InvalidRegistrationException, ServiceException;
/**