ofbiz-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Becker (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (OFBIZ-6276) Fix deprecation issues in framework/entity
Date Sat, 16 May 2015 16:48:59 GMT

     [ https://issues.apache.org/jira/browse/OFBIZ-6276?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Martin Becker updated OFBIZ-6276:
    Attachment: OFBIZ-6276-variant-2.patch

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 OFBIZ-6273.

> Fix deprecation issues in framework/entity
> ------------------------------------------
>                 Key: OFBIZ-6276
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-6276
>             Project: OFBiz
>          Issue Type: Sub-task
>          Components: framework
>            Reporter: Adam Heath
>            Priority: Minor
>         Attachments: OFBIZ-6276-variant-1.patch, OFBIZ-6276-variant-2.patch
> It appears that the storeAll() variants are being refactor; basically, the useCache parameter
is being removed.  However, this has caused the
> entity engine to have deprecation with itself.

This message was sent by Atlassian JIRA

View raw message