/[Apache-SVN]
ViewVC logotype

Revision 1850373


Jump to revision: Previous Next
Author: pgil
Date: Fri Jan 4 14:50:59 2019 UTC (5 years, 2 months ago)
Changed paths: 9
Log Message:
Improved: Refactoring ‘EntityCondition’ - Turn EntityCondition into an interface
(OFBIZ-10691)

This is done in the spirit of favouring abstraction over
implementation.  To achieve that the following change has been made:

* The useless ‘EntityCondition#eval’ methods has been removed

* The ‘PriceServices#calculatePurchasePrice’ method has been fixed to
  refer to ‘EntityCondition#makeCondition’ instead of
  ‘EntityExpr#makeCondition’.

Additionally, the genericity of the ‘makeCondition’ methods has been
improved to allow having a hierarchy of class between the
‘EntityCondition’ type and the subtypes.

Exceptionally a ‘serialVersionUID’ has been used instead of
suppressing the 'serial' warning for the ‘EntityCondition’ interface
to satisfy both Eclipse and OpenJDK linting features which disagree on
the validity of using the ‘@SuppressWarnings’ annotation in the case
of interfaces extending ‘Serializable’.


Thanks Mathieu for the contribution

Changed paths

Path Details
Directoryofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/price/PriceServices.java modified , text changed
Directoryofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/condition/EntityCondition.java modified , text changed
Directoryofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/condition/EntityConditionBuilder.java modified , text changed
Directoryofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/condition/EntityConditionFunction.java modified , text changed
Directoryofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/condition/EntityConditionList.java modified , text changed
Directoryofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/condition/EntityConditionListBase.java modified , text changed
Directoryofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/condition/EntityDateFilterCondition.java modified , text changed
Directoryofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/condition/EntityExpr.java modified , text changed
Directoryofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/condition/EntityWhereString.java modified , text changed

infrastructure at apache.org
ViewVC Help
Powered by ViewVC 1.1.26