The major issue with the code base ATM is the duplication of code in the existing impls of ModuleDefintionRepository.  Seems like if we solve that problem we would also be able to stick the current code inside CompositeModuleDefintionService.

Also note that ideally classes/interfaces with the Repository suffix should be connected to Spring Data Repository.