1

slight changes to package structure + naming

This commit is contained in:
Christoph
2020-03-06 20:10:23 +01:00
parent 64f54ada27
commit 0e1e79d51a
28 changed files with 229 additions and 231 deletions

View File

@ -0,0 +1,23 @@
package mops.gruppen2.domain;
import mops.gruppen2.domain.event.Event;
import java.lang.reflect.Method;
public abstract class Aggregate {
/**
* Ruft die spezifische applyEvent-Methode im entsprechenden Aggregat auf.
*
* @param event
*/
public void applyEvent(Event event) {
try {
Method method = this.getClass().getDeclaredMethod("applyEvent", event.getClass());
method.setAccessible(true);
method.invoke(this, event);
} catch (Exception e) {
e.printStackTrace();
}
}
}