Commit Graph
1462 Commits
Author SHA1 Message Date
Mathieu Lirzin e34434000b Fixed: Remove unnecessary semicolons in Java code (OFBIZ-10936)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1857904 13f79535-47bb-0310-9956-ffa450edef68
2019-04-21 10:55:18 +00:00
Mathieu Lirzin 9f5802e49a Improved: Do not use deprecated method in ‘DBCPConnectionFactory’
(OFBIZ-10935)

Use ‘PoolableConnectionFactory#setAutoCommitOnReturn’ instead of
‘PoolableConnectionFactory#setEnableAutoCommitOnReturn’ from
‘org.apache.commons.dbcp2’ package.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1857898 13f79535-47bb-0310-9956-ffa450edef68
2019-04-21 10:14:45 +00:00
Mathieu Lirzin d5e3c2d3d4 Improved: Remove redundant null checks (OFBIZ-10911)
Redundant null checks detected by Eclipse has been removed.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1857896 13f79535-47bb-0310-9956-ffa450edef68
2019-04-21 09:37:49 +00:00
Jacques Le Roux f85a480f01 Improved: Using try-with-resources with File IO Objects.
(OFBIZ-9855)

Uses try with resources for File IO objects like ObjectInputStream and other 
objects. File classes have the AutoCloseable interface.

jleroux: this is only a part of the 2nd patch. The 1st patch will be committed
soon too...

All tests pass

Thanks: Pradhan Yash Sharma

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1857099 13f79535-47bb-0310-9956-ffa450edef68
2019-04-08 09:17:55 +00:00
Mathieu Lirzin a15b7b1996 Reverted: Changes done at r#1857089 and r#1857090 (OFBIZ-10911)(OFBIZ-10912)
The Cleanups introduced by those revisions has introduced some
unexpected regressions making the Gradle ‘loadAll’ task fail.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1857091 13f79535-47bb-0310-9956-ffa450edef68
2019-04-07 23:36:29 +00:00
Mathieu Lirzin fef3988c46 Improved: Remove ‘CreateTableCallable’ private class (OFBIZ-10912)
This class was never instantiated locally.  Since this was a private
class it is better to remove it.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1857090 13f79535-47bb-0310-9956-ffa450edef68
2019-04-07 23:12:13 +00:00
Mathieu Lirzin d639aba7e7 Improved: Remove redundant null checks (OFBIZ-10911)
Redundant null checks detected by Eclipse has been removed.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1857089 13f79535-47bb-0310-9956-ffa450edef68
2019-04-07 23:02:39 +00:00
Mathieu Lirzin 8700328f09 Fixed: Remove unused type parameters (OFBIZ-10909)
No functional change.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1857087 13f79535-47bb-0310-9956-ffa450edef68
2019-04-07 22:00:16 +00:00
Deepak Dixit 7b9ea305d7 Preparation for JDK11 update, Updated following code to fix warning with respect to JDK11
- Replaced Class::newInstance occurrences 
- Removed deprecated override method Object::finalize
(OFBIZ-10757)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1854683 13f79535-47bb-0310-9956-ffa450edef68
2019-03-03 10:27:29 +00:00
Jacques Le Roux 96d1388d13 Improved: no functional change
Fixes a typo in comment. I checked it's still not implemented in last DBCP (2.6.0)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1854366 13f79535-47bb-0310-9956-ffa450edef68
2019-02-26 10:09:40 +00:00
Jacques Le Roux c4c5c8a142 Improved: ‘ObjectType’ contains unneeded code
(OFBIZ-10771)

The ObjectType class contains utilities that extends the Java reflection API by 
defining methods which accepts string representation of Java types and classes.
It appears that this class contains unneeded code which is either dead or is 
redundant with the services already defined in the reflection API

Removes the useless isOrSubOf, instanceOf and interfaceOf methods. 
Additionally it removes the getInstance method which is not used anywhere in 
the framework or in the plugins.

Also includes similar changes in 
AbstractConverter.java
Converters.java 
DateTimeConverters.java 
GenericEntity.java
IfInstanceOf.java

Thanks: Mathieu

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1851701 13f79535-47bb-0310-9956-ffa450edef68
2019-01-20 09:39:30 +00:00
Michael Brohl bcd2a6c5d7 Improved: ‘EntityOperator#getId()’ is not used in the framework
(OFBIZ-10607)

Thanks Mathieu Lirzin for reporting and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1850958 13f79535-47bb-0310-9956-ffa450edef68
2019-01-10 16:19:10 +00:00
Gil Portenseigne 9b10f93948 Improved: Remove unneeded code in ‘entity’ component
(OFBIZ-10777)
Thanks Mathieu Lirzin for your contribution

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1850802 13f79535-47bb-0310-9956-ffa450edef68
2019-01-08 21:52:22 +00:00
Jacques Le Roux f30cf03e0b Improved: The ‘ModelFieldType’ class members should be private.
(OFBIZ-10773)

Makes the class members private and remove the default public constructor.

jleroux: All these members are only used in the class and the default public 
constructor is useless (it would be automatically added by the compiler if 
there was no other constructors, and there is one)
http://tutorials.jenkov.com/java/constructors.html#default-no-arg-constructors

Thanks: Mathieu Lirzin

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1850728 13f79535-47bb-0310-9956-ffa450edef68
2019-01-08 10:57:44 +00:00
Gil Portenseigne 00ee97b23d Improved: Refactoring ‘EntityCondition’ - Rewrite EntityConditionListBase class
(OFBIZ-10691)

Unecessary ‘this’ has been removed and the javadoc has been
expanded. The visibility of the class has been reduced to package
only.  The ‘conditionList’ field has been renamed to ‘conditions’ and
the subclasses has been adapted.


Thanks Mathieu for the contribution


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1850385 13f79535-47bb-0310-9956-ffa450edef68
2019-01-04 15:02:45 +00:00
Gil Portenseigne a8e986c7c4 Improved: Refactoring ‘EntityCondition’ - Rewrite EntityExpr class
(OFBIZ-10691)

Remove useless ‘this’ and useless imports.  An ‘isNullField’ private
method has been addded to factorize the check of null field.
Additionally the 120 characters per line limit has been enforced.


Thanks Mathieu for the contribution



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1850384 13f79535-47bb-0310-9956-ffa450edef68
2019-01-04 14:59:58 +00:00
Gil Portenseigne 1d0f9036bd Improved: Refactoring ‘EntityCondition’ - Rewrite EntityDateFilterCondition class
(OFBIZ-10691)

The ‘makeCondition’ methods has been simplified and the javadoc has·
been expanded.

Thanks Mathieu for the contribution


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1850383 13f79535-47bb-0310-9956-ffa450edef68
2019-01-04 14:59:03 +00:00
Gil Portenseigne c6524affa2 Improved: Refactoring ‘EntityCondition’ - Rewrite EntityWhereString class
(OFBIZ-10691)

The ‘equals’ method has been simplified and the javadoc has been
expanded.

Thanks Mathieu for the contribution


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1850379 13f79535-47bb-0310-9956-ffa450edef68
2019-01-04 14:58:16 +00:00
Gil Portenseigne c932db31f1 Improved: Refactoring ‘EntityCondition’ - Rewrite EntityFieldMap class
(OFBIZ-10691)

Useless explicit type parameters, and ‘this’ has been removed.  The·
javadoc has been expanded.

Thanks Mathieu for the contribution



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1850378 13f79535-47bb-0310-9956-ffa450edef68
2019-01-04 14:57:31 +00:00
Gil Portenseigne 682f29be45 Improved: Refactoring ‘EntityCondition’ - Rewrite EntityConditionList class
(OFBIZ-10691)

This class is now final.  The ‘getConditionListSize’ and
‘getConditionIterator’ methods has been inlined instead of overidding
them from ‘EntityConditionListBase’.  The Javadoc has been expanded.

Thanks Mathieu for the contribution

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1850377 13f79535-47bb-0310-9956-ffa450edef68
2019-01-04 14:56:13 +00:00
Gil Portenseigne 31fdaaed84 Improved: Refactoring ‘EntityCondition’ - Rename EntityConditionFunction class to EntityNotCondition
(OFBIZ-10691)

‘EntityConditionFunction’ was representing an expression containing a
unary prefix condition operator or in other words a one argument
predicate.  Actually, there exists only one meaningful implementation
for this kind of operators in the SQL language which is the NOT·
predicate.  Having a ‘EntityNotCondition’ class allows us to have
simpler semantics while achieving the same completeness in term of SQL·
support.

The ‘EntityConditionVisitor’ and its documentation has been adapted to
the new class hierarchy.

Thanks Mathieu for the contribution

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1850376 13f79535-47bb-0310-9956-ffa450edef68
2019-01-04 14:55:17 +00:00
Gil Portenseigne 77a93fa477 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

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1850373 13f79535-47bb-0310-9956-ffa450edef68
2019-01-04 14:50:59 +00:00
Gil Portenseigne 817378d3dc Improved: Refactoring ‘EntityCondition’ - Remove EntityConditionBase class
(OFBIZ-10691)

This is removing an abuse of inheritance for code reuse which was·
breaking Liskov substitution principle.  This has been achieved with
the following changes:

* The ‘Serializable’ interface which was implemented by
‘EntityConditionBase’ is now implemented directly by the·
‘EntityCondition’, ‘EntityConditionValue’, and ‘EntityOperator’
classes.

* ‘emptyList’ and ‘_emptyMap’ useless static members has been removed
and ‘emptyAliases’ has been move down to the ‘EntityConditionValue’
subclass.

* The ‘castBoolean’ method has been removed due to the automatic
boxing/unboxing of boolean and Boolean values which make it useless.

* ‘equals’ and ‘hashCode’ pseudo abstract methods (meaning methods
        throwing an unsupported operation exception) has been moved down to
the ‘EntityCondition’ and ‘EntityConditionValue’ sub classes.
‘Objects#equals’ and ‘Objects#hashCode’ standard methods has been
used in the EntityCondition class hierarchy instead.

* The ‘getColName’ methods has been moved down to the·
‘EntityConditionValue’ class which is the unique class using those
methods.

* The remaining static methods ‘getField’ and ‘addValue’ has been
moved to a new ‘EntityConditionUtils’ class.  The unused override of
‘addValue’ has been removed which allowed us to make this method
static.

Thanks Mathieu for the contribution

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1850372 13f79535-47bb-0310-9956-ffa450edef68
2019-01-04 14:50:13 +00:00
Jacques Le Roux 25721714f1 Improved: Simplify ‘entity.model.ModelField#EncryptMethod’ enum
(OFBIZ-10763)

The use of an overridden abstract method for isEncrypted is a bit overkill and 
could be replaced by a simple equality check

Thanks: Mathieu Lirzin

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1850253 13f79535-47bb-0310-9956-ffa450edef68
2019-01-03 17:22:00 +00:00
Jacques Le Roux b7f211729f Improved: function parseBigDecimalForEntity is in wrong location
(OFBIZ-10689)

Actually this is a firts step that simply renames 
  ObjectType::simpleTypeConvert to
  ObjectType::simpleTypeOrObjectConvert
and improves the simpleTypeOrObjectConvert Javadoc

Thanks: Pierre Smits for report, Deepak Dixit for discussion

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1850027 13f79535-47bb-0310-9956-ffa450edef68
2018-12-31 09:23:36 +00:00
Aditya Sharma d0eff38e8d Improved: Refactor boolean returns from methods
(OFBIZ-10725)
Improved boolean returns with a single statement, replacing if blocks with the explicit boolean return.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1849846 13f79535-47bb-0310-9956-ffa450edef68
2018-12-28 12:57:49 +00:00
Aditya Sharma aa44818396 Improved: Refactor boolean returns from methods
(OFBIZ-10725)
Improved boolean returns with a single statement, replacing if blocks with the explicit boolean return.
Improves code in methods:
isPrimaryKey() of GenericEntity
hasNext() and hasPrevious() of EntityListIterator
isValueActive() of EntityUtil

Additional change:
Improved return for getStartIndexFromViewIndex() method in EntityUtil. Instead of using if-else block, a ternary operator is used for improving readability.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1849741 13f79535-47bb-0310-9956-ffa450edef68
2018-12-26 08:37:47 +00:00
Jacques Le Roux 958d72dbcf Fixed: Having condition is ignored on queryList() and queryFirst() calls in
EntityQuery
(OFBIZ-9890)

queryList() and queryFirst() both call internal private query() method. 
This method calls delegator.findList if a normal Entity/ViewEntity is used 
(not a DVE). 

DVE has no option to include a having condition and so must opt to use 
queryIterator(). Even queryCount() can use a having condition.

Thanks: Rupert Howell and Gareth Carter for report,  Prakhar Kumar for discussion
 and Gareth Carter for the fix

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1849693 13f79535-47bb-0310-9956-ffa450edef68
2018-12-24 14:57:08 +00:00
Deepak Dixit b7d0f87ae8 Improved: EntityUtilProperties.getProperties method should use cache.
(OFBIZ-10717)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1849191 13f79535-47bb-0310-9956-ffa450edef68
2018-12-18 16:20:56 +00:00
Jacques Le Roux 47954445b4 Improved: Replace Callable objects with lambda expressions
(OFBIZ-10488)

Remove unused imports

Thanks: Mathieu Lirzin

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1848744 13f79535-47bb-0310-9956-ffa450edef68
2018-12-12 11:07:01 +00:00
Jacques Le Roux bbfc62d47a Improved: Fix or Silence various warnings
(OFBIZ-10701)

In order to detect potential issues early, the linting compiler option should be 
used by default and disabled with {{./gradlew -PXlint:none build}}.

Additionally it is important to reduce the number of warnings otherwise new 
warnings will remain unnoticed.

The warning related to the com.googlecode.concurrentlinkedhashmap dependency 
should resolves itself once we handle upgrade to Caffeine like proposed in 
OFBIZ-6747.

Thanks: Mathieu Lirzin

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1848673 13f79535-47bb-0310-9956-ffa450edef68
2018-12-11 13:33:49 +00:00
Jacques Le Roux 13f8b82f51 Improved: Replace Callable objects with lambda expressions
(OFBIZ-10488)

Since Java 8 it is possible to instantiate functional interfaces 
(interfaces with one non-static method) with lambda expressions instead 
of anonymous classes.

This replaces the creation of callable objects with lambda expressions.

Thanks: Mathieu Lirzin

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1848514 13f79535-47bb-0310-9956-ffa450edef68
2018-12-09 13:04:23 +00:00
Jacques Le Roux b0478d13f0 Improved: XML schemas should use predefined boolean type
(OFBIZ-10411)

To define boolean values, some ad-hoc enumeration of "true" and "false" are 
repeatedly used.  Since XML Schema defines a standard boolean datatype it's 
better to use it.

Thanks: Mathieu Lirzin

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1846727 13f79535-47bb-0310-9956-ffa450edef68
2018-11-16 16:38:24 +00:00
Gil Portenseigne 161172b3ff Improved: Improve entityConditionVisitor basic test
(OFBIZ-10593)

Use print instead of println to avoid newline failure on windows, thanks Jacques for the feedback.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1843936 13f79535-47bb-0310-9956-ffa450edef68
2018-10-15 19:16:17 +00:00
Gil Portenseigne 699bbb9cf9 Improved: Rewrite EntityConditionVisitor interface to respect visitor Pattern
(OFBIZ-10593)

Remove visit methods from current EntityConditionBase type hierarchy.
Add or rewrite accept method in EntityCondition type hierachy.
Add documentation in EntityConditionVisitor, introducing implementation examples.
Add junit test validating documented examples.
Thanks to Mathieu Lirzin for your contribution, and Jacques for the review.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1843780 13f79535-47bb-0310-9956-ffa450edef68
2018-10-13 19:50:27 +00:00
Gil Portenseigne 3f23e45b7b Implemented: Refactor EntityUtil findBy methods using Stream API
(OFBIZ-10537)

Fixed variable name to make it more meaningful

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1839926 13f79535-47bb-0310-9956-ffa450edef68
2018-09-03 09:33:21 +00:00
Gil Portenseigne e316f2165d Implemented: Refactor EntityUtil findBy methods using Stream API
(OFBIZ-10537)

Thanks Jacques and Mathieu for the review

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1839763 13f79535-47bb-0310-9956-ffa450edef68
2018-08-31 15:32:02 +00:00
Gil Portenseigne ceea6ce791 Improved : Remove all unnecessary boxing and unboxing in Java classes
(OFBIZ-10504)

Thanks Taher, Jacques, Mathieu and Rishi for the review

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1837577 13f79535-47bb-0310-9956-ffa450edef68
2018-08-07 07:30:43 +00:00
Michael Brohl fc3c92f7d6 Fixed: Corrected wrong import introduced in 1813640.
Thanks Scott Gray for reporting.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1836796 13f79535-47bb-0310-9956-ffa450edef68
2018-07-27 09:30:13 +00:00
Jacques Le Roux e20b34bc24 Implemented: Add a mechanism to prevent the usage of EntitySyncRemove
(OFBIZ-10008)

No configurations is available to disable usage of EntitySyncRemove. 
And it's creating problems when having a large database and frequent delete 
operations.

saveEntitySyncRemoveInfo is used to create EntitySyncRemove records in 
GenericDelegator.removeValue() and removeByPrimaryKey().

This adds a mechanism to prevent the usage of EntitySyncRemove by adding a 
property in general.properties file used to configure in entityengine.xml 






git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1835296 13f79535-47bb-0310-9956-ffa450edef68
2018-07-07 07:46:04 +00:00
Jacques Le Roux 66fa6b9c51 Improved: no functional change, fixes a typo in comment while at it
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1832930 13f79535-47bb-0310-9956-ffa450edef68
2018-06-05 11:29:11 +00:00
Rishi Solanki 8430ac5cc3 Improved: Generic message from entity-auto service can be enhanced. For example ProductStoreFacility Updated Successfully, we can have better success message as Product Store Facility Updated Successfully.
(OFBIZ-10409)
Thanks Suraj Khurana for your contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1832309 13f79535-47bb-0310-9956-ffa450edef68
2018-05-26 13:00:56 +00:00
Rishi Solanki bc4a0cbfc3 Improved: Remove Entity suffix from title of all entities. In all EntityModel.xml files, title should not contain Entity as suffix.
(OFBIZ-10408)
Thanks to Suraj Khurana for reporting the improvement and providing fix for that.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1832235 13f79535-47bb-0310-9956-ffa450edef68
2018-05-25 12:19:07 +00:00
Deepak Dixit d358bc4471 Improved: Added missing condition-service in entity-eca.xsd file
(OFBIZ-10220)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1830960 13f79535-47bb-0310-9956-ffa450edef68
2018-05-05 10:45:00 +00:00
Jacques Le Roux 9e41a4a174 Improved: EntityUtilProperties
(OFBIZ-7112)

Remove useless redundant code.

results map is already initialised in the beginning with isExistInDb 
as "N" and value as "".
These values only changed when systemProperty != null. S
o except for this condition if we return results at any point it will have 
isExistInDb as "N" and value as "". 
If we remove the lines I removed in the patch, it will only remove put 
operations that are not necessary.

Thanks: Aditya

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1828217 13f79535-47bb-0310-9956-ffa450edef68
2018-04-03 10:51:29 +00:00
Deepak Dixit c609f5f530 Improved: Update postgres datasource name in entityengine file for consistency
OFBIZ-10273


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1826502 13f79535-47bb-0310-9956-ffa450edef68
2018-03-12 06:40:19 +00:00
Jacques Le Roux 030b6b59de Fixed: EntitySaxReader mostly-insert (store after create-error) Fix
(OFBIZ-1032)

Karl:
Avoids rollback on create error to be able to store the entity instead 
(previous mostly-inserts feature).

Matin:
I think, the data load with "mostly inserts" activated should fail on a 
create-failure (what it does indeed already), so I see no need for a working 
solution of a fallback store attempt. Consistently the Feature should be renamed 
in the frontend from "mostly inserts" to "only inserts".

Kyra:
Additional trivial refactoring in the patch: I reduced the full qualified 
classname of org.xml.sax.SAXException in method signatures to the simple name.

This incorperates the changes that Martin has mentioned above. 
The unnecessary call to store() is removed, simplifying the process of creating 
and deleting entities. (These changes were already in Martins old patch but had 
the wrong format.) This means that the flag "mostly Inserts?" is not accurately 
worded since as long as there is only create fail, all operations are rolled 
back. So the second patch renames the flag and all appropriate parameters to 
"onlyInserts". 

jleroux: I made few no functional changes, apart not swallowing an exception

Thanks: Thanks Karl for the 1st patch, Martin to get further, and Kyra to 
complete the whole with a final touch and help to quickly test

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1822310 13f79535-47bb-0310-9956-ffa450edef68
2018-01-26 15:13:42 +00:00
Deepak Dixit 47837aad8a Improved:Removed unused import.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1822125 13f79535-47bb-0310-9956-ffa450edef68
2018-01-24 17:26:12 +00:00
Deepak Dixit fb77a3c477 Improved: Logging: change all System.out/.err/.. println to Debug.log... in the code base (OFBIZ-10045)
Thanks Michael Brohl and Kyra Pritzel-Hentley for your contribution

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1819124 13f79535-47bb-0310-9956-ffa450edef68
2017-12-23 09:08:04 +00:00
Michael Brohl 50c4bba4b2 Improved: Replace all "e.printStackTrace();" by calls to the Debug class.
(OFBIZ-10083)

Thanks Jacques Le Roux for reporting and Kyra Pritzel-Hentley 
for providing the patches.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818921 13f79535-47bb-0310-9956-ffa450edef68
2017-12-21 12:33:04 +00:00