svn commit: r943181 - in /ofbiz/branches/release10.04: ./ applications/content/src/org/ofbiz/content/survey/SurveyWrapper.java applications/product/src/org/ofbiz/product/store/ProductStoreWorker.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r943181 - in /ofbiz/branches/release10.04: ./ applications/content/src/org/ofbiz/content/survey/SurveyWrapper.java applications/product/src/org/ofbiz/product/store/ProductStoreWorker.java

doogie-3
Author: doogie
Date: Tue May 11 17:10:21 2010
New Revision: 943181

URL: http://svn.apache.org/viewvc?rev=943181&view=rev
Log:
Applied fix from trunk for revision: 941047
 Add some caching to a few delegator calls, a few cases during the

Modified:
    ofbiz/branches/release10.04/   (props changed)
    ofbiz/branches/release10.04/applications/content/src/org/ofbiz/content/survey/SurveyWrapper.java
    ofbiz/branches/release10.04/applications/product/src/org/ofbiz/product/store/ProductStoreWorker.java

Propchange: ofbiz/branches/release10.04/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue May 11 17:10:21 2010
@@ -1,3 +1,3 @@
 /ofbiz/branches/addbirt:831210-885099,885686-886087
 /ofbiz/branches/multitenant20100310:921280-927264
-/ofbiz/trunk:939988,939990,939999,940025,940053,940234,940248,940309,940401,940410,940425,940779,940815,940849,941007,941177,941199,941261,941440,941600,941999,942084,942406,942414,942671,942883-942884,943168
+/ofbiz/trunk:939988,939990,939999,940025,940053,940234,940248,940309,940401,940410,940425,940779,940815,940849,941007,941047,941177,941199,941261,941440,941600,941999,942084,942406,942414,942671,942883-942884,943168

Modified: ofbiz/branches/release10.04/applications/content/src/org/ofbiz/content/survey/SurveyWrapper.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release10.04/applications/content/src/org/ofbiz/content/survey/SurveyWrapper.java?rev=943181&r1=943180&r2=943181&view=diff
==============================================================================
--- ofbiz/branches/release10.04/applications/content/src/org/ofbiz/content/survey/SurveyWrapper.java (original)
+++ ofbiz/branches/release10.04/applications/content/src/org/ofbiz/content/survey/SurveyWrapper.java Tue May 11 17:10:21 2010
@@ -242,7 +242,7 @@ public class SurveyWrapper {
     public GenericValue getSurvey() {
         GenericValue survey = null;
         try {
-            survey = delegator.findByPrimaryKey("Survey", UtilMisc.toMap("surveyId", surveyId));
+            survey = delegator.findByPrimaryKeyCache("Survey", UtilMisc.toMap("surveyId", surveyId));
         } catch (GenericEntityException e) {
             Debug.logError(e, "Unable to get Survey : " + surveyId, module);
         }
@@ -290,7 +290,7 @@ public class SurveyWrapper {
         try {
             Map fields = UtilMisc.toMap("surveyId", surveyId);
             List order = UtilMisc.toList("sequenceNum", "surveyMultiRespColId");
-            questions = delegator.findByAnd("SurveyQuestionAndAppl", fields, order);
+            questions = delegator.findByAndCache("SurveyQuestionAndAppl", fields, order);
             if (questions != null) {
                 questions = EntityUtil.filterByDate(questions);
             }

Modified: ofbiz/branches/release10.04/applications/product/src/org/ofbiz/product/store/ProductStoreWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release10.04/applications/product/src/org/ofbiz/product/store/ProductStoreWorker.java?rev=943181&r1=943180&r2=943181&view=diff
==============================================================================
--- ofbiz/branches/release10.04/applications/product/src/org/ofbiz/product/store/ProductStoreWorker.java (original)
+++ ofbiz/branches/release10.04/applications/product/src/org/ofbiz/product/store/ProductStoreWorker.java Tue May 11 17:10:21 2010
@@ -511,7 +511,7 @@ public class ProductStoreWorker {
                 } else if (surveyAppl.get("productCategoryId") != null) {
                     List<GenericValue> categoryMembers = null;
                     try {
-                        categoryMembers = delegator.findByAnd("ProductCategoryMember", UtilMisc.toMap("productCategoryId", surveyAppl.get("productCategoryId")));
+                        categoryMembers = delegator.findByAndCache("ProductCategoryMember", UtilMisc.toMap("productCategoryId", surveyAppl.get("productCategoryId")));
                     } catch (GenericEntityException e) {
                         Debug.logError(e, "Unable to get ProductCategoryMember records for survey application : " + surveyAppl, module);
                     }