diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/activation/EntityActivationEvent.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/activation/EntityActivationEvent.java index fabe5449..577ea104 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/activation/EntityActivationEvent.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/activation/EntityActivationEvent.java @@ -16,13 +16,15 @@ public final class EntityActivationEvent extends ApplicationEvent { private static final long serialVersionUID = -6712364320755441148L; - public final transient boolean activated; - public final transient Entity entity; + public final boolean activated; public EntityActivationEvent(final Entity source, final boolean activated) { super(source); - this.entity = source; this.activated = activated; } + public Entity getEntity() { + return (Entity) this.source; + } + } diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/activation/EntityActivationService.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/activation/EntityActivationService.java index 1863ff2f..1def3056 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/activation/EntityActivationService.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/activation/EntityActivationService.java @@ -30,9 +30,9 @@ public class EntityActivationService { public void notifyActivationEvent(final EntityActivationEvent event) { for (final ActivatableEntityDAO dao : this.activatableEntityDAOs) { if (event.activated) { - dao.notifyActivation(event.entity); + dao.notifyActivation(event.getEntity()); } else { - dao.notifyDeactivation(event.entity); + dao.notifyDeactivation(event.getEntity()); } } }