It has to be ensured, that with the future removal of the doCacheClear parameter from the method signature:
storeAll(List<GenericValue> values, boolean doCacheClear, boolean createDummyFks)
storeAll(List<GenericValue> values, boolean createDummyFks)
the signature afterwards does not match the old signature with different meaning:
storeAll(List<GenericValue> values, boolean doCacheClear)
where legacy code would get no compiler error and may miss the changed meaning.
I implemented two variants of a solution for this:
With the first I renamed the method with the concrete implementation from storeAll to storeAllInternal and changed the visibility to private, so there is no collision with the other signature with List<GenericValue>, boolean params. The createDummyFks function is made public available with a new method storeAllWithDummyFks.
The second variant is simpler and without the need of changed method names, it just switches the order of the parameters in the signature, which is not so nice in reading the signature but avoids special method name for the createDummyFks feature.
The next step for me would be to remove the deprecated code from the Delegator implementation in the context of