It looks like this will work with any RepositoryType in general. If the implementation is a CrudRepository, could there be some optimization, or simplification? For example we already know what methods to call for read and write operations