Commit Graph
8242 Commits
Author SHA1 Message Date
Adam Heath 98b552082b Fetching an index from the database requires the tableName pattern to *not* have the schemaName on the front. So, remove it when querying, but then add it back when checking if the table is allowed.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@949621 13f79535-47bb-0310-9956-ffa450edef68
2010-05-30 22:08:18 +00:00
Adam Heath 83507c3b2e In getIndexInfo, moved the lookupSchemaName calculation outside of the loop, as there is no way it could change at runtime.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@949620 13f79535-47bb-0310-9956-ffa450edef68
2010-05-30 22:08:12 +00:00
Adam Heath c16c805359 Refactored several getConnection() calls; if the caller added an error message, then it got refactored.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@949619 13f79535-47bb-0310-9956-ffa450edef68
2010-05-30 22:08:07 +00:00
Adam Heath 93ec48f7e8 Add new variants of makeHavingWhereString that take a StringBuilder, and deprecate the old versions that don't.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@949618 13f79535-47bb-0310-9956-ffa450edef68
2010-05-30 22:08:01 +00:00
Adam Heath ea2ce99f4a Add new variants of makeConditionWhereString that take a StringBuilder, and deprecate the old versions that don't.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@949617 13f79535-47bb-0310-9956-ffa450edef68
2010-05-30 22:07:55 +00:00
Adam Heath 99fdeabe24 Add new variants of makeWhereStringFromFields that take a StringBuilder, and deprecate the old versions that don't.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@949616 13f79535-47bb-0310-9956-ffa450edef68
2010-05-30 22:07:50 +00:00
Adam Heath fac74c24b8 Add new variants of fieldsStringList that take a StringBuilder, and deprecate the old versions that don't.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@949615 13f79535-47bb-0310-9956-ffa450edef68
2010-05-30 22:07:44 +00:00
Adam Heath 216a1a29d7 Add new variants of colNameString that take a StringBuilder, and deprecate the old versions that don't.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@949614 13f79535-47bb-0310-9956-ffa450edef68
2010-05-30 22:07:36 +00:00
Adam Heath 4bb8795838 Optimize groupBy insertion a bit, to keep from having to make a copy of the groupBy list.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@949612 13f79535-47bb-0310-9956-ffa450edef68
2010-05-30 22:07:29 +00:00
Adam Heath 7e31d0b8e3 Fix instances of String+String while appending to a StringBuilder/StringBuffer.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@949611 13f79535-47bb-0310-9956-ffa450edef68
2010-05-30 22:07:23 +00:00
Adam Heath c8a6d783aa Remove double assignment to addParens(slight optimization/code refactor).
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@949610 13f79535-47bb-0310-9956-ffa450edef68
2010-05-30 22:07:16 +00:00
Adam Heath feef6caffc Use the new equals implementations to test for a correct parse; also
test all the statements.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@949609 13f79535-47bb-0310-9956-ffa450edef68
2010-05-30 22:07:10 +00:00
Adam Heath 17d8151d34 Allow fieldAlls, fieldDefs, and relations to be null; if they are empty,
then force them to null instead.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@949608 13f79535-47bb-0310-9956-ffa450edef68
2010-05-30 22:07:04 +00:00
Adam Heath a24bab15cf Only output the alias if it is not the same as the default name.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@949607 13f79535-47bb-0310-9956-ffa450edef68
2010-05-30 22:06:58 +00:00
Adam Heath 40cff7fd7b Implement equals() in a bunch of places.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@949606 13f79535-47bb-0310-9956-ffa450edef68
2010-05-30 22:06:53 +00:00
Adam Heath 69de194305 Convert operators to lowercase in the constructors that have them,
instead of only during parsing; this fixes instances where the objects
are not constructed by the sql parser.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@949605 13f79535-47bb-0310-9956-ffa450edef68
2010-05-30 22:06:42 +00:00
Adam Heath 4a31886e82 Fix operator parsing; only the last character was being parsed as the
operator.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@949604 13f79535-47bb-0310-9956-ffa450edef68
2010-05-30 22:06:36 +00:00
Adam Heath ddb9bf8b27 Remove FieldDefFieldValue, and merge FieldDefValue into FieldDef.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@949603 13f79535-47bb-0310-9956-ffa450edef68
2010-05-30 22:06:31 +00:00
Adam Heath 8c083d6743 Make the Order enum public.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@949602 13f79535-47bb-0310-9956-ffa450edef68
2010-05-30 22:06:23 +00:00
Adam Heath 39ee8befa9 Start adding DISTINCT support to SELECT.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@949600 13f79535-47bb-0310-9956-ffa450edef68
2010-05-30 22:06:17 +00:00
Adam Heath 36bed586b9 Add support for several count function variants.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@949599 13f79535-47bb-0310-9956-ffa450edef68
2010-05-30 22:06:11 +00:00
Jacques Le Roux f8699d535d A patch from Atul Vani for an issue reported by Soumya Jyoti Guru at http://markmail.org/message/whb4am3n6ngsuwgk. It's related to https://issues.apache.org/jira/browse/OFBIZ-3667 - OFBIZ-3667
Atul's note: I noticed some strange behavior (like there's little shifting of elements).
Jacques's note: I noticed them too (it's in the calling form or layer) but it's far better than before and IMO acceptable

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@949174 13f79535-47bb-0310-9956-ffa450edef68
2010-05-28 13:27:36 +00:00
Jacques Le Roux 47b0020afe A patch from Ankit Jain, removes useless redundant <request-map uri="authview">, it's now in the common controller(https://issues.apache.org/jira/browse/OFBIZ-3469) - OFBIZ-3469
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@949142 13f79535-47bb-0310-9956-ffa450edef68
2010-05-28 10:30:46 +00:00
Jacques Le Roux 6193dd4e53 <author>None</author> is totally useless and we don't need an author OOTB
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@949101 13f79535-47bb-0310-9956-ffa450edef68
2010-05-28 05:41:23 +00:00
Jacques Le Roux eccde35aa0 Do we really need to have an <owner> element there? At least OOTB it's always empty
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@949100 13f79535-47bb-0310-9956-ffa450edef68
2010-05-28 05:38:25 +00:00
Scott Gray e5551546f0 Be a little more explicit about what didn't return success when a preprocessor event fails
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@949088 13f79535-47bb-0310-9956-ffa450edef68
2010-05-28 03:30:47 +00:00
Jacques Le Roux 63fd94e778 Not sure why, but my regexp S/R in the commit r948846 boke some formatting. I also removed some useless other stuff in this commit
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@948852 13f79535-47bb-0310-9956-ffa450edef68
2010-05-27 14:45:59 +00:00
Jacques Le Roux 2a1a5aee14 We don't need
<copyright>Copyright 2001-.* The Apache Software Foundation</copyright>
<copyright><year>.*</year><holder>Apache Foundation</holder></copyright>
<copyright><year>.*</year><holder>Apache Foundation.</holder></copyright>
<owner>Copyright 2001-.* The Apache Software Foundation</owner>

Less to update every year!

Thanks to BJ 1st effort at "update files from 2009 to 2010" (https://issues.apache.org/jira/browse/OFBIZ-3783) - OFBIZ-3783

Note: there are been a lot of efforts in 2009: there are plenty of data dated from this year!

I hope I did not broke anything (should not, but of course I did not try all changes...) Anyway, this can be easily reverted...

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@948846 13f79535-47bb-0310-9956-ffa450edef68
2010-05-27 14:23:22 +00:00
Jacques Le Roux c1e14e1a35 A patch from Sascha Rodekamp "Identifying the website id" (https://issues.apache.org/jira/browse/OFBIZ-3784) - OFBIZ-3784
Sascha : here is a little patch to improve the identification of the websites. The original method seems a little bit bare.
Jacques: I can't see any problems with this improvement, though I did not test all cases



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@948761 13f79535-47bb-0310-9956-ffa450edef68
2010-05-27 10:23:30 +00:00
David E. Jones 0c3b76171d Added removeUserPreference service, needed because you can't pass an empty value to the set service to clear out preferences, also this actually removes the record
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@948697 13f79535-47bb-0310-9956-ffa450edef68
2010-05-27 07:18:59 +00:00
Jacques Le Roux c974d3224e A patch from Sascha Rodekamp "The position attribute (at least center) does not work when used in a lookup called from another lookup " (https://issues.apache.org/jira/browse/OFBIZ-3781) - OFBIZ-3781
Here is a little patch to fix the center issue. I had to remove some code which is not needed anymore.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@948694 13f79535-47bb-0310-9956-ffa450edef68
2010-05-27 07:07:05 +00:00
Erwan de Ferrieres f9c4de5efc Avoiding possible errors when adding portlets via web interface and logged as admin
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@948479 13f79535-47bb-0310-9956-ffa450edef68
2010-05-26 15:47:47 +00:00
Jacques Le Roux 52520adaab Clean imports, I also wondered if we should keep addAllFileTableValues which is not used internally (hence I guess useless) but I finally stopped as there were also some other Type Safety warnings and I did not have time to continue.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@948460 13f79535-47bb-0310-9956-ffa450edef68
2010-05-26 14:48:00 +00:00
Adam Heath 6e07055341 Re-apply 948328, which brings us back to using the more efficient clhm,
but now UtilCache is not strictly least-recently-used.  Instead, it's
more of a less-recently-used.  This difference can be seen when reducing
the max-in-memory setting(but not reducing completely to 0).

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@948449 13f79535-47bb-0310-9956-ffa450edef68
2010-05-26 14:23:11 +00:00
Adam Heath 39faca3863 Allow for dynamic registering of additional operators for extensions.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@948448 13f79535-47bb-0310-9956-ffa450edef68
2010-05-26 14:23:03 +00:00
Adam Heath 14b1bc46a7 Remove unneeded cast.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@948447 13f79535-47bb-0310-9956-ffa450edef68
2010-05-26 14:22:57 +00:00
Adam Heath 6a9efe212d Remove synchronized on masterClassManagers, switching to
FastMap(non-blocking).

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@948446 13f79535-47bb-0310-9956-ffa450edef68
2010-05-26 14:22:51 +00:00
Adam Heath c2a39dcb52 Remove synchronized on staticTimers access(non-blocking).
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@948444 13f79535-47bb-0310-9956-ffa450edef68
2010-05-26 14:22:46 +00:00
Adam Heath 3ffebd5910 Always set memberModelEntities; there's no reason to check for null, as
the population methods always get called during construction anways.
This was discovered while looking at code coverage.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@948443 13f79535-47bb-0310-9956-ffa450edef68
2010-05-26 14:22:40 +00:00
Adam Heath b861401e71 Fix view entities that have view entities as members, with complex aliases, or functions on the nested view.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@948442 13f79535-47bb-0310-9956-ffa450edef68
2010-05-26 14:22:34 +00:00
Adam Heath 4488c44a32 Add support for UPPER and LOWER functions in index fields.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@948440 13f79535-47bb-0310-9956-ffa450edef68
2010-05-26 14:22:21 +00:00
Adam Heath 9ea996dcb8 There is no reason to convert the controller xml url to a file first.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@948439 13f79535-47bb-0310-9956-ffa450edef68
2010-05-26 14:22:14 +00:00
Adam Heath d945ef3d65 Add putIfAbsent method; disk-based variant of this method is not yet
tested.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@948333 13f79535-47bb-0310-9956-ffa450edef68
2010-05-26 06:04:59 +00:00
Adam Heath 464c710f02 JDBM isn't multi-thread safe, so protect against concurrent access.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@948332 13f79535-47bb-0310-9956-ffa450edef68
2010-05-26 06:04:52 +00:00
Adam Heath bb2d32984f Inline postRemove, it's only called from one place.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@948331 13f79535-47bb-0310-9956-ffa450edef68
2010-05-26 06:04:45 +00:00
Adam Heath 95e6fc9f7d Revert "As suggested by Ben Manes at "Upgrade ConcurrentLinkedHashMap" (https://issues.apache.org/jira/browse/OFBIZ-3779) - OFBIZ-3779"
The new library does *not* function correctly.  It breaks the
testChangeMemSize test case.  Reducing the memory size *must* still obey
the LRU settings; the new library removes items at random.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@948328 13f79535-47bb-0310-9956-ffa450edef68
2010-05-26 05:52:11 +00:00
Jacques Le Roux 7aaf80b6c2 Fix a bug introduced while updating ConcurrentLinkedHashMap implementation at r947993. Reported by Christian on dev ML.
I used the default Weigher (see JavaDoc)

BTW this new implementation is really faster (tried with ArtifactInfo)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@948037 13f79535-47bb-0310-9956-ffa450edef68
2010-05-25 13:38:39 +00:00
Jacques Le Roux 8a9c6ea716 As suggested by Ben Manes at "Upgrade ConcurrentLinkedHashMap" (https://issues.apache.org/jira/browse/OFBIZ-3779) - OFBIZ-3779
The UtilCache class should use v1.0 of the CLHM library. While the previous version is fully functional, I am no longer supporting it. The new design should be faster and more reliable due to not needing to use a pseudo LRU algorithm for performance (which has degradation scenarios). A true LRU is now supported with no lock contention issues. Please consider upgrading when convenient.

http://code.google.com/p/concurrentlinkedhashmap/

JavaDoc:
http://concurrentlinkedhashmap.googlecode.com/svn/wiki/release-1.0-LRU/index.html

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@947993 13f79535-47bb-0310-9956-ffa450edef68
2010-05-25 10:08:04 +00:00
Jacques Le Roux f59221875d Fix a bug due to multi-tenant introduction. I guess this bug appears only if you use the multi-tenant mode.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@947988 13f79535-47bb-0310-9956-ffa450edef68
2010-05-25 09:53:56 +00:00
Erwan de Ferrieres 002a8ed79f Adding generic service messages for error/succes, so any service could use them
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@947611 13f79535-47bb-0310-9956-ffa450edef68
2010-05-24 11:50:10 +00:00