You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by do...@apache.org on 2012/05/12 23:19:49 UTC

svn commit: r1337670 - in /ofbiz/trunk/applications/party: src/org/ofbiz/party/communication/ src/org/ofbiz/party/contact/ src/org/ofbiz/party/content/ src/org/ofbiz/party/party/ webapp/partymgr/WEB-INF/actions/communication/ webapp/partymgr/WEB-INF/ac...

Author: doogie
Date: Sat May 12 21:19:49 2012
New Revision: 1337670

URL: http://svn.apache.org/viewvc?rev=1337670&view=rev
Log:
DEPRECATION: applications/party: findByPrimaryKey variants replaced with
findOne

Modified:
    ofbiz/trunk/applications/party/src/org/ofbiz/party/communication/CommunicationEventServices.java
    ofbiz/trunk/applications/party/src/org/ofbiz/party/contact/ContactMechServices.java
    ofbiz/trunk/applications/party/src/org/ofbiz/party/contact/ContactMechWorker.java
    ofbiz/trunk/applications/party/src/org/ofbiz/party/content/PartyContentWrapper.java
    ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyHelper.java
    ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyServices.java
    ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyWorker.java
    ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/communication/GetMyCommunicationEventRole.groovy
    ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/communication/ListCommunications.groovy
    ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/EditContactMech.groovy
    ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/EditShoppingList.groovy
    ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/FindMatches.groovy
    ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/GetLoyaltyPoints.groovy
    ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/PartyGeoLocation.groovy
    ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/ViewProfile.groovy
    ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/visit/VisitDetails.groovy
    ofbiz/trunk/applications/party/webapp/partymgr/party/editcontactmech.ftl
    ofbiz/trunk/applications/party/webapp/partymgr/party/profileblocks/mytasks.ftl

Modified: ofbiz/trunk/applications/party/src/org/ofbiz/party/communication/CommunicationEventServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/src/org/ofbiz/party/communication/CommunicationEventServices.java?rev=1337670&r1=1337669&r2=1337670&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/src/org/ofbiz/party/communication/CommunicationEventServices.java (original)
+++ ofbiz/trunk/applications/party/src/org/ofbiz/party/communication/CommunicationEventServices.java Sat May 12 21:19:49 2012
@@ -88,7 +88,7 @@ public class CommunicationEventServices 
 
         try {
             // find the communication event and make sure that it is actually an email
-            GenericValue communicationEvent = delegator.findByPrimaryKey("CommunicationEvent", UtilMisc.toMap("communicationEventId", communicationEventId));
+            GenericValue communicationEvent = delegator.findOne("CommunicationEvent", UtilMisc.toMap("communicationEventId", communicationEventId), false);
             if (communicationEvent == null) {
                 String errMsg = UtilProperties.getMessage(resource,"commeventservices.communication_event_not_found_failure", locale);
                 return ServiceUtil.returnError(errMsg + " " + communicationEventId);
@@ -286,8 +286,8 @@ public class CommunicationEventServices 
         EntityListIterator eli = null;
         try {
 
-            GenericValue communicationEvent = delegator.findByPrimaryKey("CommunicationEvent", UtilMisc.toMap("communicationEventId", communicationEventId));
-            GenericValue contactList = delegator.findByPrimaryKey("ContactList", UtilMisc.toMap("contactListId", contactListId));
+            GenericValue communicationEvent = delegator.findOne("CommunicationEvent", UtilMisc.toMap("communicationEventId", communicationEventId), false);
+            GenericValue contactList = delegator.findOne("ContactList", UtilMisc.toMap("contactListId", contactListId), false);
 
             Map<String, Object> sendMailParams = FastMap.newInstance();
             sendMailParams.put("sendFrom", communicationEvent.getRelatedOne("FromContactMech").getString("infoString"));
@@ -357,7 +357,7 @@ public class CommunicationEventServices 
 
                     // Retrieve a record for this contactMechId from ContactListCommStatus
                     Map<String, String> contactListCommStatusRecordMap = UtilMisc.toMap("contactListId", contactListId, "communicationEventId", communicationEventId, "contactMechId", lastContactListPartyACM.getString("preferredContactMechId"));
-                    GenericValue contactListCommStatusRecord = delegator.findByPrimaryKey("ContactListCommStatus", contactListCommStatusRecordMap);
+                    GenericValue contactListCommStatusRecord = delegator.findOne("ContactListCommStatus", contactListCommStatusRecordMap, false);
                     if (contactListCommStatusRecord == null) {
 
                         // No attempt has been made previously to send to this address, so create a record to reflect
@@ -1030,8 +1030,8 @@ public class CommunicationEventServices 
         try {
             for(Map<String, Object> result : parties) {
                 String partyId = (String) result.get("partyId");
-                GenericValue commEventRole = delegator.findByPrimaryKey("CommunicationEventRole",
-                        UtilMisc.toMap("communicationEventId", communicationEventId, "partyId", partyId, "roleTypeId", roleTypeId));
+                GenericValue commEventRole = delegator.findOne("CommunicationEventRole",
+                        UtilMisc.toMap("communicationEventId", communicationEventId, "partyId", partyId, "roleTypeId", roleTypeId), false);
                 if (commEventRole == null) {
                     Map<String, Object> input = UtilMisc.toMap("communicationEventId", communicationEventId,
                             "partyId", partyId, "roleTypeId", roleTypeId, "userLogin", userLogin,

Modified: ofbiz/trunk/applications/party/src/org/ofbiz/party/contact/ContactMechServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/src/org/ofbiz/party/contact/ContactMechServices.java?rev=1337670&r1=1337669&r2=1337670&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/src/org/ofbiz/party/contact/ContactMechServices.java (original)
+++ ofbiz/trunk/applications/party/src/org/ofbiz/party/contact/ContactMechServices.java Sat May 12 21:19:49 2012
@@ -157,7 +157,7 @@ public class ContactMechServices {
         GenericValue partyContactMech = null;
 
         try {
-            contactMech = delegator.findByPrimaryKey("ContactMech", UtilMisc.toMap("contactMechId", contactMechId));
+            contactMech = delegator.findOne("ContactMech", UtilMisc.toMap("contactMechId", contactMechId), false);
         } catch (GenericEntityException e) {
             Debug.logWarning(e.getMessage(), module);
             contactMech = null;
@@ -420,7 +420,7 @@ public class ContactMechServices {
         GenericValue partyContactMech = null;
 
         try {
-            contactMech = delegator.findByPrimaryKey("ContactMech", UtilMisc.toMap("contactMechId", contactMechId));
+            contactMech = delegator.findOne("ContactMech", UtilMisc.toMap("contactMechId", contactMechId), false);
         } catch (GenericEntityException e) {
             Debug.logWarning(e.getMessage(), module);
             contactMech = null;
@@ -458,7 +458,7 @@ public class ContactMechServices {
             GenericValue addr = null;
 
             try {
-                addr = delegator.findByPrimaryKey("PostalAddress", UtilMisc.toMap("contactMechId", contactMechId));
+                addr = delegator.findOne("PostalAddress", UtilMisc.toMap("contactMechId", contactMechId), false);
             } catch (GenericEntityException e) {
                 Debug.logWarning(e.toString(), module);
                 addr = null;
@@ -638,7 +638,7 @@ public class ContactMechServices {
         GenericValue partyContactMech = null;
 
         try {
-            contactMech = delegator.findByPrimaryKey("ContactMech", UtilMisc.toMap("contactMechId", contactMechId));
+            contactMech = delegator.findOne("ContactMech", UtilMisc.toMap("contactMechId", contactMechId), false);
             // try to find a PartyContactMech with a valid date range
             List<GenericValue> partyContactMechs = EntityUtil.filterByDate(delegator.findByAnd("PartyContactMech", UtilMisc.toMap("partyId", partyId, "contactMechId", contactMechId), UtilMisc.toList("fromDate")), true);
 
@@ -667,7 +667,7 @@ public class ContactMechServices {
             GenericValue telNum = null;
 
             try {
-                telNum = delegator.findByPrimaryKey("TelecomNumber", UtilMisc.toMap("contactMechId", contactMechId));
+                telNum = delegator.findOne("TelecomNumber", UtilMisc.toMap("contactMechId", contactMechId), false);
             } catch (GenericEntityException e) {
                 Debug.logWarning(e.toString(), module);
                 telNum = null;
@@ -926,7 +926,7 @@ public class ContactMechServices {
         GenericValue pcmp = null;
 
         try {
-            pcmp = delegator.findByPrimaryKey("PartyContactMechPurpose", UtilMisc.toMap("partyId", partyId, "contactMechId", contactMechId, "contactMechPurposeTypeId", contactMechPurposeTypeId, "fromDate", fromDate));
+            pcmp = delegator.findOne("PartyContactMechPurpose", UtilMisc.toMap("partyId", partyId, "contactMechId", contactMechId, "contactMechPurposeTypeId", contactMechPurposeTypeId, "fromDate", fromDate), false);
             if (pcmp == null) {
                 return ServiceUtil.returnError(UtilProperties.getMessage(resourceError,
                         "contactmechservices.could_not_delete_purpose_from_contact_mechanism_not_found", locale));

Modified: ofbiz/trunk/applications/party/src/org/ofbiz/party/contact/ContactMechWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/src/org/ofbiz/party/contact/ContactMechWorker.java?rev=1337670&r1=1337669&r2=1337670&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/src/org/ofbiz/party/contact/ContactMechWorker.java (original)
+++ ofbiz/trunk/applications/party/src/org/ofbiz/party/contact/ContactMechWorker.java Sat May 12 21:19:49 2012
@@ -360,7 +360,7 @@ public class ContactMechWorker {
             }
 
             try {
-                contactMech = delegator.findByPrimaryKey("ContactMech", UtilMisc.toMap("contactMechId", contactMechId));
+                contactMech = delegator.findOne("ContactMech", UtilMisc.toMap("contactMechId", contactMechId), false);
             } catch (GenericEntityException e) {
                 Debug.logWarning(e, module);
             }
@@ -375,7 +375,7 @@ public class ContactMechWorker {
             target.put("contactMechTypeId", contactMechTypeId);
 
             try {
-                GenericValue contactMechType = delegator.findByPrimaryKey("ContactMechType", UtilMisc.toMap("contactMechTypeId", contactMechTypeId));
+                GenericValue contactMechType = delegator.findOne("ContactMechType", UtilMisc.toMap("contactMechTypeId", contactMechTypeId), false);
 
                 if (contactMechType != null)
                     target.put("contactMechType", contactMechType);
@@ -572,7 +572,7 @@ public class ContactMechWorker {
             }
 
             try {
-                contactMech = delegator.findByPrimaryKey("ContactMech", UtilMisc.toMap("contactMechId", contactMechId));
+                contactMech = delegator.findOne("ContactMech", UtilMisc.toMap("contactMechId", contactMechId), false);
             } catch (GenericEntityException e) {
                 Debug.logWarning(e, module);
             }
@@ -587,7 +587,7 @@ public class ContactMechWorker {
             target.put("contactMechTypeId", contactMechTypeId);
 
             try {
-                GenericValue contactMechType = delegator.findByPrimaryKey("ContactMechType", UtilMisc.toMap("contactMechTypeId", contactMechTypeId));
+                GenericValue contactMechType = delegator.findOne("ContactMechType", UtilMisc.toMap("contactMechTypeId", contactMechTypeId), false);
 
                 if (contactMechType != null)
                     target.put("contactMechType", contactMechType);
@@ -891,7 +891,7 @@ public class ContactMechWorker {
     public static String getContactMechAttribute(Delegator delegator, String contactMechId, String attrName) {
         GenericValue attr = null;
         try {
-            attr = delegator.findByPrimaryKey("ContactMechAttribute", UtilMisc.toMap("contactMechId", contactMechId, "attrName", attrName));
+            attr = delegator.findOne("ContactMechAttribute", UtilMisc.toMap("contactMechId", contactMechId, "attrName", attrName), false);
         } catch (GenericEntityException e) {
             Debug.logError(e, module);
         }
@@ -911,14 +911,14 @@ public class ContactMechWorker {
         // no postalCodeGeoId, see if there is a Geo record matching the countryGeoId and postalCode fields
         if (UtilValidate.isNotEmpty(postalAddress.getString("countryGeoId")) && UtilValidate.isNotEmpty(postalAddress.getString("postalCode"))) {
             // first try the shortcut with the geoId convention for "{countryGeoId}-{postalCode}"
-            GenericValue geo = delegator.findByPrimaryKeyCache("Geo", UtilMisc.toMap("geoId", postalAddress.getString("countryGeoId") + "-" + postalAddress.getString("postalCode")));
+            GenericValue geo = delegator.findOne("Geo", UtilMisc.toMap("geoId", postalAddress.getString("countryGeoId") + "-" + postalAddress.getString("postalCode")), true);
             if (geo != null) {
                 // save the value to the database for quicker future reference
                 if (postalAddress.isMutable()) {
                     postalAddress.set("postalCodeGeoId", geo.getString("geoId"));
                     postalAddress.store();
                 } else {
-                    GenericValue mutablePostalAddress = delegator.findByPrimaryKey("PostalAddress", UtilMisc.toMap("contactMechId", postalAddress.getString("contactMechId")));
+                    GenericValue mutablePostalAddress = delegator.findOne("PostalAddress", UtilMisc.toMap("contactMechId", postalAddress.getString("contactMechId")), false);
                     mutablePostalAddress.set("postalCodeGeoId", geo.getString("geoId"));
                     mutablePostalAddress.store();
                 }
@@ -936,7 +936,7 @@ public class ContactMechWorker {
                     postalAddress.set("postalCodeGeoId", geoAssocAndGeoTo.getString("geoId"));
                     postalAddress.store();
                 } else {
-                    GenericValue mutablePostalAddress = delegator.findByPrimaryKey("PostalAddress", UtilMisc.toMap("contactMechId", postalAddress.getString("contactMechId")));
+                    GenericValue mutablePostalAddress = delegator.findOne("PostalAddress", UtilMisc.toMap("contactMechId", postalAddress.getString("contactMechId")), false);
                     mutablePostalAddress.set("postalCodeGeoId", geoAssocAndGeoTo.getString("geoId"));
                     mutablePostalAddress.store();
                 }

Modified: ofbiz/trunk/applications/party/src/org/ofbiz/party/content/PartyContentWrapper.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/src/org/ofbiz/party/content/PartyContentWrapper.java?rev=1337670&r1=1337669&r2=1337670&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/src/org/ofbiz/party/content/PartyContentWrapper.java (original)
+++ ofbiz/trunk/applications/party/src/org/ofbiz/party/content/PartyContentWrapper.java Sat May 12 21:19:49 2012
@@ -187,7 +187,7 @@ public class PartyContentWrapper impleme
             ModelEntity partyPersonModel = delegator.getModelEntity("PartyAndPerson");
             if (partyPersonModel != null && partyPersonModel.isField(candidateFieldName)) {
                 if (party == null) {
-                    party = delegator.findByPrimaryKeyCache("PartyAndPerson", UtilMisc.toMap("partyId", partyId));
+                    party = delegator.findOne("PartyAndPerson", UtilMisc.toMap("partyId", partyId), true);
                 }
                 if (party != null) {
                     String candidateValue = party.getString(candidateFieldName);
@@ -202,7 +202,7 @@ public class PartyContentWrapper impleme
             ModelEntity partyGroupModel = delegator.getModelEntity("PartyAndGroup");
             if (partyGroupModel != null && partyGroupModel.isField(candidateFieldName)) {
                 if (party == null) {
-                    party = delegator.findByPrimaryKeyCache("PartyAndGroup", UtilMisc.toMap("partyId", partyId));
+                    party = delegator.findOne("PartyAndGroup", UtilMisc.toMap("partyId", partyId), true);
                 }
                 if (party != null) {
                     String candidateValue = party.getString(candidateFieldName);
@@ -217,7 +217,7 @@ public class PartyContentWrapper impleme
         // otherwise a content field
         GenericValue partyContent;
         if (contentId != null) {
-            partyContent = delegator.findByPrimaryKeyCache("PartyContent", UtilMisc.toMap("partyId", partyId, "contentId", contentId));
+            partyContent = delegator.findOne("PartyContent", UtilMisc.toMap("partyId", partyId, "contentId", contentId), true);
         } else {
             partyContent = getFirstPartyContentByType(partyId, party, partyContentTypeId, delegator);
         }

Modified: ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyHelper.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyHelper.java?rev=1337670&r1=1337669&r2=1337670&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyHelper.java (original)
+++ ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyHelper.java Sat May 12 21:19:49 2012
@@ -43,7 +43,7 @@ public class PartyHelper {
     public static String getPartyName(Delegator delegator, String partyId, boolean lastNameFirst) {
         GenericValue partyObject = null;
         try {
-            partyObject = delegator.findByPrimaryKey("PartyNameView", UtilMisc.toMap("partyId", partyId));
+            partyObject = delegator.findOne("PartyNameView", UtilMisc.toMap("partyId", partyId), false);
         } catch (GenericEntityException e) {
             Debug.logError(e, "Error finding PartyNameView in getPartyName", module);
         }

Modified: ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyServices.java?rev=1337670&r1=1337669&r2=1337670&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyServices.java (original)
+++ ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyServices.java Sat May 12 21:19:49 2012
@@ -132,7 +132,7 @@ public class PartyServices {
         GenericValue party = null;
 
         try {
-            party = delegator.findByPrimaryKey("Party", UtilMisc.toMap("partyId", partyId));
+            party = delegator.findOne("Party", UtilMisc.toMap("partyId", partyId), false);
         } catch (GenericEntityException e) {
             Debug.logWarning(e.getMessage(), module);
         }
@@ -173,7 +173,7 @@ public class PartyServices {
         GenericValue person = null;
 
         try {
-            person = delegator.findByPrimaryKey("Person", UtilMisc.toMap("partyId", partyId));
+            person = delegator.findOne("Person", UtilMisc.toMap("partyId", partyId), false);
         } catch (GenericEntityException e) {
             Debug.logWarning(e.getMessage(), module);
         }
@@ -216,7 +216,7 @@ public class PartyServices {
         }
 
         try {
-            GenericValue party = delegator.findByPrimaryKey("Party", UtilMisc.toMap("partyId", partyId));
+            GenericValue party = delegator.findOne("Party", UtilMisc.toMap("partyId", partyId), false);
 
             if (party.get("statusId") == null) { // old records
                 party.set("statusId", "PARTY_ENABLED");
@@ -226,7 +226,7 @@ public class PartyServices {
             if (!party.getString("statusId").equals(statusId)) {
 
                 // check that status is defined as a valid change
-                GenericValue statusValidChange = delegator.findByPrimaryKey("StatusValidChange", UtilMisc.toMap("statusId", party.getString("statusId"), "statusIdTo", statusId));
+                GenericValue statusValidChange = delegator.findOne("StatusValidChange", UtilMisc.toMap("statusId", party.getString("statusId"), "statusIdTo", statusId), false);
                 if (statusValidChange == null) {
                     String errorMsg = "Cannot change party status from " + party.getString("statusId") + " to " + statusId;
                     Debug.logWarning(errorMsg, module);
@@ -287,8 +287,8 @@ public class PartyServices {
         GenericValue party = null;
 
         try {
-            person = delegator.findByPrimaryKey("Person", UtilMisc.toMap("partyId", partyId));
-            party = delegator.findByPrimaryKey("Party", UtilMisc.toMap("partyId", partyId));
+            person = delegator.findOne("Person", UtilMisc.toMap("partyId", partyId), false);
+            party = delegator.findOne("Party", UtilMisc.toMap("partyId", partyId), false);
         } catch (GenericEntityException e) {
             Debug.logWarning(e, module);
             return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, 
@@ -370,8 +370,8 @@ public class PartyServices {
 
         try {
             // check to see if party object exists, if so make sure it is PARTY_GROUP type party
-            GenericValue party = delegator.findByPrimaryKey("Party", UtilMisc.toMap("partyId", partyId));
-            GenericValue partyGroupPartyType = delegator.findByPrimaryKeyCache("PartyType", UtilMisc.toMap("partyTypeId", "PARTY_GROUP"));
+            GenericValue party = delegator.findOne("Party", UtilMisc.toMap("partyId", partyId), false);
+            GenericValue partyGroupPartyType = delegator.findOne("PartyType", UtilMisc.toMap("partyTypeId", "PARTY_GROUP"), true);
 
             if (partyGroupPartyType == null) {
                 return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, 
@@ -390,7 +390,7 @@ public class PartyServices {
                 String partyTypeId = "PARTY_GROUP";
 
                 if (UtilValidate.isNotEmpty(context.get("partyTypeId"))) {
-                    GenericValue desiredPartyType = delegator.findByPrimaryKeyCache("PartyType", UtilMisc.toMap("partyTypeId", context.get("partyTypeId")));
+                    GenericValue desiredPartyType = delegator.findOne("PartyType", UtilMisc.toMap("partyTypeId", context.get("partyTypeId")), true);
                     if (desiredPartyType != null && EntityTypeUtil.isType(desiredPartyType, partyGroupPartyType)) {
                         partyTypeId = desiredPartyType.getString("partyTypeId");
                     } else {
@@ -421,7 +421,7 @@ public class PartyServices {
                 partyStat.create();
             }
 
-            GenericValue partyGroup = delegator.findByPrimaryKey("PartyGroup", UtilMisc.toMap("partyId", partyId));
+            GenericValue partyGroup = delegator.findOne("PartyGroup", UtilMisc.toMap("partyId", partyId), false);
             if (partyGroup != null) {
                 return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, 
                         "partyservices.cannot_create_party_group_already_exists", locale));
@@ -465,8 +465,8 @@ public class PartyServices {
         GenericValue party = null;
 
         try {
-            partyGroup = delegator.findByPrimaryKey("PartyGroup", UtilMisc.toMap("partyId", partyId));
-            party = delegator.findByPrimaryKey("Party", UtilMisc.toMap("partyId", partyId));
+            partyGroup = delegator.findOne("PartyGroup", UtilMisc.toMap("partyId", partyId), false);
+            party = delegator.findOne("Party", UtilMisc.toMap("partyId", partyId), false);
         } catch (GenericEntityException e) {
             Debug.logWarning(e, module);
             return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, 
@@ -544,7 +544,7 @@ public class PartyServices {
         GenericValue party = null;
 
         try {
-            party = delegator.findByPrimaryKey("Party", UtilMisc.toMap("partyId", partyId));
+            party = delegator.findOne("Party", UtilMisc.toMap("partyId", partyId), false);
         } catch (GenericEntityException e) {
             Debug.logWarning(e.getMessage(), module);
         }
@@ -557,7 +557,7 @@ public class PartyServices {
         GenericValue affiliate = null;
 
         try {
-            affiliate = delegator.findByPrimaryKey("Affiliate", UtilMisc.toMap("partyId", partyId));
+            affiliate = delegator.findOne("Affiliate", UtilMisc.toMap("partyId", partyId), false);
         } catch (GenericEntityException e) {
             Debug.logWarning(e.getMessage(), module);
         }
@@ -604,7 +604,7 @@ public class PartyServices {
         GenericValue affiliate = null;
 
         try {
-            affiliate = delegator.findByPrimaryKey("Affiliate", UtilMisc.toMap("partyId", partyId));
+            affiliate = delegator.findOne("Affiliate", UtilMisc.toMap("partyId", partyId), false);
         } catch (GenericEntityException e) {
             Debug.logWarning(e, module);
             return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, 
@@ -650,7 +650,7 @@ public class PartyServices {
         //Make sure the note Id actually exists if one is passed to avoid a foreign key error below
         if (noteId != null) {
             try {
-                GenericValue value = delegator.findByPrimaryKey("NoteData", UtilMisc.toMap("noteId", noteId));
+                GenericValue value = delegator.findOne("NoteData", UtilMisc.toMap("noteId", noteId), false);
                 if (value == null) {
                     Debug.logError("ERROR: Note id does not exist for : " + noteId + ", autogenerating." , module);
                     noteId = null;
@@ -918,7 +918,7 @@ public class PartyServices {
         GenericValue person = null;
 
         try {
-            person = delegator.findByPrimaryKeyCache("Person", UtilMisc.toMap("partyId", partyId));
+            person = delegator.findOne("Person", UtilMisc.toMap("partyId", partyId), true);
         } catch (GenericEntityException e) {
             return ServiceUtil.returnError(UtilProperties.getMessage(resourceError,
                     "partyservices.cannot_get_party_entities_read",
@@ -965,8 +965,8 @@ public class PartyServices {
 
         try {
             // validate the existance of party and dataSource
-            GenericValue party = delegator.findByPrimaryKey("Party", UtilMisc.toMap("partyId", partyId));
-            GenericValue dataSource = delegator.findByPrimaryKey("DataSource", UtilMisc.toMap("dataSourceId", dataSourceId));
+            GenericValue party = delegator.findOne("Party", UtilMisc.toMap("partyId", partyId), false);
+            GenericValue dataSource = delegator.findOne("DataSource", UtilMisc.toMap("dataSourceId", dataSourceId), false);
             if (party == null || dataSource == null) {
                 List<String> errorList = UtilMisc.toList(UtilProperties.getMessage(resource, 
                         "PartyCannotCreatePartyDataSource", locale));
@@ -1018,7 +1018,7 @@ public class PartyServices {
         try {
             roleTypeId = (String) context.get("roleTypeId");
             if (UtilValidate.isNotEmpty(roleTypeId)) {
-                GenericValue currentRole = delegator.findByPrimaryKeyCache("RoleType", UtilMisc.toMap("roleTypeId", roleTypeId));
+                GenericValue currentRole = delegator.findOne("RoleType", UtilMisc.toMap("roleTypeId", roleTypeId), true);
                 result.put("currentRole", currentRole);
             }
         } catch (GenericEntityException e) {
@@ -1046,7 +1046,7 @@ public class PartyServices {
         try {
             partyTypeId = (String) context.get("partyTypeId");
             if (UtilValidate.isNotEmpty(partyTypeId)) {
-                GenericValue currentPartyType = delegator.findByPrimaryKeyCache("PartyType", UtilMisc.toMap("partyTypeId", partyTypeId));
+                GenericValue currentPartyType = delegator.findOne("PartyType", UtilMisc.toMap("partyTypeId", partyTypeId), true);
                 result.put("currentPartyType", currentPartyType);
             }
         } catch (GenericEntityException e) {
@@ -1062,7 +1062,7 @@ public class PartyServices {
         try {
             stateProvinceGeoId = (String) context.get("stateProvinceGeoId");
             if (UtilValidate.isNotEmpty(stateProvinceGeoId)) {
-                GenericValue currentStateGeo = delegator.findByPrimaryKeyCache("Geo", UtilMisc.toMap("geoId", stateProvinceGeoId));
+                GenericValue currentStateGeo = delegator.findOne("Geo", UtilMisc.toMap("geoId", stateProvinceGeoId), true);
                 result.put("currentStateGeo", currentStateGeo);
             }
         } catch (GenericEntityException e) {
@@ -1514,7 +1514,7 @@ public class PartyServices {
         // get the from/to party records
         GenericValue partyTo;
         try {
-            partyTo = delegator.findByPrimaryKey("Party", UtilMisc.toMap("partyId", partyIdTo));
+            partyTo = delegator.findOne("Party", UtilMisc.toMap("partyId", partyIdTo), false);
         } catch (GenericEntityException e) {
             Debug.logInfo(e, module);
             return ServiceUtil.returnError(e.getMessage());
@@ -1530,7 +1530,7 @@ public class PartyServices {
 
         GenericValue party;
         try {
-            party = delegator.findByPrimaryKey("Party", UtilMisc.toMap("partyId", partyId));
+            party = delegator.findOne("Party", UtilMisc.toMap("partyId", partyId), false);
         } catch (GenericEntityException e) {
             Debug.logInfo(e, module);
             return ServiceUtil.returnError(e.getMessage());
@@ -1606,7 +1606,7 @@ public class PartyServices {
         for (GenericValue attr: rolesToMove) {
             attr.set("partyId", partyIdTo);
             try {
-                if (delegator.findByPrimaryKey("PartyRole", attr.getPrimaryKey()) == null) {
+                if (delegator.findOne("PartyRole", attr.getPrimaryKey(), false) == null) {
                     attr.create();
                 }
             } catch (GenericEntityException e) {
@@ -1698,7 +1698,7 @@ public class PartyServices {
         for (GenericValue attr: attrsToMove) {
             attr.set("partyId", partyIdTo);
             try {
-                if (delegator.findByPrimaryKey("PartyAttribute", attr.getPrimaryKey()) == null) {
+                if (delegator.findOne("PartyAttribute", attr.getPrimaryKey(), false) == null) {
                     attr.create();
                 }
             } catch (GenericEntityException e) {

Modified: ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyWorker.java?rev=1337670&r1=1337669&r2=1337670&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyWorker.java (original)
+++ ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyWorker.java Sat May 12 21:19:49 2012
@@ -58,7 +58,7 @@ public class PartyWorker {
         Delegator delegator = (Delegator) request.getAttribute("delegator");
         Map<String, GenericValue> result = FastMap.newInstance();
         try {
-            GenericValue party = delegator.findByPrimaryKey("Party", UtilMisc.toMap("partyId", partyId));
+            GenericValue party = delegator.findOne("Party", UtilMisc.toMap("partyId", partyId), false);
 
             if (party != null)
                 result.put(partyAttr, party);
@@ -67,7 +67,7 @@ public class PartyWorker {
         }
 
         try {
-            GenericValue person = delegator.findByPrimaryKey("Person", UtilMisc.toMap("partyId", partyId));
+            GenericValue person = delegator.findOne("Person", UtilMisc.toMap("partyId", partyId), false);
 
             if (person != null)
                 result.put(personAttr, person);
@@ -76,7 +76,7 @@ public class PartyWorker {
         }
 
         try {
-            GenericValue partyGroup = delegator.findByPrimaryKey("PartyGroup", UtilMisc.toMap("partyId", partyId));
+            GenericValue partyGroup = delegator.findOne("PartyGroup", UtilMisc.toMap("partyId", partyId), false);
 
             if (partyGroup != null)
                 result.put(partyGroupAttr, partyGroup);
@@ -260,7 +260,7 @@ public class PartyWorker {
             for (GenericValue partyAndAddr: validFound) {
                 String partyId = partyAndAddr.getString("partyId");
                 if (UtilValidate.isNotEmpty(partyId)) {
-                    GenericValue p = delegator.findByPrimaryKey("Person", UtilMisc.toMap("partyId", partyId));
+                    GenericValue p = delegator.findOne("Person", UtilMisc.toMap("partyId", partyId), false);
                     if (p != null) {
                         String fName = p.getString("firstName");
                         String lName = p.getString("lastName");
@@ -493,7 +493,7 @@ public class PartyWorker {
 
         // 1) look if the idToFind given is a real partyId
         if (searchPartyFirst) {
-            party = delegator.findByPrimaryKeyCache("Party", UtilMisc.toMap("partyId", idToFind));
+            party = delegator.findOne("Party", UtilMisc.toMap("partyId", idToFind), true);
         }
 
         if (searchAllId || (searchPartyFirst && UtilValidate.isEmpty(party))) {
@@ -506,7 +506,7 @@ public class PartyWorker {
         }
 
         if (! searchPartyFirst) {
-            party = delegator.findByPrimaryKeyCache("Party", UtilMisc.toMap("partyId", idToFind));
+            party = delegator.findOne("Party", UtilMisc.toMap("partyId", idToFind), true);
         }
 
         if (UtilValidate.isNotEmpty(party)) {
@@ -549,7 +549,7 @@ public class PartyWorker {
                 GenericValue partyToAdd = party;
                 //retreive party GV if the actual genericValue came from viewEntity
                 if (! "Party".equals(party.getEntityName())) {
-                    partyToAdd = delegator.findByPrimaryKeyCache("Party", UtilMisc.toMap("partyId", party.get("partyId")));
+                    partyToAdd = delegator.findOne("Party", UtilMisc.toMap("partyId", party.get("partyId")), true);
                 }
 
                 if (UtilValidate.isEmpty(parties)) {

Modified: ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/communication/GetMyCommunicationEventRole.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/communication/GetMyCommunicationEventRole.groovy?rev=1337670&r1=1337669&r2=1337670&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/communication/GetMyCommunicationEventRole.groovy (original)
+++ ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/communication/GetMyCommunicationEventRole.groovy Sat May 12 21:19:49 2012
@@ -22,11 +22,11 @@ import org.ofbiz.entity.util.EntityUtil;
 import org.ofbiz.base.component.ComponentConfig;
 
 if (parameters.communicationEventId) {
-    context.communicationEventRole = delegator.findByPrimaryKey("CommunicationEventRole",
+    context.communicationEventRole = delegator.findOne("CommunicationEventRole",
            ["communicationEventId" : parameters.communicationEventId,
             "partyId" : parameters.partyId,
             "roleTypeId" : parameters.roleTypeId
-           ]);
+           ], false);
 
     context.projectMgrExists = ComponentConfig.componentExists("projectmgr");
 }

Modified: ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/communication/ListCommunications.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/communication/ListCommunications.groovy?rev=1337670&r1=1337669&r2=1337670&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/communication/ListCommunications.groovy (original)
+++ ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/communication/ListCommunications.groovy Sat May 12 21:19:49 2012
@@ -25,7 +25,7 @@ import javolution.util.FastList;
 partyId = parameters.partyId;
 context.partyId = partyId;
 
-party = delegator.findByPrimaryKey("Party", [partyId : partyId]);
+party = delegator.findOne("Party", [partyId : partyId], false);
 context.party = party;
 
 // get the sort field

Modified: ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/EditContactMech.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/EditContactMech.groovy?rev=1337670&r1=1337669&r2=1337670&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/EditContactMech.groovy (original)
+++ ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/EditContactMech.groovy Sat May 12 21:19:49 2012
@@ -32,7 +32,7 @@ context.paymentMethodId = parameters.pay
 
 cmNewPurposeTypeId = parameters.contactMechPurposeTypeId;
 if (cmNewPurposeTypeId) {
-    contactMechPurposeType = delegator.findByPrimaryKey("ContactMechPurposeType", [contactMechPurposeTypeId : cmNewPurposeTypeId]);
+    contactMechPurposeType = delegator.findOne("ContactMechPurposeType", [contactMechPurposeTypeId : cmNewPurposeTypeId], false);
     if (contactMechPurposeType) {
         context.contactMechPurposeType = contactMechPurposeType;
     } else {

Modified: ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/EditShoppingList.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/EditShoppingList.groovy?rev=1337670&r1=1337669&r2=1337670&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/EditShoppingList.groovy (original)
+++ ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/EditShoppingList.groovy Sat May 12 21:19:49 2012
@@ -29,7 +29,7 @@ context.currencyUomId = currencyUomId;
 
 partyId = parameters.partyId ?:request.getAttribute("partyId");
 
-party = delegator.findByPrimaryKey("Party", [partyId : partyId]);
+party = delegator.findOne("Party", [partyId : partyId], false);
 context.party = party;
 if (party) {
     context.lookupPerson = party.getRelatedOne("Person");
@@ -40,7 +40,7 @@ shoppingListId = parameters.shoppingList
 
 //get the party for listid if it exists
 if (!partyId && shoppingListId) {
-    partyId = delegator.findByPrimaryKey("ShoppingList", [shoppingListId : shoppingListId]).partyId;
+    partyId = delegator.findOne("ShoppingList", [shoppingListId : shoppingListId], false).partyId;
 }
 context.partyId = partyId;
 
@@ -64,7 +64,7 @@ if (!shoppingListId) {
 
 // if we passed a shoppingListId get the shopping list info
 if (shoppingListId) {
-    shoppingList = delegator.findByPrimaryKey("ShoppingList", [shoppingListId : shoppingListId]);
+    shoppingList = delegator.findOne("ShoppingList", [shoppingListId : shoppingListId], false);
     context.shoppingList = shoppingList;
     context.shoppingListId = shoppingListId;
 

Modified: ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/FindMatches.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/FindMatches.groovy?rev=1337670&r1=1337669&r2=1337670&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/FindMatches.groovy (original)
+++ ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/FindMatches.groovy Sat May 12 21:19:49 2012
@@ -33,7 +33,7 @@ if (match) {
     postalCode = parameters.postalCode ?: null;
 
     if (state) {
-        context.currentStateGeo = delegator.findByPrimaryKey("Geo", [geoId : state]);
+        context.currentStateGeo = delegator.findOne("Geo", [geoId : state], false);
     }
 
     if (!firstName || !lastName || !address1 || !city || !postalCode) {

Modified: ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/GetLoyaltyPoints.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/GetLoyaltyPoints.groovy?rev=1337670&r1=1337669&r2=1337670&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/GetLoyaltyPoints.groovy (original)
+++ ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/GetLoyaltyPoints.groovy Sat May 12 21:19:49 2012
@@ -23,7 +23,7 @@ partyId = parameters.partyId ? parameter
 
 if (partyId) {
     // get the system user
-    system = delegator.findByPrimaryKey("UserLogin", [userLoginId : "system"]);
+    system = delegator.findOne("UserLogin", [userLoginId : "system"], false);
 
     monthsToInclude = 12;
 

Modified: ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/PartyGeoLocation.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/PartyGeoLocation.groovy?rev=1337670&r1=1337669&r2=1337670&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/PartyGeoLocation.groovy (original)
+++ ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/PartyGeoLocation.groovy Sat May 12 21:19:49 2012
@@ -27,7 +27,7 @@ partyId = parameters.partyId ?: paramete
 userLoginId = parameters.userlogin_id ?: parameters.userLoginId;
 
 if (!partyId && userLoginId) {
-    thisUserLogin = delegator.findByPrimaryKey("UserLogin", [userLoginId : userLoginId]);
+    thisUserLogin = delegator.findOne("UserLogin", [userLoginId : userLoginId], false);
     if (thisUserLogin) {
         partyId = thisUserLogin.partyId;
     }
@@ -38,7 +38,7 @@ context.partyId = partyId;
 if (!geoPointId) {
     latestGeoPoint = GeoWorker.findLatestGeoPoint(delegator, "PartyAndGeoPoint", "partyId", partyId, null, null);
 } else {
-    latestGeoPoint = delegator.findByPrimaryKey("GeoPoint", [geoPointId : geoPointId]);
+    latestGeoPoint = delegator.findOne("GeoPoint", [geoPointId : geoPointId], false);
 }
 if (latestGeoPoint) {
     context.latestGeoPoint = latestGeoPoint;

Modified: ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/ViewProfile.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/ViewProfile.groovy?rev=1337670&r1=1337669&r2=1337670&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/ViewProfile.groovy (original)
+++ ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/ViewProfile.groovy Sat May 12 21:19:49 2012
@@ -23,7 +23,7 @@ partyId = parameters.partyId ?: paramete
 userLoginId = parameters.userlogin_id ?: parameters.userLoginId;
 
 if (!partyId && userLoginId) {
-    thisUserLogin = delegator.findByPrimaryKey("UserLogin", [userLoginId : userLoginId]);
+    thisUserLogin = delegator.findOne("UserLogin", [userLoginId : userLoginId], false);
     if (thisUserLogin) {
         partyId = thisUserLogin.partyId;
         parameters.partyId = partyId;
@@ -32,5 +32,5 @@ if (!partyId && userLoginId) {
 
 context.showOld = "true".equals(parameters.SHOW_OLD);
 context.partyId = partyId;
-context.party = delegator.findByPrimaryKey("Party", [partyId : partyId]);
+context.party = delegator.findOne("Party", [partyId : partyId], false);
 context.nowStr = UtilDateTime.nowTimestamp().toString();

Modified: ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/visit/VisitDetails.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/visit/VisitDetails.groovy?rev=1337670&r1=1337669&r2=1337670&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/visit/VisitDetails.groovy (original)
+++ ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/visit/VisitDetails.groovy Sat May 12 21:19:49 2012
@@ -23,7 +23,7 @@ visitId = parameters.visitId;
 visit = null;
 serverHits = null;
 if (visitId) {
-    visit = delegator.findByPrimaryKey("Visit", [visitId : visitId]);
+    visit = delegator.findOne("Visit", [visitId : visitId], false);
     if (visit) {
         serverHits = delegator.findByAnd("ServerHit", [visitId : visitId], ["-hitStartDateTime"]);
     }

Modified: ofbiz/trunk/applications/party/webapp/partymgr/party/editcontactmech.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/party/editcontactmech.ftl?rev=1337670&r1=1337669&r2=1337670&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/party/editcontactmech.ftl (original)
+++ ofbiz/trunk/applications/party/webapp/partymgr/party/editcontactmech.ftl Sat May 12 21:19:49 2012
@@ -172,7 +172,7 @@ under the License.
            <#assign defaultCountryGeoId = Static["org.ofbiz.base.util.UtilProperties"].getPropertyValue("general.properties", "country.geo.id.default")>
           </#if>
           <option selected="selected" value="${defaultCountryGeoId}">
-            <#assign countryGeo = delegator.findByPrimaryKey("Geo",Static["org.ofbiz.base.util.UtilMisc"].toMap("geoId",defaultCountryGeoId))>
+            <#assign countryGeo = delegator.findOne("Geo",Static["org.ofbiz.base.util.UtilMisc"].toMap("geoId",defaultCountryGeoId), false)>
             ${countryGeo.get("geoName",locale)}
           </option>
         </select>

Modified: ofbiz/trunk/applications/party/webapp/partymgr/party/profileblocks/mytasks.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/party/profileblocks/mytasks.ftl?rev=1337670&r1=1337669&r2=1337670&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/party/profileblocks/mytasks.ftl (original)
+++ ofbiz/trunk/applications/party/webapp/partymgr/party/profileblocks/mytasks.ftl Sat May 12 21:19:49 2012
@@ -41,7 +41,7 @@ under the License.
       <tr<#if alt_row> class="alternate-row"</#if>>
         <td>${(workEffort.estimatedStartDate.toString())?if_exists}</td>
         <td>${workEffort.priority?if_exists}</td>
-        <td>${(delegator.findByPrimaryKeyCache("StatusItem", Static["org.ofbiz.base.util.UtilMisc"].toMap("statusId", workEffort.getString("currentStatusId"))).get("description",locale))?if_exists}</td>
+        <td>${(delegator.findOne("StatusItem", Static["org.ofbiz.base.util.UtilMisc"].toMap("statusId", workEffort.getString("currentStatusId")), true).get("description",locale))?if_exists}</td>
         <td><a href="<@o...@ofbizContentUrl>">${workEffort.workEffortName}</a></td>
         <td class="button-col"><a href="<@o...@ofbizContentUrl>">${workEffort.workEffortId}</a></td>
       </tr>
@@ -66,8 +66,8 @@ under the License.
         <tr<#if alt_row> class="alternate-row"</#if>>
           <td>${(workEffort.estimatedStartDate.toString())?if_exists}</td>
           <td>${workEffort.priority?if_exists}</td>
-          <td>${(delegator.findByPrimaryKeyCache("StatusItem", Static["org.ofbiz.base.util.UtilMisc"].toMap("statusId", workEffort.getString("currentStatusId"))).get("description",locale))?if_exists}</td>
-          <td>${(delegator.findByPrimaryKeyCache("StatusItem", Static["org.ofbiz.base.util.UtilMisc"].toMap("statusId", workEffort.getString("statusId"))).get("description",locale))?if_exists}</td>
+          <td>${(delegator.findOne("StatusItem", Static["org.ofbiz.base.util.UtilMisc"].toMap("statusId", workEffort.getString("currentStatusId")), true).get("description",locale))?if_exists}</td>
+          <td>${(delegator.findOne("StatusItem", Static["org.ofbiz.base.util.UtilMisc"].toMap("statusId", workEffort.getString("statusId")), true).get("description",locale))?if_exists}</td>
           <#-- <td>${workEffort.partyId}</td> -->
           <td>${workEffort.roleTypeId}</td>
           <td><a href="<@o...@ofbizContentUrl>">${workEffort.workEffortName}</a></td>
@@ -95,8 +95,8 @@ under the License.
         <tr<#if alt_row> class="alternate-row"</#if>>
           <td>${(workEffort.estimatedStartDate.toString())?if_exists}</td>
           <td>${workEffort.priority?if_exists}</td>
-          <td>${(delegator.findByPrimaryKeyCache("StatusItem", Static["org.ofbiz.base.util.UtilMisc"].toMap("statusId", workEffort.getString("currentStatusId"))).get("description",locale))?if_exists}</td>
-          <td>${(delegator.findByPrimaryKeyCache("StatusItem", Static["org.ofbiz.base.util.UtilMisc"].toMap("statusId", workEffort.getString("statusId"))).get("description",locale))?if_exists}</td>
+          <td>${(delegator.findOne("StatusItem", Static["org.ofbiz.base.util.UtilMisc"].toMap("statusId", workEffort.getString("currentStatusId")), true).get("description",locale))?if_exists}</td>
+          <td>${(delegator.findOne("StatusItem", Static["org.ofbiz.base.util.UtilMisc"].toMap("statusId", workEffort.getString("statusId")), true).get("description",locale))?if_exists}</td>
           <#-- <td>${workEffort.partyId}</td> -->
           <td>${workEffort.roleTypeId}</td>
           <td><a href="<@o...@ofbizContentUrl>">${workEffort.workEffortName}</a></td>
@@ -124,8 +124,8 @@ under the License.
         <tr<#if alt_row> class="alternate-row"</#if>>
           <td>${(workEffort.estimatedStartDate.toString())?if_exists}</td>
           <td>${workEffort.priority?if_exists}</td>
-          <td>${(delegator.findByPrimaryKeyCache("StatusItem", Static["org.ofbiz.base.util.UtilMisc"].toMap("statusId", workEffort.getString("currentStatusId"))).get("description",locale))?if_exists}</td>
-          <td>${(delegator.findByPrimaryKeyCache("StatusItem", Static["org.ofbiz.base.util.UtilMisc"].toMap("statusId", workEffort.getString("statusId"))).get("description",locale))?if_exists}</td>
+          <td>${(delegator.findOne("StatusItem", Static["org.ofbiz.base.util.UtilMisc"].toMap("statusId", workEffort.getString("currentStatusId")), true).get("description",locale))?if_exists}</td>
+          <td>${(delegator.findOne("StatusItem", Static["org.ofbiz.base.util.UtilMisc"].toMap("statusId", workEffort.getString("statusId")), true).get("description",locale))?if_exists}</td>
           <td>${workEffort.groupPartyId}</td>
           <#-- <td>${workEffort.roleTypeId}</td> -->
           <td><a href="<@o...@ofbizContentUrl>">${workEffort.workEffortName}</a></td>