Commit Graph
469 Commits
Author SHA1 Message Date
Jacques Le Roux 569a4afeea Some cleaning related to isEmpty
* remove duplicate ()
* remove casts no longer needed

I'm doing these last tasks around isEmpty and isNotEmpty mostly to be sure that nothing has slipped in. Despite I have been very careful, I prefer double check.

+ one typo in ofbizSelenium help (not sure this file is used yet though, seems to be missing some parts which are commented out, for now I guess)



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@885093 13f79535-47bb-0310-9956-ffa450edef68
2009-11-28 14:08:16 +00:00
Adam Heath e650de55f1 Fix build error, caused by bad merge from an old branch.
GenericDelegator was used instead of Delegator.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@884373 13f79535-47bb-0310-9956-ffa450edef68
2009-11-26 02:30:10 +00:00
Adam Heath 1d148ce235 Helper method to fetch all rows/values from a query.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@884363 13f79535-47bb-0310-9956-ffa450edef68
2009-11-26 01:33:38 +00:00
Adam Heath 586bedfa70 for all doTransaction helpers, change Throwable to
GenericEntityException.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@884362 13f79535-47bb-0310-9956-ffa450edef68
2009-11-26 01:33:03 +00:00
Adam Heath 3a6becca71 For unimplemented values, show the class name as well.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@884361 13f79535-47bb-0310-9956-ffa450edef68
2009-11-26 01:32:25 +00:00
Adam Heath 1599de6d2c Handle null values during planning of conditions.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@884360 13f79535-47bb-0310-9956-ffa450edef68
2009-11-26 01:31:38 +00:00
Jacques Le Roux ebf6dc2efa Fix a typo in JavaDoc found by Eclipse
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@884251 13f79535-47bb-0310-9956-ffa450edef68
2009-11-25 20:31:38 +00:00
Jacques Le Roux 13ab0a310b Use log verbose as suggested by Scott in https://issues.apache.org/jira/browse/OFBIZ-3107
+ SuppressWarnings("serial")
+ a typo

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@884047 13f79535-47bb-0310-9956-ffa450edef68
2009-11-25 11:15:16 +00:00
Adrian Crum 0b269f4296 Improved entity engine Blob test.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@883882 13f79535-47bb-0310-9956-ffa450edef68
2009-11-24 21:24:10 +00:00
Jacques Le Roux 3bc058cef7 Replaces a not needed call to isEmpty()
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@883682 13f79535-47bb-0310-9956-ffa450edef68
2009-11-24 13:10:38 +00:00
Jacques Le Roux e25f58f02d Scott detected that UtilValidate.is(Not)Empty did not exist for CharSequence and reverted changes I did in EntitySaxReader.java
This commit adds UtilValidate.is(Not)Empty for CharSequence; and uses it in EntitySaxReader.java and everywhere else it might still be used (because of my changes)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@883634 13f79535-47bb-0310-9956-ffa450edef68
2009-11-24 09:24:32 +00:00
Scott Gray 01ca7f002b Revert Jacques changes to EntitySaxReader.java from r883549 and 883507, the UtilValidate.is(Not)Empty methods are not setup to test CharSequence instances. Hopefully there aren't too many more out there.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@883613 13f79535-47bb-0310-9956-ffa450edef68
2009-11-24 07:43:18 +00:00
Jacques Le Roux c72b29cb1f Use UtilValidate.isNotEmpty methods instead of (obj != null) || (obj.length > 0) and (obj != null) || (obj.size > 0)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@883549 13f79535-47bb-0310-9956-ffa450edef68
2009-11-23 23:41:34 +00:00
Jacques Le Roux 5518e9baf8 Use UtilValidate.isEmpty methods instead of (obj == null) || (obj.size == 0)
Complete r883492

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@883516 13f79535-47bb-0310-9956-ffa450edef68
2009-11-23 22:02:05 +00:00
Jacques Le Roux 4e0d303e06 Use UtilValidate.isEmpty methods instead of (obj == null) || (obj.length == 0)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@883507 13f79535-47bb-0310-9956-ffa450edef68
2009-11-23 21:42:18 +00:00
Jacques Le Roux 8ae9319710 Use UtilValidate.isEmpty methods instead of (obj == null) || (obj.size == 0)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@883492 13f79535-47bb-0310-9956-ffa450edef68
2009-11-23 20:34:27 +00:00
Adam Heath 6e0fcf060a No longer access utilCacheTable from AbstractCache; this nescessatited
creating a getOrCreateUtilCache helper method.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@883225 13f79535-47bb-0310-9956-ffa450edef68
2009-11-23 03:03:20 +00:00
Adam Heath 95264791c2 Move getCacheName out of the synchronized block.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@883224 13f79535-47bb-0310-9956-ffa450edef68
2009-11-23 03:02:27 +00:00
Adam Heath 760632627c Add another createUtilCache variant that allows for extra properties to
be looked upped for setting parameters.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@883223 13f79535-47bb-0310-9956-ffa450edef68
2009-11-23 03:01:37 +00:00
Adam Heath 820d11eb97 Deprecate UtilCache constructors, and add a create helper function.
This is the first step to making utilCacheTable concurrent, and
non-blocking.  To do so, the constructor has to have no side-effects.
This means it can't modify utilCacheTable itself; this will be moved to
the helper function created above.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@883217 13f79535-47bb-0310-9956-ffa450edef68
2009-11-23 02:56:28 +00:00
Adam Heath c31e3499ed Add flags to disable joins on DELETE and UPDATE.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@883138 13f79535-47bb-0310-9956-ffa450edef68
2009-11-22 20:07:29 +00:00
Adam Heath 4976cbb3da Plans that have condition objects now store those in the abstract classes.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@883137 13f79535-47bb-0310-9956-ffa450edef68
2009-11-22 20:06:34 +00:00
Adam Heath be7b27b4cf Fix StackOverflowError in EntitySelectPlan.toString.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@883136 13f79535-47bb-0310-9956-ffa450edef68
2009-11-22 20:05:01 +00:00
Jacques Le Roux 1f23dcaae0 A patch from Erwan de FERRIERES "Add an ant task to download the postgreSQL JDBC driver" (https://issues.apache.org/jira/browse/OFBIZ-3232) - OFBIZ-3232
This add a simple ant to download the postgreSQL JDBC driver, to simplify the installation of a database based on this engine
Currently it works only for the last drivers available : postgresql-8.4-701.jdbc4.jar. But this may be easily adapted.

I have also added an svn ignore for postgresql-8.4-701.jdbc4.jar

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@882502 13f79535-47bb-0310-9956-ffa450edef68
2009-11-20 11:06:44 +00:00
Adrian Crum f342a9804b Small fixup for last commit - intern() the field type name.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@882243 13f79535-47bb-0310-9956-ffa450edef68
2009-11-19 18:48:30 +00:00
Adrian Crum fdf56b40b0 Major code cleanup in ModelFieldTypeReader.java. Eliminated unused fields, made public fields protected, simplified code.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@882236 13f79535-47bb-0310-9956-ffa450edef68
2009-11-19 18:16:35 +00:00
Jacques Le Roux dd66fd9dd6 Some itemizedlists and orderedlists in Accounting Help
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@881845 13f79535-47bb-0310-9956-ffa450edef68
2009-11-18 17:39:53 +00:00
Adam Heath 38178273f6 Some space changes.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@881681 13f79535-47bb-0310-9956-ffa450edef68
2009-11-18 06:13:52 +00:00
Jacques Le Roux 9f3e41d975 A patch from Bob Morley "Resolve java warnings exposed in Eclipse : framework - entity" (https://issues.apache.org/jira/browse/OFBIZ-3107) - OFBIZ-3107
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@881669 13f79535-47bb-0310-9956-ffa450edef68
2009-11-18 04:54:18 +00:00
Adam Heath d8c232164f Reworked, no more unchecked warnings, nor suppressions.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@881653 13f79535-47bb-0310-9956-ffa450edef68
2009-11-18 02:55:59 +00:00
Adam Heath c171e23064 Add generics markup to makeWhereClause(modelFields) parameter.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@881652 13f79535-47bb-0310-9956-ffa450edef68
2009-11-18 02:52:11 +00:00
Adam Heath f5009216c1 Implement parameterized value conversion.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@881193 13f79535-47bb-0310-9956-ffa450edef68
2009-11-17 08:31:30 +00:00
Adam Heath 5875284963 And generic condition planning.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@881192 13f79535-47bb-0310-9956-ffa450edef68
2009-11-17 08:30:46 +00:00
Adam Heath 60c960a795 Handle nested alias.fieldName, which happens when nested conditions
exist.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@881191 13f79535-47bb-0310-9956-ffa450edef68
2009-11-17 08:29:23 +00:00
Adam Heath e2e43bf9e9 Move the condition parsing code to a separate class.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@881190 13f79535-47bb-0310-9956-ffa450edef68
2009-11-17 08:28:35 +00:00
Adam Heath 2e3757ffc1 Convert Planner from an interface to a class.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@881189 13f79535-47bb-0310-9956-ffa450edef68
2009-11-17 08:26:58 +00:00
Adrian Crum 5832bcd719 Small performance enhancement to the entity engine converter code. If a SQL->Java converter is needed, keep a reference to it in ModelFieldType.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@880957 13f79535-47bb-0310-9956-ffa450edef68
2009-11-16 21:09:34 +00:00
Adam Heath 35edfbc498 Removed space from jar name.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@880879 13f79535-47bb-0310-9956-ffa450edef68
2009-11-16 18:00:46 +00:00
Adam Heath 91050d9263 Very large update. SQL parser is fairly generic now. Can parse sql
that is compatible with features used by ofbiz.  Has support for
DELETE, INSERT, INSERT SELECT, SELECT, UPDATE, and VIEW.

Modified the delegator side of the above to handle the new
interfaces.  Now supports complex alias.  Only SELECT is supported,
and the parseCondition code is disabled for the time being.

The plan(sic) here is to obviously support the other sql statements.
Then, to have a jdbc wrapper around all this, so external tools, that
only know how to talk jdbc, can actually talk directly to the
delegator.

Plus, many more people can understand sql syntax.  This allows them
to do things with ofbiz, that they would find much more difficult if
they had to write <view-entity> definitions.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@880835 13f79535-47bb-0310-9956-ffa450edef68
2009-11-16 16:31:32 +00:00
Adrian Crum 10f5cf54d7 The first step in getting the entity engine to use the new Java object type conversion code. Right now it only works while getting values from the database.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@836415 13f79535-47bb-0310-9956-ffa450edef68
2009-11-15 20:47:42 +00:00
Adam Heath 14c9b6f7f4 Support complex aliases now. Note, that string default values do not
work corretly, and ModelViewEntity does not do any encoding of the
value, and this parser doesn't handle that.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@836088 13f79535-47bb-0310-9956-ffa450edef68
2009-11-14 01:15:56 +00:00
Adam Heath 6003fb0cf5 Helper method to add several complex alias members.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@836086 13f79535-47bb-0310-9956-ffa450edef68
2009-11-14 01:14:49 +00:00
Adam Heath 8be78c2804 Add aggregate function support for field definitions.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@836073 13f79535-47bb-0310-9956-ffa450edef68
2009-11-14 00:13:09 +00:00
Jacques Le Roux 2e4130844b commons-dbcp-1.3-20091113-r835956 .jar replaces commons-dbcp-1.3-20080708-r674758.jar
Built directly from DBCP trunk. Compiles with jdk 1.5 and 1.6 as well, runs also with both

An initiative from Philippe Mouawad at "Memory leak due to transaction management" (https://issues.apache.org/jira/browse/OFBIZ-2599) - OFBIZ-2599

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@836015 13f79535-47bb-0310-9956-ffa450edef68
2009-11-13 22:00:12 +00:00
Adam Heath d17a8bf5c6 Make AND have a higher priority than OR.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@835938 13f79535-47bb-0310-9956-ffa450edef68
2009-11-13 17:44:44 +00:00
Adam Heath 8bafb94b7e Implement list values, and handle between(needed to be special cased).
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@835934 13f79535-47bb-0310-9956-ffa450edef68
2009-11-13 17:28:35 +00:00
Adam Heath cc340041ce Implement relations in xml output.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@835933 13f79535-47bb-0310-9956-ffa450edef68
2009-11-13 17:27:29 +00:00
Jacques Le Roux 6e89a069e7 Revert r835394 (DBCP upgrade, issue compiling with jdk 1.5 OOTB)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@835801 13f79535-47bb-0310-9956-ffa450edef68
2009-11-13 10:28:29 +00:00
Adam Heath b33013c644 Add shorthand for keymap lists, making use of "USING".
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@835792 13f79535-47bb-0310-9956-ffa450edef68
2009-11-13 09:47:58 +00:00
Adam Heath 4a141e10fe Add <TYPE> to NamePart(); the other words should also be added here.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@835787 13f79535-47bb-0310-9956-ffa450edef68
2009-11-13 09:21:41 +00:00