While working on OGM, I copied the batch fetching framework classes and their various implementations.
I made the framework a bit more generic by allowing to pass some loader factory so that an Ogm EntityPersister can pass a factory that creates {{OgmLoader}}s. It also involves exposing a loadEntityBatch to UniqueEntityLoader (today it's the same sig on two concrete classes from different hierarchies.
We also need to transform into a service and initiator logic the BatchingEntityLoaderBuilder.getBuilder static method. This is useful so that OGM can have different fetching strategy ergonomics than ORM.
|