Base classes for Command Query Responsibility Segregation (CQRS) with Java