The class includes a large switch statement to decide which factory method to call to create an entity, perhaps it would be better to create a Map of names to methods instead and maybe the code would be easier to read and maintain. I will create a PR for review and it can be discussed there - I don't mind if the PR is rejected in the end, but at least it will have been considered.