Commit Graph
1462 Commits
Author SHA1 Message Date
Adam Heath 95949ff2b7 Add <test-jar> macro.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@935381 13f79535-47bb-0310-9956-ffa450edef68
2010-04-18 18:03:47 +00:00
Scott Gray 167b4c0b99 Added a Groovy Builder class for building EntityConditions, plenty of room for handling possible errors, at the moment I'm just assuming the passed in parameters will be what I expect
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@935326 13f79535-47bb-0310-9956-ffa450edef68
2010-04-18 10:11:45 +00:00
Adam Heath a9a3b1058c When rolling back a transaction, and there is already an exception
available, then don't bother logging a new temporary exception.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@932104 13f79535-47bb-0310-9956-ffa450edef68
2010-04-08 20:47:42 +00:00
Adam Heath 70d017f130 Bother, me == stupid, inverted the equalsHelper test. This fixes the
buildbot problem.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@930979 13f79535-47bb-0310-9956-ffa450edef68
2010-04-05 23:09:31 +00:00
Adrian Crum 7a73dc39a1 Fixed broken compile.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@930740 13f79535-47bb-0310-9956-ffa450edef68
2010-04-04 19:41:27 +00:00
Adam Heath 3fe7804696 Make use of UtilObject.equalsHelper in storeAll.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@930737 13f79535-47bb-0310-9956-ffa450edef68
2010-04-04 19:08:46 +00:00
Adrian Crum f152bcfdf9 Changed a demo data comment to help clear up some confusion.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@930470 13f79535-47bb-0310-9956-ffa450edef68
2010-04-03 04:41:21 +00:00
Scott Gray 63aadfd6be Removed a couple of redundant null assignments
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@928275 13f79535-47bb-0310-9956-ffa450edef68
2010-03-27 21:00:32 +00:00
Scott Gray 42f78553dc Removed a couple of unnecessary casts
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@928274 13f79535-47bb-0310-9956-ffa450edef68
2010-03-27 21:00:29 +00:00
Scott Gray b9605ffbf0 Removed a few redundant null checks.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@928273 13f79535-47bb-0310-9956-ffa450edef68
2010-03-27 21:00:27 +00:00
Scott Gray 0ea00e303d Move a couple of null checks higher to where they can actually be reached
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@928272 13f79535-47bb-0310-9956-ffa450edef68
2010-03-27 21:00:24 +00:00
David E. Jones 0ef67581ce Small fix so that new SequenceUtil stuff (with no delegtor reference) will work with the multi-tenant extended helper info; before this all tenants would use the SequenceValueItem table from the master (no tenant) database
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@927584 13f79535-47bb-0310-9956-ffa450edef68
2010-03-25 20:22:55 +00:00
Adrian Crum 8a3306c4e2 Commented out unused entity in entitygroup.xml file.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@927396 13f79535-47bb-0310-9956-ffa450edef68
2010-03-25 13:34:48 +00:00
David E. Jones 8e3edae07f Merged multitenant20100310 branch into the trunk
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@927271 13f79535-47bb-0310-9956-ffa450edef68
2010-03-25 04:42:26 +00:00
Adrian Crum acb4ff1357 Compiler warning and spelling fixups in PrimaryKeyFinder.java. No functional change.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@926940 13f79535-47bb-0310-9956-ffa450edef68
2010-03-24 05:52:51 +00:00
Erwan de Ferrieres e934e86fd1 Correcting warning message on too long foreign keys
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@925302 13f79535-47bb-0310-9956-ffa450edef68
2010-03-19 16:17:35 +00:00
Scott Gray 6109808c8a Tabs to spaces
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@924378 13f79535-47bb-0310-9956-ffa450edef68
2010-03-17 17:28:01 +00:00
Adam Heath 2f7ee6b1d3 Move Factory to lang package.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@923354 13f79535-47bb-0310-9956-ffa450edef68
2010-03-15 17:31:34 +00:00
Adam Heath 37f62c89e9 Follow junit best practices.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@922735 13f79535-47bb-0310-9956-ffa450edef68
2010-03-14 02:22:10 +00:00
Adam Heath 4ba13c9699 Fix formatting; some lines had a leading indent of 2 spaces.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@922734 13f79535-47bb-0310-9956-ffa450edef68
2010-03-14 02:21:42 +00:00
Adam Heath 2d40b49aff Thread.sleep takes a long, not an int, so convert the wait time to long calculations. Also, remove the use of new Double().
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@922733 13f79535-47bb-0310-9956-ffa450edef68
2010-03-14 02:21:14 +00:00
Adam Heath 641b22e58c Change visibility of purely internal methods to private, and make several instance variables final.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@922731 13f79535-47bb-0310-9956-ffa450edef68
2010-03-14 02:20:45 +00:00
Adam Heath 579ff51707 SequenceBank no longer stores the bankSize.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@922730 13f79535-47bb-0310-9956-ffa450edef68
2010-03-14 02:20:17 +00:00
Adam Heath 1647601757 SequenceBank no longer maintains a duplicate reference to SequenceUtil.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@922729 13f79535-47bb-0310-9956-ffa450edef68
2010-03-14 02:19:44 +00:00
Adam Heath 23abe54e4e SequenceUtil no longer stores a reference to the ModelEntity at all.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@922728 13f79535-47bb-0310-9956-ffa450edef68
2010-03-14 02:19:16 +00:00
Adam Heath be1f4c329c SequenceBank no longer uses ModelEntity at all.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@922725 13f79535-47bb-0310-9956-ffa450edef68
2010-03-14 02:18:42 +00:00
Adam Heath 795b0cdbab Remove use of ModelEntity from fillBank.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@922724 13f79535-47bb-0310-9956-ffa450edef68
2010-03-14 02:18:10 +00:00
Adam Heath 8ccf42e1dd Fix bad caching. Previously, any call to getDelegator() would *always*
walk the entire classpath, trying to find all implementations of
DelegatorFactory.  This was fixed by moving the cache higher up.

In detail, the entity caching system only stored a String delegator
name.  It would then try to find the appropriate delegator to match that
name.  However, during a custom importer, the caching system was being
exercised very heavily, so DelegatorFactory.getDelegator() was being
called in a very tight loop.  Since the delegator instances were not
being cached at the high level, this caused a *big* slowdown; basically,
a 15 minute importer was taking over 2 hours, and was no near finishing.
This was because UtilObject.getObjectFromFactory would end up walking
the entire classpath, finding every jar, looking at every zip entry, to
try and find the appropriate file in META-INF/services.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@921990 13f79535-47bb-0310-9956-ffa450edef68
2010-03-11 18:59:34 +00:00
Adam Heath a68617c9ad Pass the delegator into any create/init methods that end up setting any
field data.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@921989 13f79535-47bb-0310-9956-ffa450edef68
2010-03-11 18:58:13 +00:00
David E. Jones 39484e52d2 A better approach for this condition, it isn't just the COUNT function we want to look for, it is ANY function; a reminder for those using this: put the unique field first
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@918910 13f79535-47bb-0310-9956-ffa450edef68
2010-03-04 09:24:30 +00:00
David E. Jones 745e671051 Added back code similar to code before to use selected values in a count instead of ignoring them, which is necessary to get a distinct count when you are not selecting all fields/columns; now looks for the SQL generated with the function=count-distinct stuff is used so that it will function the old way and not include the column name at all, so hopefully that will take care of that problem while fixing the main bug of ignoring the selected fields set
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@918903 13f79535-47bb-0310-9956-ffa450edef68
2010-03-04 09:03:46 +00:00
Adam Heath 7fc0f4cfdd Remove a bunch of static variables, instead using an AtomicReference and
an instance of EntityConfigUtil to manage everything.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@918734 13f79535-47bb-0310-9956-ffa450edef68
2010-03-03 22:15:01 +00:00
Adam Heath ce2d761f51 Bad formatting, { shouldn't be on a line by itself.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@918732 13f79535-47bb-0310-9956-ffa450edef68
2010-03-03 22:14:28 +00:00
Adam Heath 083663f6a4 Make use of FastMap's putIfAbsent, and remove an instance of
double-checked-locking.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@918731 13f79535-47bb-0310-9956-ffa450edef68
2010-03-03 22:13:52 +00:00
Adam Heath b2ca928774 Remove unnecessary cast when getting from genericDAOs cache.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@918729 13f79535-47bb-0310-9956-ffa450edef68
2010-03-03 22:13:25 +00:00
Adam Heath 76b4cfb1ac Make all the protected fields private and final.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@918725 13f79535-47bb-0310-9956-ffa450edef68
2010-03-03 22:11:35 +00:00
Scott Gray ead84f88c3 Minor code cleanup: removed unnecessary cast and changed how a static field was being accessed
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@916973 13f79535-47bb-0310-9956-ffa450edef68
2010-02-27 15:40:21 +00:00
Scott Gray 6607c6b903 The following deprecated classes, constructors or methods have been removed:
org.ofbiz.entity.transaction.TransactionUtil.rollback(boolean)
- Use TransactionUtil.rollback(boolean, String, Throwable) instead

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@916972 13f79535-47bb-0310-9956-ffa450edef68
2010-02-27 15:40:17 +00:00
David E. Jones 7ea17c8489 Changed back to derby after accidental change to mysql in last commit
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@916782 13f79535-47bb-0310-9956-ffa450edef68
2010-02-26 18:42:42 +00:00
David E. Jones f67ff5da49 Changed to not try to do a distinct count by a specific column, which was introduced in rev 897605, as it seems to cause a number of problems and is a feature that probably isn't used much since it was introduced about a month ago; reintroducing this feature will require additional effort to resolve these
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@916781 13f79535-47bb-0310-9956-ffa450edef68
2010-02-26 18:41:11 +00:00
Erwan de Ferrieres 88c91bd809 some comments were left in the previous commit (916646)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@916649 13f79535-47bb-0310-9956-ffa450edef68
2010-02-26 11:23:00 +00:00
Erwan de Ferrieres e2f65a76a3 Adding dependent-on on extend-entity (OFBIZ-3303)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@916646 13f79535-47bb-0310-9956-ffa450edef68
2010-02-26 11:17:26 +00:00
Andrew Zeneski aeebb6b841 commented out a debug statement I left in by mistake
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@916456 13f79535-47bb-0310-9956-ffa450edef68
2010-02-25 21:01:19 +00:00
David E. Jones 20117fa1d8 Fixed bug in PrimaryKeyFinder where it wasn't passing through the timeZone and the locale for conversion; the underlying code does look for the timeZonea nd locale, but they weren't there because of the way the context was setup here
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@916055 13f79535-47bb-0310-9956-ffa450edef68
2010-02-25 00:20:10 +00:00
Andrew Zeneski 77ca6da64d extend-entity can now override the default-resource-name attribute
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@916049 13f79535-47bb-0310-9956-ffa450edef68
2010-02-24 23:59:58 +00:00
Scott Gray 21251f0907 The following deprecated classes, constructors or methods have been removed:
org.ofbiz.entity.model.ModelIndex.getMainEntity()
- Use ModelIndex.getModelEntity() instead

org.ofbiz.entity.model.ModelIndex.setMainEntity(ModelEntity)
- Use one of the ModelIndex constructors instead

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@912250 13f79535-47bb-0310-9956-ffa450edef68
2010-02-20 23:16:17 +00:00
Scott Gray 1d8fbd982e The following deprecated classes, constructors or methods have been removed:
org.ofbiz.entity.model.ModelEntity.getPk(int)
- Use ModelEntity.getPksIterator() instead

org.ofbiz.entity.model.ModelEntity.getNopk(int)
- Use ModelEntity.getNopksIterator() instead

org.ofbiz.entity.model.ModelEntity.getField(int)
- Use ModelEntity.getFieldsIterator() instead

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@912249 13f79535-47bb-0310-9956-ffa450edef68
2010-02-20 23:10:09 +00:00
Scott Gray 318b7ae549 Reverting r912247, not all methods removed had been deprecated prior to 9.04
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@912248 13f79535-47bb-0310-9956-ffa450edef68
2010-02-20 23:04:51 +00:00
Scott Gray 27ef95fa9c The following deprecated classes, constructors or methods have been removed:
org.ofbiz.entity.model.ModelEntity.getPk(int)
- Use ModelEntity.getPksIterator() instead

org.ofbiz.entity.model.ModelEntity.getPksCopy()
- Use ModelEntity.getPkFieldsUnmodifiable() instead

org.ofbiz.entity.model.ModelEntity.getNopk(int)
- Use ModelEntity.getNopksIterator() instead

org.ofbiz.entity.model.ModelEntity.getField(int)
- Use ModelEntity.getFieldsIterator() instead

org.ofbiz.entity.model.ModelEntity.getFieldsCopy()
- Use ModelEntity.getFieldsUnmodifiable() instead

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@912247 13f79535-47bb-0310-9956-ffa450edef68
2010-02-20 22:59:22 +00:00
Scott Gray a4c34e4e34 Added missing code necessary to generate relation elements in ModelEntity.toXmlElement(...)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@912246 13f79535-47bb-0310-9956-ffa450edef68
2010-02-20 22:53:22 +00:00