|
Sebastien Tardif In regards to your idea of a "batch initialize collections" feature, can you propose an API for what that might look like?
Are these all collections of the same role? Or a mix-bag?
Do we need to allow configuring how this happens like we are proposing with this "entity multi-load" API? Or is it a more simple "here are a number of collections, please just get them initialized"?
We could follow the approach being taken for "entity multi-load":
public interface CollectionInitializerAccess {
void initialize(Object... collections);
void initialize(Collection collections);
}
Unfortunately Map and the others not sharing a common interface makes that API a bit awkward in terms of the arguments. Possibly we could say...
public interface CollectionInitializerAccess {
void initialize(Map... maps);
void initialize(Collection<Map> maps);
void initialize(Collection... collections);
void initialize(Collection<Collection> collections);
}
WDYT? Or do you have an alternative suggestion?
|