Commit Graph
498 Commits
Author SHA1 Message Date
Adam Heath 93adfe2429 Start making use of DependencyPool.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@950256 13f79535-47bb-0310-9956-ffa450edef68
2010-06-01 21:46:32 +00:00
Adam Heath 85138b6244 Multi-threaded creation of tables, foreign key indices, and declared
indices.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@950255 13f79535-47bb-0310-9956-ffa450edef68
2010-06-01 21:46:24 +00:00
Jacques Le Roux 6ff1d49d7a Revert r949617 because it introduce a bug:
2010-06-01 22:11:30,656 (http-0.0.0.0-8443-5) [  ServiceDispatcher.java:543:ERROR] Error in Service [executeFind]: Error running Find on the [ProductSearchNoNotInUse] entity: SQL Exception while executing the
 following:SELECT DISTINCT PR.PRODUCT_ID, PR.PRODUCT_TYPE_ID, PR.PRIMARY_PRODUCT_CATEGORY_ID, PR.PRODUCT_NAME FROM public.PRODUCT PR LEFT OUTER JOIN public.SUPPLIER_PRODUCT SP ON PR.PRODUCT_ID = SP.PRODUCT_ID
 WHERE  AND ((PR.PRODUCT_TYPE_ID <> ? OR PR.PRODUCT_TYPE_ID IS NULL)) ORDER BY PR.PRODUCT_NAME ASC (ERREUR: erreur de syntaxe sur ou prÞs de ½ AND +
  Position: 206)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@950237 13f79535-47bb-0310-9956-ffa450edef68
2010-06-01 20:24:03 +00:00
Adam Heath e73898b75b Return the value of needsUpperCase from getIndexInfo, so that the proper case can be used on declared index names.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@949628 13f79535-47bb-0310-9956-ffa450edef68
2010-05-30 22:08:59 +00:00
Adam Heath b7434ab448 When fetching index info, if needsUpperCase is set, then the incoming tableName has been upper-cased. This means we have to convert it *back* to lower case when querying indices against the database.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@949627 13f79535-47bb-0310-9956-ffa450edef68
2010-05-30 22:08:54 +00:00
Adam Heath a99d5b7b94 Add comment that describes why there is a check of the index name existing in set.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@949626 13f79535-47bb-0310-9956-ffa450edef68
2010-05-30 22:08:48 +00:00
Adam Heath a60aabe718 Check whether any indices were created before printing a message saying what was done; handles the case when none were created.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@949625 13f79535-47bb-0310-9956-ffa450edef68
2010-05-30 22:08:42 +00:00
Adam Heath 4a9f3516e4 Start refactoring fkIndex creation and declared index creation.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@949624 13f79535-47bb-0310-9956-ffa450edef68
2010-05-30 22:08:35 +00:00
Adam Heath f4ee31c10d Fix wrong index label on declared indices.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@949623 13f79535-47bb-0310-9956-ffa450edef68
2010-05-30 22:08:29 +00:00
Adam Heath fe18c551ee getIndexInfo was skipping all indices that were unique. This was wrong, as it meant that declared unique indices wouldn't be detected, and a creation would be attempted, which would then fail, saying it already existed.
Since all PRIMARY KEY constraints have a prefix of 'PK_', just skip all
those indices instead of checking the uniqueness.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@949622 13f79535-47bb-0310-9956-ffa450edef68
2010-05-30 22:08:24 +00:00
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 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 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 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
Jacopo Cappellato 0dd1427f0a Added ability to override the type, colName and description of an existing entity field using the extend-entity definition.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@942076 13f79535-47bb-0310-9956-ffa450edef68
2010-05-07 14:08:39 +00:00
David E. Jones 1b2bbe40c5 Check for bad entity name and return a better error message than an NPE
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@941284 13f79535-47bb-0310-9956-ffa450edef68
2010-05-05 13:40:33 +00:00
Scott Gray df84248153 The following deprecated classes, constructors or methods have been removed:
org.ofbiz.entity.GenericDelegator.findCountByAnd(String)
- Use findCountByCondition(String, EntityCondition, EntityCondition, EntityFindOptions) instead

org.ofbiz.entity.GenericDelegator.findCountByAnd(String, Object...)
- Use findCountByCondition(String, EntityCondition, EntityCondition, EntityFindOptions) instead

org.ofbiz.entity.GenericDelegator.findCountByAnd(String, Map<String, ? extends Object)
- Use findCountByCondition(String, EntityCondition, EntityCondition, EntityFindOptions) instead

org.ofbiz.entity.GenericDelegator.findCountByCondition(String, EntityCondition, EntityCondition)
- Use findCountByCondition(String, EntityCondition, EntityCondition, EntityFindOptions) instead

org.ofbiz.entity.GenericDelegator.getRelated(String, GenericValue)
- Use getRelated(String, Map<String, ? extends Object>, List<String>, GenericValue) instead

org.ofbiz.entity.GenericDelegator.getRelatedByAnd(String, Map<String, ? extends Object>, GenericValue)
- Use getRelated(String, Map<String, ? extends Object>, List<String>, GenericValue) instead

org.ofbiz.entity.GenericDelegator.getRelatedOrderBy(String, List<String>, GenericValue)
- Use getRelated(String, Map<String, ? extends Object>, List<String>, GenericValue) instead

org.ofbiz.entity.GenericDelegator.getMultiRelation(GenericValue, String, String)
- Use getMultiRelation(GenericValue, String, String, List<String>) instead

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@938955 13f79535-47bb-0310-9956-ffa450edef68
2010-04-28 11:31:18 +00:00
Scott Gray 5220be9f4e The following deprecated classes, constructors or methods have been removed:
org.ofbiz.entity.Delegator.getMultiRelation(GenericValue, String, String)
- Use getMultiRelation(GenericValue, String, String, List<String>) instead

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@938954 13f79535-47bb-0310-9956-ffa450edef68
2010-04-28 11:31:08 +00:00
Scott Gray 2d4b56a599 The following deprecated classes, constructors or methods have been removed:
org.ofbiz.entity.GenericDelegator.findByOr(String, Object...)
- Use findList(String, EntityCondition, Set<String>, List<String>, EntityFindOptions, boolean) instead

org.ofbiz.entity.GenericDelegator.findByOr(String, Map<String, ? extends Object>)
- Use findList(String, EntityCondition, Set<String>, List<String>, EntityFindOptions, boolean) instead

org.ofbiz.entity.GenericDelegator.findByOr(String, Map<String, ? extends Object>, List<String>)
- Use findList(String, EntityCondition, Set<String>, List<String>, EntityFindOptions, boolean) instead

org.ofbiz.entity.GenericDelegator.findByAndCache(String, Object...)
- Use findList(String, EntityCondition, Set<String>, List<String>, EntityFindOptions, boolean) instead

org.ofbiz.entity.GenericDelegator.findByLike(String, Object...)
- Use findList(String, EntityCondition, Set<String>, List<String>, EntityFindOptions, boolean) instead

org.ofbiz.entity.GenericDelegator.findByLike(String, Map<String, ? extends Object>)
- Use findList(String, EntityCondition, Set<String>, List<String>, EntityFindOptions, boolean) instead

org.ofbiz.entity.GenericDelegator.findByLike(String, Map<String, ? extends Object>, List<String>)
- Use findList(String, EntityCondition, Set<String>, List<String>, EntityFindOptions, boolean) instead

org.ofbiz.entity.GenericDelegator.findByCondition(String, EntityCondition, Collection<String>, List<String>)
- Use findList(String, EntityCondition, Set<String>, List<String>, EntityFindOptions, boolean) instead

org.ofbiz.entity.GenericDelegator.findByCondition(String, EntityCondition, EntityCondition, Collection<String>, List<String>, EntityFindOptions)
- Use find(String, EntityCondition, EntityCondition, Set<String>, List<String>, EntityFindOptions) instead

org.ofbiz.entity.GenericDelegator.findByConditionCache(String, EntityCondition, Collection<String>, List<String>)
- Use findList(String, EntityCondition, Set<String>, List<String>, EntityFindOptions, boolean) instead

org.ofbiz.entity.GenericDelegator.findListIteratorByCondition(String, EntityCondition, Collection<String>, List<String>)
- Use find(String, EntityCondition, EntityCondition, Set<String>, List<String>, EntityFindOptions) instead

org.ofbiz.entity.GenericDelegator.findListIteratorByCondition(String, EntityCondition, EntityCondition, Collection<String>, List<String>, EntityFindOptions)
- Use find(String, EntityCondition, EntityCondition, Set<String>, List<String>, EntityFindOptions) instead

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@938950 13f79535-47bb-0310-9956-ffa450edef68
2010-04-28 11:30:57 +00:00
Scott Gray f097b0a639 The following deprecated classes, constructors or methods have been removed:
org.ofbiz.entity.GenericDelegator.findAll(String)
- Use findList(String, EntityCondition, Set<String>, List<String>, EntityFindOptions, boolean) instead

org.ofbiz.entity.GenericDelegator.findAll(String, String...)
- Use findList(String, EntityCondition, Set<String>, List<String>, EntityFindOptions, boolean) instead

org.ofbiz.entity.GenericDelegator.findAll(String, List<String>)
- Use findList(String, EntityCondition, Set<String>, List<String>, EntityFindOptions, boolean) instead

org.ofbiz.entity.GenericDelegator.findAllCache(String)
- Use findList(String, EntityCondition, Set<String>, List<String>, EntityFindOptions, boolean) instead

org.ofbiz.entity.GenericDelegator.findAllCache(String, String...)
- Use findList(String, EntityCondition, Set<String>, List<String>, EntityFindOptions, boolean) instead

org.ofbiz.entity.GenericDelegator.findAllCache(String, List<String>)
- Use findList(String, EntityCondition, Set<String>, List<String>, EntityFindOptions, boolean) instead

org.ofbiz.entity.GenericDelegator.findByAnd(String, EntityCondition...)
- Use findList(String, EntityCondition, Set<String>, List<String>, EntityFindOptions, boolean) instead

org.ofbiz.entity.GenericDelegator.findByAnd(String, List<EntityCondition>)
- Use findList(String, EntityCondition, Set<String>, List<String>, EntityFindOptions, boolean) instead

org.ofbiz.entity.GenericDelegator.findByAnd(String, List<EntityCondition>, List<String>)
- Use findList(String, EntityCondition, Set<String>, List<String>, EntityFindOptions, boolean) instead

org.ofbiz.entity.GenericDelegator.findByOr(String, EntityCondition...)
- Use findList(String, EntityCondition, Set<String>, List<String>, EntityFindOptions, boolean) instead

org.ofbiz.entity.GenericDelegator.findByOr(String, List<EntityCondition>)
- Use findList(String, EntityCondition, Set<String>, List<String>, EntityFindOptions, boolean) instead

org.ofbiz.entity.GenericDelegator.findByOr(String, List<EntityCondition>, List<String>)
- Use findList(String, EntityCondition, Set<String>, List<String>, EntityFindOptions, boolean) instead

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@938948 13f79535-47bb-0310-9956-ffa450edef68
2010-04-28 11:30:33 +00:00
Scott Gray 8a0ba1d049 The following deprecated classes, constructors or methods have been removed:
org.ofbiz.entity.GenericDelegator.findByPrimaryKey(GenericPK)
- Use findByPrimaryKey(String, Map<String, ? extends Object>)

org.ofbiz.entity.GenericDelegator.findByPrimaryKey(String, Object...)
- Use findByPrimaryKey(String, Map<String, ? extends Object>)

org.ofbiz.entity.GenericDelegator.findByPrimaryKeyCache(GenericPK)
- Use findByPrimaryKeyCache(String, Map<String, ? extends Object>)

org.ofbiz.entity.GenericDelegator.findByPrimaryKeySingle(String, Object)
- Use findOne(String, Map<String, ? extends Object, boolean)

org.ofbiz.entity.GenericDelegator.findByPrimaryKeyCacheSingle(String, Object)
- Use findOne(String, Map<String, ? extends Object, boolean)

org.ofbiz.entity.GenericDelegator.findByPrimaryKeyPartial(GenericPK, String...)
- Use findByPrimaryKeyPartial(GenericPK, Set<String>)

org.ofbiz.entity.GenericDelegator.findAllByPrimaryKeys(Collection<GenericPK>)

org.ofbiz.entity.GenericDelegator.findAllByPrimaryKeysCache(Collection<GenericPK>)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@938945 13f79535-47bb-0310-9956-ffa450edef68
2010-04-28 11:29:32 +00:00
Scott Gray 3129044e2d The following deprecated classes, constructors or methods have been removed:
org.ofbiz.entity.model.ModelRelation.getMainEntity()

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@938942 13f79535-47bb-0310-9956-ffa450edef68
2010-04-28 11:29:20 +00:00
Scott Gray f8c5c12bcf The following deprecated classes, constructors or methods have been removed:
org.ofbiz.entity.model.ModelEntity.getPksCopy()
- Use getPkFieldsUnmodifiable() instead
org.ofbiz.entity.model.ModelEntity.getFieldsCopy()
- Use getFieldsUnmodifiable() instead

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@938939 13f79535-47bb-0310-9956-ffa450edef68
2010-04-28 11:29:09 +00:00
Scott Gray 1fb82378eb At some point the behavior of initEntityEcaHandler() was changed so that a new handler wasn't inititated if the delegator already had one. The broke the test delegator because it requires a new handler be created for it rather than inherit the one provided by the delegator that it cloned. Worked around by setting the handler to null on the while making the test delegator before calling initEntityEcaHandler().
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@935870 13f79535-47bb-0310-9956-ffa450edef68
2010-04-20 11:10:45 +00:00
Scott Gray a3837cdcd2 Fix a problem reported by Bob Morley in OFBIZ-3663. When a delegator is cloned during test execution then the test mode isn't inherited by the new delegator and subsequently any changes made by that delegator are not tracked for rollback. Fixed by setting the testMode of the new delegator to match that of the one being cloned.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@935869 13f79535-47bb-0310-9956-ffa450edef68
2010-04-20 11:10:34 +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
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
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