Commit Graph
259 Commits
Author SHA1 Message Date
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 e410552cc9 No longer *copy* the extra support files into the classes dir;
instead, just add them straight to the final jar.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@685934 13f79535-47bb-0310-9956-ffa450edef68
2008-08-14 15:08:14 +00:00
Adam Heath 2617681b51 Remove svn:executable on a bunch of stuff.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@684389 13f79535-47bb-0310-9956-ffa450edef68
2008-08-10 00:53:43 +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
Adam Heath b6a1ae5e5e Another minor optimization; no longer need to specify classpathref in
all the build.xml files.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@681935 13f79535-47bb-0310-9956-ffa450edef68
2008-08-02 03:41:46 +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
Jacques Le Roux 4f4b4e5e43 Revert previous change done unintentionnaly while testing Subclipse 1.4 new interface (so far I preferred the old one...)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@676279 13f79535-47bb-0310-9956-ffa450edef68
2008-07-13 08:45:11 +00:00
Jacques Le Roux 80c57126a0 New French labels
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@676274 13f79535-47bb-0310-9956-ffa450edef68
2008-07-13 08:21:54 +00:00
Jacopo Cappellato 930970efd3 Upgraded (again) to Tomcat 6.0.16.
Upgraded commons-dbcp to the HEAD revision (from snapshot taken in 20071125): the upgrade of the dbcp jar seems to have fixed all the issues we were having with "OutOfMemoryError: Java heap space" exceptions.
Sorry for the noise (two big commits in the base and catalina components in the same day): hopefully this rather critical issue is now resolved (but I will continue my load tests).


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@674776 13f79535-47bb-0310-9956-ffa450edef68
2008-07-08 11:47:02 +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 e46be2077e More entitygroups gone, all of framework
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@672911 13f79535-47bb-0310-9956-ffa450edef68
2008-06-30 20:49:27 +00:00
David E. Jones 204d775174 More entitygroups gone, all of framework
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@672910 13f79535-47bb-0310-9956-ffa450edef68
2008-06-30 20:49:10 +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
Adam Heath 18391f98a9 The build.xml files are now much smaller and simpler; they reuse a
few global definitions.  1585 lines removed.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@672657 13f79535-47bb-0310-9956-ffa450edef68
2008-06-29 18:39:36 +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
David E. Jones 310c23792e Removed the highly redundant field type long which was 19 digits, and changed the existing field type numeric to be 20 digits, which is bigger than 19 so should be fine; updated the shark entity defs to use numeric instead of long
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@664547 13f79535-47bb-0310-9956-ffa450edef68
2008-06-08 20:12:34 +00:00
Jacques Le Roux 9dae3bffa6 Last patch (forgotten for more than one year) from Sergey Shutov "Integration Shark 1.1_2 into OfBiz" (https://issues.apache.org/jira/browse/OFBIZ-552) - OFBIZ-552
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@664048 13f79535-47bb-0310-9956-ffa450edef68
2008-06-06 17:32:55 +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
Andrew Zeneski fdc09904a6 updated DBCP with latest snapshot from Maven repository 2007-11-25. This should correct the memory leak reported in JIRA OFBIZ-1818.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@662852 13f79535-47bb-0310-9956-ffa450edef68
2008-06-03 18:09:56 +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
Jacques Le Roux 66f3699ad7 Upgrade to Derby 10.4.1.3 from 10.3.1.4 from a recommendation of the Derby project
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@659237 13f79535-47bb-0310-9956-ffa450edef68
2008-05-22 20:19:14 +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