Adrian Crum
7179221b1c
GenericEntity instances coming from EntityListCache are now immutable.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1470736 13f79535-47bb-0310-9956-ffa450edef68
2013-04-22 22:14:07 +00:00
Adrian Crum
f2aa5d4d87
Removed unnecessary synchronized keyword. The GenericEntity class is not thread-safe, so synchronizing a single method is pointless.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1470732 13f79535-47bb-0310-9956-ffa450edef68
2013-04-22 21:56:03 +00:00
Adrian Crum
45cec54c55
Make sure an immutable GenericEntity really is immutable.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1470712 13f79535-47bb-0310-9956-ffa450edef68
2013-04-22 20:46:36 +00:00
Adrian Crum
bdc155f896
Copy the observable aspect of GenericEntity. Includes unit tests. Also added some FIXME comments.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1470676 13f79535-47bb-0310-9956-ffa450edef68
2013-04-22 19:38:06 +00:00
Adrian Crum
5c290a7408
Refactored GenericEntity so it contains Observable instead of extending Observable. This will enable copying the Observable aspect of the class.
...
Also replaced java.util.Observable with org.ofbiz.base.util.Observable. Anyone using the Observable functionality will need to change their imports.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1470392 13f79535-47bb-0310-9956-ffa450edef68
2013-04-22 06:29:19 +00:00
Adrian Crum
41137d0650
Oops, I missed a file in my last commit.
...
Moved the OperationType enum to the Delegator interface so it can be reused.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1470386 13f79535-47bb-0310-9956-ffa450edef68
2013-04-22 05:02:03 +00:00
Adrian Crum
94be7afbff
Moved the OperationType enum to the Delegator interface so it can be reused.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1470385 13f79535-47bb-0310-9956-ffa450edef68
2013-04-22 04:52:52 +00:00
Adrian Crum
9d914eda61
Remove Javolution from GenericPK.java.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1470383 13f79535-47bb-0310-9956-ffa450edef68
2013-04-22 03:46:30 +00:00
Adrian Crum
3ed3b1238b
Added an entity cache unit test.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1470274 13f79535-47bb-0310-9956-ffa450edef68
2013-04-21 09:02:13 +00:00
Adrian Crum
2f5023231a
Small optimization in GenericDelegator makeValidValue method - invoke GenericValue.setAllFields once instead of twice.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1467752 13f79535-47bb-0310-9956-ffa450edef68
2013-04-14 09:41:48 +00:00
Adrian Crum
65d38cdaf6
Removed most of Javolution from the entity engine. There are some Javolution classes I am not familiar with, so I will replace those after I do some research.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1467744 13f79535-47bb-0310-9956-ffa450edef68
2013-04-14 08:16:46 +00:00
Adrian Crum
055f996b8e
Revert some unintentional changes from my last commit.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1465431 13f79535-47bb-0310-9956-ffa450edef68
2013-04-07 17:22:59 +00:00
Adrian Crum
03084330a8
Merged rev 1462755 from the 2013_RemoveJavolution branch.
...
Removed Javolution from Mini-language.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1465427 13f79535-47bb-0310-9956-ffa450edef68
2013-04-07 17:15:10 +00:00
Adrian Crum
24f64fe28b
Log message cleanup in ModelReader.java.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1463859 13f79535-47bb-0310-9956-ffa450edef68
2013-04-03 07:55:02 +00:00
Jacques Le Roux
7c323b902d
A refactored patch from Leon for "Bug introduced by OFBIZ-4769, it makes <entity-one> failed if the context contains incorrect data" https://issues.apache.org/jira/browse/OFBIZ-5148
...
How to reproduce:
1. open "https://demo-trunk.ofbiz.apache.org/partymgr/control/editpartygroup?create_new=Y " (try to create a new party group)
2. input any words in group name field, input any "incorrect" non-digits characters (e.g. "abcd" blah blah) to field "Annual revenue"
3. click save
It leads to an "exception" page instead of original input form with error message.
I digged some codes and found it's related to r1426231 commit (of OFBIZ-4769).
jleroux: the logic of code seemed good to me, I just refactored the cod a bit (in a previous refactoring attempt I missed the point that parametersObjExists might not be present. This new code is a simplified version of what does setAllFields internally. The PK fieldValues are set before being possibly overriden by context values. There is no Map casting. I tested the previous issues, all are resolved.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1462948 13f79535-47bb-0310-9956-ffa450edef68
2013-03-31 13:41:34 +00:00
Jacques Le Roux
0e341837a5
Revert r1462902, there are 3 tests failing and I have not the time to look at it yet
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1462912 13f79535-47bb-0310-9956-ffa450edef68
2013-03-31 10:27:41 +00:00
Jacques Le Roux
a4d71dd61e
A refactored patch from Leon for "Bug introduced by OFBIZ-4769, it makes <entity-one> failed if the context contains incorrect data" https://issues.apache.org/jira/browse/OFBIZ-5148
...
How to reproduce:
1. open "https://demo-trunk.ofbiz.apache.org/partymgr/control/editpartygroup?create_new=Y " (try to create a new party group)
2. input any words in group name field, input any "incorrect" non-digits characters (e.g. "abcd" blah blah) to field "Annual revenue"
3. click save
It leads to an "exception" page instead of original input form with error message.
I digged some codes and found it's related to r1426231 commit (of OFBIZ-4769).
jleroux: the logic of code seemed good to me, I just refactored the cod a bit. This new code is a simplified version of what does setAllFields internally. The PK fieldValues are set before being possibly overriden by context values. There is no Map casting. I tested the previous issues, all are resolved.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1462902 13f79535-47bb-0310-9956-ffa450edef68
2013-03-31 09:20:30 +00:00
Paul Foxworthy
efd5104e1d
Fix spelling of successful and some other words
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1460654 13f79535-47bb-0310-9956-ffa450edef68
2013-03-25 13:33:09 +00:00
Paul Foxworthy
94c2bac40f
reapplied Adrian's change r1460455
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1460652 13f79535-47bb-0310-9956-ffa450edef68
2013-03-25 13:26:42 +00:00
Paul Foxworthy
0079816733
Undid r1460637, should be two separate commits
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1460647 13f79535-47bb-0310-9956-ffa450edef68
2013-03-25 13:14:10 +00:00
Paul Foxworthy
4882b2b62d
Add grams to Product Shipment Uom labels (Jira OFBIZ-5154)
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1460637 13f79535-47bb-0310-9956-ffa450edef68
2013-03-25 12:46:16 +00:00
Adrian Crum
cd9808ddb3
Enable FETCH and OFFSET keywords for Derby database.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1460455 13f79535-47bb-0310-9956-ffa450edef68
2013-03-24 20:23:27 +00:00
Jacopo Cappellato
08166bdc4c
Unified redundant blocks "if (Debug.infoOn())" into one to improve readability of code: no functional changes.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1460275 13f79535-47bb-0310-9956-ffa450edef68
2013-03-24 07:25:56 +00:00
Jacopo Cappellato
bd81b76dd8
Minor fix to indentation and to a typo in a comment.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1460274 13f79535-47bb-0310-9956-ffa450edef68
2013-03-24 07:16:43 +00:00
David E. Jones
1c6adf2f0a
Fixed issue with deserialization from XML of an entity value with null fields
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1458429 13f79535-47bb-0310-9956-ffa450edef68
2013-03-19 17:48:28 +00:00
Jacques Le Roux
56c153168a
A patch from Nicolas Malin for "Adding unit test for new element to load data" https://issues.apache.org/jira/browse/OFBIZ-5112
...
With the issue commit OFBIZ-4949, it' necessary to complete unit test on this feature.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1449279 13f79535-47bb-0310-9956-ffa450edef68
2013-02-23 08:26:21 +00:00
Jacques Le Roux
8afa159480
A patch from Chatree Srichart for "Ignore "tenant" data files if the multitenant property is "N"" https://issues.apache.org/jira/browse/OFBIZ-4934
...
The system does not need to load tenant data files if the multitenant property in general.properties is "N". I created a patch to ignore the tenant data files when run ./ant load-demo command.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1444370 13f79535-47bb-0310-9956-ffa450edef68
2013-02-09 14:39:29 +00:00
Jacques Le Roux
8e737e4107
At Jacopo's request assign PoolableConnectionFactory super class rather
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1431249 13f79535-47bb-0310-9956-ffa450edef68
2013-01-10 10:02:58 +00:00
Jacques Le Roux
787ac84f63
In "Memory leak due to transaction management using DBCP and MySQL" https://issues.apache.org/jira/browse/OFBIZ-5122 Jose Manuel Vivó Arnal reported that I missed to apply the patch from OFBIZ-2599, just handled the DBPC part, and Philippe Mouawad did not notice.
...
OK, so it was just a matter of replacing
PoolableConnectionFactory factory = new PoolableConnectionFactory(xacf, pool, null, null, true, true);
by
PoolableManagedConnectionFactory factory = new PoolableManagedConnectionFactory(xacf, pool, null, null, true, true);
The rest are only imports cleaning.
Too bad we did not notice that for 3.5 years. It seems it does not affect servers with plenty of memory, or updated often enough. But I recommend to upgrade of course...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1431191 13f79535-47bb-0310-9956-ffa450edef68
2013-01-10 05:32:48 +00:00
Jacques Le Roux
d1e94dde53
A patch from Deepak Dixit "Editing of product suppliers is not working for the Germany locale" https://issues.apache.org/jira/browse/OFBIZ-4769
...
Thanks to Christian, Paul, Deepak, Adrian and I :)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1426231 13f79535-47bb-0310-9956-ffa450edef68
2012-12-27 15:51:10 +00:00
Hans Bakker
68d5842339
Nice contribution from Nicolas, now be able to modify and delete database records using the framework import function: https://issues.apache.org/jira/browse/OFBIZ-4949
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1425813 13f79535-47bb-0310-9956-ffa450edef68
2012-12-26 04:19:34 +00:00
Jacques Le Roux
5ab0bb220f
Reverts r1425716, 3 tests don't pass.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1425731 13f79535-47bb-0310-9956-ffa450edef68
2012-12-25 09:06:51 +00:00
Jacques Le Roux
7069d5e374
Fix "Editing of product suppliers is not working for the Germany locale" https://issues.apache.org/jira/browse/OFBIZ-4769
...
Thanks to Christian, Paul, Deepak and Adrian
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1425716 13f79535-47bb-0310-9956-ffa450edef68
2012-12-25 04:26:42 +00:00
Jacques Le Roux
f4240a19ff
Commented out testLimitOffsetOptions() because it makes the framework dependent on the content component.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1422796 13f79535-47bb-0310-9956-ffa450edef68
2012-12-17 08:46:53 +00:00
Jacques Le Roux
a59da36f7a
A patch from Shi Jinghai for "Support MySQL and Postgres's LIMIT and OFFSET options" https://issues.apache.org/jira/browse/OFBIZ-4346
...
Change the existing code to support the different syntax variations, and add an attribute to the datasource element in the entityengine.xml file so that the proper variation can be chosen for each database.
Inspired by Moqui code. Test successful
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1422221 13f79535-47bb-0310-9956-ffa450edef68
2012-12-15 11:20:13 +00:00
Scott Gray
04df9cb162
Add a bunch of missing Override annotations
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1418651 13f79535-47bb-0310-9956-ffa450edef68
2012-12-08 12:06:40 +00:00
Scott Gray
0af4184d61
Remove a bunch of unnecessary casts
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1418650 13f79535-47bb-0310-9956-ffa450edef68
2012-12-08 12:06:01 +00:00
Scott Gray
f180a447c7
Remove redundant implements declarations where the interface is already implemented by the base class
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1418649 13f79535-47bb-0310-9956-ffa450edef68
2012-12-08 12:04:37 +00:00
Scott Gray
5df3e3f70b
Remove a bunch of unused imports, no functional changes
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1418646 13f79535-47bb-0310-9956-ffa450edef68
2012-12-08 12:03:52 +00:00
Adam Heath
bca838aa2a
OPTIMIZE: Now that absolute() does the correct thing for 0, fix
...
getPartialList() to use absolute(start - 1), instead of working around
the bug itself.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1417213 13f79535-47bb-0310-9956-ffa450edef68
2012-12-04 21:54:49 +00:00
Adam Heath
9c7c925a4c
OPTIMIZE: Remove the use of numRetrieved as a check to see how much has
...
been fetched. Either list.size() could be used, or, even better, just
decrement the number wanted, and continue until everything is fetched.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1417212 13f79535-47bb-0310-9956-ffa450edef68
2012-12-04 21:54:42 +00:00
Adam Heath
7228abe497
TYPO: s/numRetreived/numRetrieved/
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1417211 13f79535-47bb-0310-9956-ffa450edef68
2012-12-04 21:54:35 +00:00
Adam Heath
fc81ed5fb1
FIX: Some jdbc drivers don't like absolute(0), even though this is
...
allowed. As such, call beforeFirst() instead. Technically, these
broken jdbc drivers should have the same kind of work-around.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1417210 13f79535-47bb-0310-9956-ffa450edef68
2012-12-04 21:54:28 +00:00
Jacques Le Roux
0323d6f48c
No functional changes, just organizes imports
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1387567 13f79535-47bb-0310-9956-ffa450edef68
2012-09-19 12:55:58 +00:00
Jacques Le Roux
678a145d75
A patch from Chatree Srichart for "Fields in extended entity do not override attribute enable-audit-log" https://issues.apache.org/jira/browse/OFBIZ-4844
...
Tested with NoteData.noteParty
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1381559 13f79535-47bb-0310-9956-ffa450edef68
2012-09-06 11:24:01 +00:00
David E. Jones
358f61fdbc
Added ext-test and ext-demo to all datasources so that install without specifying readers behaves as expected (ie loads all readers)
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1376379 13f79535-47bb-0310-9956-ffa450edef68
2012-08-23 06:09:36 +00:00
Adrian Crum
25c04f28af
Partially reverting rev 1372738. As Scott pointed out on the dev mailing list, the conditions requiring a cast are rare - rendering those optimizations ineffective.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1373239 13f79535-47bb-0310-9956-ffa450edef68
2012-08-15 07:08:57 +00:00
Adrian Crum
afd4e8b3c0
Small GenericEntity optimization - remove instanceof checks in getXxx methods.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1372738 13f79535-47bb-0310-9956-ffa450edef68
2012-08-14 06:02:58 +00:00
Erwan de Ferrieres
342c56d85c
correcting javadoc for DynamicViewEntity.java
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1369406 13f79535-47bb-0310-9956-ffa450edef68
2012-08-04 18:47:26 +00:00
Erwan de Ferrieres
ebad9a93df
missing ending } in javadoc
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1367750 13f79535-47bb-0310-9956-ffa450edef68
2012-07-31 20:24:42 +00:00