Changed very long and ugly if-statement in the DatabaseEventHandler to a factory with DI-Magic