From 03281643ada548c123bc6884b1afbe22170cae57 Mon Sep 17 00:00:00 2001 From: Joern Muehlencord Date: Sat, 9 Feb 2019 14:15:26 +0100 Subject: [PATCH] added missing ControllerExceptions --- .../shared/account/business/AbstractController.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/account/src/main/java/de/muehlencord/shared/account/business/AbstractController.java b/account/src/main/java/de/muehlencord/shared/account/business/AbstractController.java index 0554bbe..c169190 100644 --- a/account/src/main/java/de/muehlencord/shared/account/business/AbstractController.java +++ b/account/src/main/java/de/muehlencord/shared/account/business/AbstractController.java @@ -58,7 +58,7 @@ public abstract class AbstractController { this.entityClass = clazz; } - public void applyUpdateableChanges(Updateable updateable, boolean onCreate) { + public void applyUpdateableChanges(Updateable updateable, boolean onCreate) throws ControllerException { if (onCreate) { updateable.setCreatedBy(account.getUsername()); updateable.setCreatedOn(new Date()); @@ -74,7 +74,7 @@ public abstract class AbstractController { @TransactionAttribute(TransactionAttributeType.REQUIRED) @Transactional @Lock(LockType.WRITE) - public void create(T entity) { + public void create(T entity) throws ControllerException { if (Updateable.class.isAssignableFrom(entity.getClass())) { Updateable updateable = (Updateable) entity; applyUpdateableChanges(updateable, true); @@ -85,7 +85,7 @@ public abstract class AbstractController { @TransactionAttribute(TransactionAttributeType.REQUIRED) @Transactional @Lock(LockType.WRITE) - public T update(T entity) { + public T update(T entity) throws ControllerException { if (Updateable.class.isAssignableFrom(entity.getClass())) { Updateable updateable = (Updateable) entity; applyUpdateableChanges(updateable, false); @@ -125,7 +125,7 @@ public abstract class AbstractController { } /** - * returnns null, if the list is empty or null itself. Returns the one + * returns null, if the list is empty or null itself. Returns the one * element if there is exactly one element in the list. Otherwise an * exception is thrown *