Commit Graph
198 Commits
Author SHA1 Message Date
Adam Heath 06b236adae Fix breakage with IN type operations.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@687936 13f79535-47bb-0310-9956-ffa450edef68
2008-08-22 04:00:57 +00:00
Scott Gray 64c7041d3f Reverted 687578, which will at least take the problem back to a minor bug rather than a major one, sorry everyone
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@687918 13f79535-47bb-0310-9956-ffa450edef68
2008-08-22 01:09:14 +00:00
Scott Gray fd0e5ee7c0 Reverted some of the recent generics work which seems to be causing the issues reported in the user mailing lists by BJ Freeman and Sharan Foga.
Adam, it would be great if you could take another look at this

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@687578 13f79535-47bb-0310-9956-ffa450edef68
2008-08-21 06:31:02 +00:00
Adrian Crum ead3169d5c FlexibleStringExpander refactor.
1. Improved parsing logic - the entire expression is pre-parsed now.
2. Factory method stores parsed expressions in the cache.
3. Single null/empty expression instance - saves on memory.
4. Class names and variable names shortened to reduce object size.
5. Small performance improvements.

The expression cache is set up with no limit. We'll have to see if that needs to be changed. Larger installations might need to limit the expression cache size.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@687422 13f79535-47bb-0310-9956-ffa450edef68
2008-08-20 18:50:04 +00:00
Jacques Le Roux e7905f2c8c Fix the anti-pattern
if (* != null && *.size() > 0) { 
where * is a variable name (String or Collection). Rewritten to
    if (UtilValidate.isNotEmpty(*)) {

Done with Eclipse regex replace feature with
search = if \((\w+) *!= *null *&& *(\w+)\.size\(\) *> *0\) *\{
replace = if (UtilValidate.isNotEmpty($1)) {

And of course some hand-work for imports and cleaning. I compiled and tested with ant run-tests

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@686591 13f79535-47bb-0310-9956-ffa450edef68
2008-08-17 07:47:18 +00:00
Adam Heath 2527b104a9 More FlexibleMapAccessor fallout.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@682103 13f79535-47bb-0310-9956-ffa450edef68
2008-08-03 05:17:15 +00:00
Adam Heath 049ffce626 Continuing with generics.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@682056 13f79535-47bb-0310-9956-ffa450edef68
2008-08-02 21:38:01 +00:00
Jacopo Cappellato fa9f0a3253 The default-group-name is now returned by the group name methods of ModelGroupReader.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@679331 13f79535-47bb-0310-9956-ffa450edef68
2008-07-24 09:43:27 +00:00
David E. Jones 2ccff0b5d8 An option I've resisted for a while due to limited flexibility when used, but we have a lot of these common cases so this may be worth it; can now define CrUD services and not have to implement them for common cases; the create, update, and delete ExampleItem services now use this entity-auto implementation instead of explicit simple-methods; those are tested and are working, and other variations on create should too but I haven't tested them yet; this also includes various refactorings to expose nderlying tools in simple method code and make it reusable
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@679058 13f79535-47bb-0310-9956-ffa450edef68
2008-07-23 10:24:58 +00:00
Jacques Le Roux 641ff10050 Update Copyright to 2008
A real replace in files feature was one of the reasons I use Eclipse 3.4 for near a year now (I even helped to test, a real must have :o)
Not sure previous commit was sent partially or not at all (I needed to update)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@677685 13f79535-47bb-0310-9956-ffa450edef68
2008-07-17 18:56:25 +00:00
Jacopo Cappellato 5d6c346935 Fixed bug reported by Jacques Le Roux in the ML.
The issue was this: when all the entity-group entries for the default group ("org.ofbiz") are removed by all the components, the system was not considering the "org.ofbiz" group for the initialization of the data base.
Also removed the last entity-group definition for the assetmaint component (that was there as a workaround for the above bug).


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@676933 13f79535-47bb-0310-9956-ffa450edef68
2008-07-15 14:59:56 +00:00
David E. Jones 1e02794cbb Added small convenience method to get total size of results after getting a partial list
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@673024 13f79535-47bb-0310-9956-ffa450edef68
2008-07-01 08:50:58 +00:00
David E. Jones ad54c6c454 Improved error messages in a few places so that hopefully more people will be able to figure it out when they don't have a datasource setup for a group of entities
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@673019 13f79535-47bb-0310-9956-ffa450edef68
2008-07-01 08:03:44 +00:00
David E. Jones 5c20cb2b33 Removed hack fix for getting a count of results when there is a GROUP BY in the select; now lets the database do the count instead of iterating through every single result in order to get the count, so is WAY more efficient; note that this also uses the COUNT(1) instead of COUNT(*) approach for better performance, ie getting the same result but asking the database to do less
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@673014 13f79535-47bb-0310-9956-ffa450edef68
2008-07-01 07:42:26 +00:00
David E. Jones 3797437015 Changed to support a default-group-name per delegator, so that they don't have to specified for each entity; also some cleanups of the DelegatorInterface to remove deprecated stuff and add some new things, I still don't think that needs to exist but oh well
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@672821 13f79535-47bb-0310-9956-ffa450edef68
2008-06-30 17:04:43 +00:00
Adam Heath 9e19c41379 More generics warnings silenced.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@672805 13f79535-47bb-0310-9956-ffa450edef68
2008-06-30 16:05:41 +00:00
Adam Heath 33badc95fa Some minor 1.5 updates, generics/valueOf.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@672802 13f79535-47bb-0310-9956-ffa450edef68
2008-06-30 15:57:40 +00:00
Adam Heath 1e7ccd10ad More Number.valueOf uses.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@672798 13f79535-47bb-0310-9956-ffa450edef68
2008-06-30 15:40:55 +00:00
Adam Heath 32e7c79046 More Number.valueOf work.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@672706 13f79535-47bb-0310-9956-ffa450edef68
2008-06-30 04:57:44 +00:00
Adam Heath 768d92436a Fix double get in getDouble(no pun intended).
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@672704 13f79535-47bb-0310-9956-ffa450edef68
2008-06-30 04:45:20 +00:00
Jacques Le Roux 85a8d6e985 Now, it's obvious that I did not write it myself :D
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@672357 13f79535-47bb-0310-9956-ffa450edef68
2008-06-27 19:07:11 +00:00
Jacques Le Roux b751a6a727 Fix some formatting issues Jacopo reported and I missed before, sorry for that
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@672355 13f79535-47bb-0310-9956-ffa450edef68
2008-06-27 19:03:38 +00:00
Jacques Le Roux 5b941c1fe8 Fix some formatting issues Jacopo reported
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@672198 13f79535-47bb-0310-9956-ffa450edef68
2008-06-27 09:36:04 +00:00
Jacques Le Roux a8a5046719 Fix a Group By bug when using Count (View Entities)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@672191 13f79535-47bb-0310-9956-ffa450edef68
2008-06-27 08:43:00 +00:00
Jacopo Cappellato dbd34520d7 Cleaned up a bunch of warning messages for deprecated methods; in preparation for the framework release.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@671223 13f79535-47bb-0310-9956-ffa450edef68
2008-06-24 15:47:28 +00:00
David E. Jones 91a5ff11ff Removed old funny hex encode and decode routines from StringUtil, as they produced the same results as the commons library; found and fixed the real problem with the old entity engine encryption so that encrypted fields, including credit card numbers, couldn't be decrypted with the new code and it was the hashed key names no longer matched so the wrong DES key was used, ie a different one from the original key used to encrypt even if the original key was still in there; now it tries both, which is necessary because for systems updated before this went in there will be entries using the old DES key and some using the new DES key, so we can't just try one or the other; this should fix problems with credit cards and other encrypted value decryption after updating to fix the password hashing problem from a few weeks ago
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@670731 13f79535-47bb-0310-9956-ffa450edef68
2008-06-23 20:15:27 +00:00
David E. Jones e48ed9ee3c Added decryption try using old hex decoding in the exception catch block, which should catch where this usually needs to happen
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@670225 13f79535-47bb-0310-9956-ffa450edef68
2008-06-21 16:48:35 +00:00
David E. Jones 8beba39849 Fixed problem with old credit card and other old encrypted fields from before fixing the hex encoding, ie using what the rest of the world uses instead of the buggy old hex encoding that was previously used in OFBiz; now credit card numbers and other entity fields that are encrypted should unencrypt properly, ie it tries the new way and if decryption fails then is tries the old way
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@670148 13f79535-47bb-0310-9956-ffa450edef68
2008-06-21 06:07:16 +00:00
Si Chen 9f56b36a18 ofbiz 1826: allow EntityListIterator to be created from jdbc ResultSet
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@666746 13f79535-47bb-0310-9956-ffa450edef68
2008-06-11 17:46:47 +00:00
Andrew Zeneski bc578cce65 changed old usage of tryGenericConnectionSources() to getManagedConnection()
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@663349 13f79535-47bb-0310-9956-ffa450edef68
2008-06-04 19:14:41 +00:00
David E. Jones 670dabded0 Fixed bug reported by Ritesh Trivedi where an encrypted field accessed through a view entity was not decrypted
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@662090 13f79535-47bb-0310-9956-ffa450edef68
2008-05-31 21:34:01 +00:00
David E. Jones a97dcc600a Added further support for javolution ObjectFactory which will bring the efficiency improvements that along with syntax cleanup are part of this whole factory method effort
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@660850 13f79535-47bb-0310-9956-ffa450edef68
2008-05-28 07:58:13 +00:00
David E. Jones 82df3529e2 More cleanups of now deprecated constructors and what what
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@660840 13f79535-47bb-0310-9956-ffa450edef68
2008-05-28 07:16:36 +00:00
David E. Jones b9d6f8b524 Changed EntityExpr and EntityFunction subclasses to use the factory instead of constructor pattern, plus moved EntityExpr to EntityCondition factory methods; a number of EntityExpr cleanups, but many more to go
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@660812 13f79535-47bb-0310-9956-ffa450edef68
2008-05-28 05:20:09 +00:00
David E. Jones 3543d6abe3 Changed the way EntityCondition sub-classes work so they use the javolution Reusable class for recycling objects; now all conditions should be created using the factory methods on the EntityCondition object instead of the direct constructors; there is a small variety of classes available there now for ease of use; also changed a bunch of old code to not use the deprecated constructors; note that still need to do a pass similar to this on EntityExpr
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@660780 13f79535-47bb-0310-9956-ffa450edef68
2008-05-28 01:58:46 +00:00
Adrian Crum a3536990f1 Locale and Time Zone refactor and bug fixes.
1. Modified the Start class to initialize the JVM default locale and time zone - configurable through start.properties. Removed calls to UtilDateTime.getDefaultTimeZone() - no longer needed.

2. Changed all calls to ObjectType.simpleTypeConvert(...) that didn't supply the necessary Locale and TimeZone objects. This fixes a lot of localization issues, https://issues.apache.org/jira/browse/OFBIZ-1696 being one of them.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@658045 13f79535-47bb-0310-9956-ffa450edef68
2008-05-19 23:50:14 +00:00
David E. Jones 349f9518ca Removed deprecate from DynamicViewEntity call; was a little too aggressive on that; thanks to Scott for the heads up
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@655242 13f79535-47bb-0310-9956-ffa450edef68
2008-05-11 04:55:54 +00:00
Scott Gray 153653615b Removed the rest of the calls to deprecated GenericDelegator methods, except for the findListIteratorByCondition which takes a DynamicViewEntity as a parameter not sure what to do about that one.
There's still all the bsh files to check though.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@655235 13f79535-47bb-0310-9956-ffa450edef68
2008-05-11 03:29:04 +00:00
Scott Gray 0792342f2a Removed more calls to deprecated GenericDelegator methods
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@655016 13f79535-47bb-0310-9956-ffa450edef68
2008-05-10 06:24:19 +00:00
Scott Gray c182253d73 Removed more calls to deprecated GenericDelegator methods
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@655013 13f79535-47bb-0310-9956-ffa450edef68
2008-05-10 05:35:16 +00:00
Scott Gray daeadc7442 Removed more calls to deprecated GenericDelegator methods
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@654934 13f79535-47bb-0310-9956-ffa450edef68
2008-05-09 20:57:23 +00:00
Scott Gray 8c606bcdce Removed all calls to the deprecated GenericDelegator.findAll(String, List)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@654771 13f79535-47bb-0310-9956-ffa450edef68
2008-05-09 11:52:37 +00:00
Scott Gray 848c024f3f Fix to prevent an IndexOutOfBoundsException
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@654718 13f79535-47bb-0310-9956-ffa450edef68
2008-05-09 08:33:03 +00:00
David E. Jones 329631a4b5 A whole bunch of cleanups to use newer and more consolidated delegator find methods; still lots of deprecation warnings, bots of deprecation warnings but this is a first pass, and things still run as before
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@653029 13f79535-47bb-0310-9956-ffa450edef68
2008-05-03 09:40:51 +00:00
David E. Jones dfed0d7378 First pass at deprecating find methods, comments include counts of references and some stuff about code cleanups to be committed next
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@653028 13f79535-47bb-0310-9956-ffa450edef68
2008-05-03 09:39:18 +00:00
David E. Jones 3897a70ee3 Removed redundant synchronized on setFields because it is synced on set
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@653009 13f79535-47bb-0310-9956-ffa450edef68
2008-05-03 06:43:39 +00:00
David E. Jones 3b7660fc3b Added feature to entity engine to support generic audit log that can be used for any field; values are converted to a string and l using the enable-audit-log attribute on the entity->field element; the Testing entity uses it now for the testName; this also has functionality to associate user info like the userLoginId with the thread so that the EE knows about it automatically, and uses a stack for flexibility
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@652226 13f79535-47bb-0310-9956-ffa450edef68
2008-04-30 02:02:29 +00:00
David E. Jones b3ade46e61 Realized method name was bad for properties resource not found method, improved
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@645562 13f79535-47bb-0310-9956-ffa450edef68
2008-04-07 15:22:44 +00:00
David E. Jones e6e13652af Small refactor to preserve protected Map in UtilProperties
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@645561 13f79535-47bb-0310-9956-ffa450edef68
2008-04-07 15:21:26 +00:00
Adrian Crum d0dff7df5e Fixed problem with entity engine trying to translate fields using properties files that don't exist. Reported by Jacopo in https://issues.apache.org/jira/browse/OFBIZ-1736.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@645278 13f79535-47bb-0310-9956-ffa450edef68
2008-04-06 18:06:06 +00:00