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:21:06 UTC
svn commit: r1337677 - in /ofbiz/trunk/specialpurpose/ecommerce:
src/org/ofbiz/ecommerce/janrain/ webapp/ecommerce/WEB-INF/actions/cart/
webapp/ecommerce/WEB-INF/actions/catalog/
webapp/ecommerce/WEB-INF/actions/content/ webapp/ecommerce/WEB-INF/action...
Author: doogie
Date: Sat May 12 21:21:05 2012
New Revision: 1337677
URL: http://svn.apache.org/viewvc?rev=1337677&view=rev
Log:
DEPRECATION: specialpurpose/ecommerce: findByPrimaryKey variants
replaced with findOne
Modified:
ofbiz/trunk/specialpurpose/ecommerce/src/org/ofbiz/ecommerce/janrain/JanrainHelper.java
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/cart/ShowCart.groovy
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/catalog/MiniProductSummary.groovy
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/catalog/ProductCategories.groovy
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/catalog/ajaxbreadcrumbs.groovy
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/content/Mrv.groovy
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/CustomerSurvey.groovy
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditContactMech.groovy
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditShippingAddress.groovy
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/ViewProfile.groovy
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/forum/ContentAddPrep.groovy
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/forum/ContentPrep.groovy
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/forum/EditAddPrep.groovy
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/forum/PermPrep.groovy
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/forum/RespondPermAndPrep.groovy
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/forum/ResponsePrep.groovy
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/forum/ViewPrep.groovy
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/BillSettings.groovy
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/CheckoutReview.groovy
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/CustSettings.groovy
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/OptionSettings.groovy
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/OrderHistory.groovy
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/OrderStatus.groovy
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/PaymentInformation.groovy
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/QuickAnonCustSettings.groovy
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/QuickAnonOptionSettings.groovy
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/RequestReturn.groovy
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/ShipSettings.groovy
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/ShipmentStatus.groovy
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/SplitShip.groovy
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/shoppinglist/EditShoppingList.groovy
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/catalog/ProductCategoryLink.ftl
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/catalog/ShowBestSellingCategory.ftl
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/catalog/advancedsearch.ftl
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/catalog/minilastviewedcategories.ftl
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/content/searchContent.ftl
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/content/viewcontent.ftl
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/customer/editcontactmech.ftl
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/customer/newcustomer.ftl
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/forum/showforumresponse.ftl
Modified: ofbiz/trunk/specialpurpose/ecommerce/src/org/ofbiz/ecommerce/janrain/JanrainHelper.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/src/org/ofbiz/ecommerce/janrain/JanrainHelper.java?rev=1337677&r1=1337676&r2=1337677&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/src/org/ofbiz/ecommerce/janrain/JanrainHelper.java (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/src/org/ofbiz/ecommerce/janrain/JanrainHelper.java Sat May 12 21:21:05 2012
@@ -231,7 +231,7 @@ public class JanrainHelper {
request.setAttribute("userInfoMap", result);
try {
- GenericValue userLogin = delegator.findByPrimaryKeyCache("UserLogin", UtilMisc.toMap("userLoginId", preferredUsername));
+ GenericValue userLogin = delegator.findOne("UserLogin", UtilMisc.toMap("userLoginId", preferredUsername), true);
if (UtilValidate.isNotEmpty(userLogin)) {
LoginWorker.doBasicLogin(userLogin, request);
LoginWorker.autoLoginSet(request, response);
Modified: ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/cart/ShowCart.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/cart/ShowCart.groovy?rev=1337677&r1=1337676&r2=1337677&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/cart/ShowCart.groovy (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/cart/ShowCart.groovy Sat May 12 21:21:05 2012
@@ -34,7 +34,7 @@ context.productStore = ProductStoreWorke
if (parameters.add_product_id) { // check if a parameter is passed
add_product_id = parameters.add_product_id;
- product = delegator.findByPrimaryKeyCache("Product", [productId : add_product_id]);
+ product = delegator.findOne("Product", [productId : add_product_id], true);
context.product = product;
}
Modified: ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/catalog/MiniProductSummary.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/catalog/MiniProductSummary.groovy?rev=1337677&r1=1337676&r2=1337677&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/catalog/MiniProductSummary.groovy (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/catalog/MiniProductSummary.groovy Sat May 12 21:21:05 2012
@@ -38,7 +38,7 @@ cart = ShoppingCartEvents.getCartObject(
context.remove("totalPrice");
if (optProductId) {
- miniProduct = delegator.findByPrimaryKey("Product", [productId : optProductId]);
+ miniProduct = delegator.findOne("Product", [productId : optProductId], false);
}
if (miniProduct && productStoreId && prodCatalogId ) {
Modified: ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/catalog/ProductCategories.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/catalog/ProductCategories.groovy?rev=1337677&r1=1337676&r2=1337677&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/catalog/ProductCategories.groovy (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/catalog/ProductCategories.groovy Sat May 12 21:21:05 2012
@@ -56,7 +56,7 @@ List fillTree(rootCat ,CatLvl, parentCat
// Display the category if this category containing products or contain the category that's containing products
if(productsInCat || childList) {
def rootMap = FastMap.newInstance();
- category = delegator.findByPrimaryKey("ProductCategory", ["productCategoryId": root.productCategoryId]);
+ category = delegator.findOne("ProductCategory", ["productCategoryId": root.productCategoryId], false);
categoryContentWrapper = new CategoryContentWrapper(category, request);
context.title = categoryContentWrapper.CATEGORY_NAME;
categoryDescription = categoryContentWrapper.DESCRIPTION;
Modified: ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/catalog/ajaxbreadcrumbs.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/catalog/ajaxbreadcrumbs.groovy?rev=1337677&r1=1337676&r2=1337677&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/catalog/ajaxbreadcrumbs.groovy (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/catalog/ajaxbreadcrumbs.groovy Sat May 12 21:21:05 2012
@@ -29,7 +29,7 @@ if(!UtilValidate.isEmpty(parentCategoryS
pathTemp = '';
for(path in pathList) {
cateMap = FastMap.newInstance();
- category = delegator.findByPrimaryKey("ProductCategory", ["productCategoryId": path]);
+ category = delegator.findOne("ProductCategory", ["productCategoryId": path], false);
categoryContentWrapper = new CategoryContentWrapper(category, request);
pathTemp = pathTemp + path;
@@ -44,7 +44,7 @@ if(!UtilValidate.isEmpty(parentCategoryS
context.productCategoryTrail = cateList;
}
-currentCategory = delegator.findByPrimaryKey("ProductCategory", ["productCategoryId": productCategoryId]);
+currentCategory = delegator.findOne("ProductCategory", ["productCategoryId": productCategoryId], false);
currentCategoryContentWrapper = new CategoryContentWrapper(currentCategory, request);
context.currentCategoryName = currentCategoryContentWrapper.CATEGORY_NAME;
context.currentCategoryDescription = currentCategoryContentWrapper.DESCRIPTION;
Modified: ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/content/Mrv.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/content/Mrv.groovy?rev=1337677&r1=1337676&r2=1337677&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/content/Mrv.groovy (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/content/Mrv.groovy Sat May 12 21:21:05 2012
@@ -66,7 +66,7 @@ lifoSet.each { pk0 ->
} else {
// should handle errors in some other way; this does not provide any tracing; impossible to locat
// where the error actually occured
- //Debug.logError("findByPrimaryKey on " + pk + " returned null");
+ //Debug.logError("findOne on " + pk + " returned null");
}
}
context.put("mrvList", mrvList);
Modified: ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/CustomerSurvey.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/CustomerSurvey.groovy?rev=1337677&r1=1337676&r2=1337677&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/CustomerSurvey.groovy (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/CustomerSurvey.groovy Sat May 12 21:21:05 2012
@@ -27,7 +27,7 @@ paramMap = UtilHttp.getParameterMap(requ
productStoreSurveyId = parameters.productStoreSurveyId;
-surveyAppl = delegator.findByPrimaryKey("ProductStoreSurveyAppl", [productStoreSurveyId : productStoreSurveyId]);
+surveyAppl = delegator.findOne("ProductStoreSurveyAppl", [productStoreSurveyId : productStoreSurveyId], false);
if (surveyAppl) {
survey = surveyAppl.getRelatedOne("Survey");
context.survey = survey;
Modified: ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditContactMech.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditContactMech.groovy?rev=1337677&r1=1337676&r2=1337677&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditContactMech.groovy (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditContactMech.groovy Sat May 12 21:21:05 2012
@@ -46,7 +46,7 @@ if (paymentMethodId) context.paymentMeth
cmNewPurposeTypeId = parameters.contactMechPurposeTypeId;
if (cmNewPurposeTypeId) {
- contactMechPurposeType = delegator.findByPrimaryKey("ContactMechPurposeType", [contactMechPurposeTypeId : cmNewPurposeTypeId]);
+ contactMechPurposeType = delegator.findOne("ContactMechPurposeType", [contactMechPurposeTypeId : cmNewPurposeTypeId], false);
if (contactMechPurposeType) {
context.contactMechPurposeType = contactMechPurposeType;
} else {
@@ -79,24 +79,24 @@ if (telecomNumberData) context.telecomNu
// load the geo names for selected countries and states/regions
if (parameters.countryGeoId) {
- geoValue = delegator.findByPrimaryKeyCache("Geo", [geoId : parameters.countryGeoId]);
+ geoValue = delegator.findOne("Geo", [geoId : parameters.countryGeoId], true);
if (geoValue) {
context.selectedCountryName = geoValue.geoName;
}
} else if (postalAddressData?.countryGeoId) {
- geoValue = delegator.findByPrimaryKeyCache("Geo", [geoId : postalAddressData.countryGeoId]);
+ geoValue = delegator.findOne("Geo", [geoId : postalAddressData.countryGeoId], true);
if (geoValue) {
context.selectedCountryName = geoValue.geoName;
}
}
if (parameters.stateProvinceGeoId) {
- geoValue = delegator.findByPrimaryKeyCache("Geo", [geoId : parameters.stateProvinceGeoId]);
+ geoValue = delegator.findOne("Geo", [geoId : parameters.stateProvinceGeoId], true);
if (geoValue) {
context.selectedStateName = geoValue.geoId;
}
} else if (postalAddressData?.stateProvinceGeoId) {
- geoValue = delegator.findByPrimaryKeyCache("Geo", [geoId : postalAddressData.stateProvinceGeoId]);
+ geoValue = delegator.findOne("Geo", [geoId : postalAddressData.stateProvinceGeoId], true);
if (geoValue) {
context.selectedStateName = geoValue.geoId;
}
Modified: ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditShippingAddress.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditShippingAddress.groovy?rev=1337677&r1=1337676&r2=1337677&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditShippingAddress.groovy (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditShippingAddress.groovy Sat May 12 21:21:05 2012
@@ -24,11 +24,11 @@ if (userLogin) {
party = userLogin.getRelatedOne("Party");
context.partyId = party.partyId
if ("PERSON".equals(party.partyTypeId)) {
- person = delegator.findByPrimaryKey("Person", [partyId : party.partyId]);
+ person = delegator.findOne("Person", [partyId : party.partyId], false);
context.firstName = person.firstName;
context.lastName = person.lastName;
} else {
- group = delegator.findByPrimaryKey("PartyGroup", [partyId : party.partyId]);
+ group = delegator.findOne("PartyGroup", [partyId : party.partyId], false);
context.firstName = group.groupName;
context.lastName = "";
}
Modified: ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/ViewProfile.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/ViewProfile.groovy?rev=1337677&r1=1337676&r2=1337677&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/ViewProfile.groovy (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/ViewProfile.groovy Sat May 12 21:21:05 2012
@@ -31,7 +31,7 @@ productStoreId = ProductStoreWorker.getP
context.productStoreId = productStoreId;
if (userLogin) {
- profiledefs = delegator.findByPrimaryKey("PartyProfileDefault", [partyId : partyId, productStoreId : productStoreId]);
+ profiledefs = delegator.findOne("PartyProfileDefault", [partyId : partyId, productStoreId : productStoreId], false);
showOld = "true".equals(parameters.SHOW_OLD);
@@ -45,7 +45,7 @@ if (userLogin) {
// shipping methods - for default selection
if (profiledefs?.defaultShipAddr) {
- shipAddress = delegator.findByPrimaryKey("PostalAddress", [contactMechId : profiledefs.defaultShipAddr]);
+ shipAddress = delegator.findOne("PostalAddress", [contactMechId : profiledefs.defaultShipAddr], false);
if (shipAddress) {
carrierShipMeths = ProductStoreWorker.getAvailableStoreShippingMethods(delegator, productStoreId, shipAddress, [1], null, 0, 1);
context.carrierShipMethods = carrierShipMeths;
Modified: ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/forum/ContentAddPrep.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/forum/ContentAddPrep.groovy?rev=1337677&r1=1337676&r2=1337677&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/forum/ContentAddPrep.groovy (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/forum/ContentAddPrep.groovy Sat May 12 21:21:05 2012
@@ -76,7 +76,7 @@ contentPurpose = page.contentPurpose ?:
singleWrapper.putInContext("contentPurpose", contentPurpose);
singleWrapper.putInContext("forumId", contentIdTo);
-forumContent = delegator.findByPrimaryKeyCache("Content", [contentId : contentIdTo]);
+forumContent = delegator.findOne("Content", [contentId : contentIdTo], true);
statusId = "CTNT_PUBLISHED";
if (forumContent) {
statusId = forumContent.statusId;
Modified: ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/forum/ContentPrep.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/forum/ContentPrep.groovy?rev=1337677&r1=1337676&r2=1337677&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/forum/ContentPrep.groovy (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/forum/ContentPrep.groovy Sat May 12 21:21:05 2012
@@ -61,7 +61,7 @@ if (!contentId && currentValue) {
contentId = currentValue.contentId;
}
if (contentId && !currentValue) {
- currentValue = delegator.findByPrimaryKeyCache("Content", [contentId : contentId]);
+ currentValue = delegator.findOne("Content", [contentId : contentId], true);
}
//Debug.logInfo("in contentprep, currentValue(1):" + currentValue, "");
//Debug.logInfo("in contentprep, contentId(4):" + contentId, "");
Modified: ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/forum/EditAddPrep.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/forum/EditAddPrep.groovy?rev=1337677&r1=1337676&r2=1337677&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/forum/EditAddPrep.groovy (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/forum/EditAddPrep.groovy Sat May 12 21:21:05 2012
@@ -68,7 +68,7 @@ currentValue = ContentWorker.getSubConte
//Debug.logInfo("in editaddprep, currentValue:" + currentValue,"");
if (!currentValue) {
- parentValue = delegator.findByPrimaryKeyCache("Content", [contentId : contentIdTo]);
+ parentValue = delegator.findOne("Content", [contentId : contentIdTo], true);
currentValue = delegator.makeValue("Content");
subject = parentValue.contentName;
if ("SUMMARY".equals(mapKey)) {
Modified: ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/forum/PermPrep.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/forum/PermPrep.groovy?rev=1337677&r1=1337676&r2=1337677&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/forum/PermPrep.groovy (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/forum/PermPrep.groovy Sat May 12 21:21:05 2012
@@ -102,7 +102,7 @@ if (permissionType.equals("complex")) {
if (!currentValue || !"Content".equals(entityName)) {
if (thisContentId) {
- currentValue = delegator.findByPrimaryKey("Content", [contentId : thisContentId]);
+ currentValue = delegator.findOne("Content", [contentId : thisContentId], false);
}
}
if ("add".equals(mode)) {
Modified: ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/forum/RespondPermAndPrep.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/forum/RespondPermAndPrep.groovy?rev=1337677&r1=1337676&r2=1337677&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/forum/RespondPermAndPrep.groovy (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/forum/RespondPermAndPrep.groovy Sat May 12 21:21:05 2012
@@ -55,7 +55,7 @@ if (!pubPt) {
}
*/
-contentToValue = delegator.findByPrimaryKey("Content", [contentId : contentIdTo]);
+contentToValue = delegator.findOne("Content", [contentId : contentIdTo], false);
contentToPurposeList = contentToValue.getRelatedCache("ContentPurpose");
currentValue = delegator.makeValue("Content", [contentTypeId : "DOCUMENT", statusId : "CTNT_PUBLISHED", privilegeEnumId : "_00_"]);
@@ -105,7 +105,7 @@ if (!"granted".equals(permissionStatus))
}
/*
-pubContentValue = delegator.findByPrimaryKey("Content", [contentId : pubPt]);
+pubContentValue = delegator.findOne("Content", [contentId : pubPt], false);
if (pubContentValue) {
mapIn.currentContent = pubContentValue;
mapIn.statusId = "CTNT_PUBLISHED";
Modified: ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/forum/ResponsePrep.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/forum/ResponsePrep.groovy?rev=1337677&r1=1337676&r2=1337677&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/forum/ResponsePrep.groovy (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/forum/ResponsePrep.groovy Sat May 12 21:21:05 2012
@@ -63,7 +63,7 @@ if (trail) {
// start at 1 to skip webSiteId
idList.each { id ->
- webSitePublishPoint = delegator.findByPrimaryKeyCache("WebSitePublishPoint", [contentId : id]);
+ webSitePublishPoint = delegator.findOne("WebSitePublishPoint", [contentId : id], true);
siteAncestorList.add(webSitePublishPoint);
}
context.siteAncestorList = siteAncestorList;
Modified: ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/forum/ViewPrep.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/forum/ViewPrep.groovy?rev=1337677&r1=1337676&r2=1337677&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/forum/ViewPrep.groovy (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/forum/ViewPrep.groovy Sat May 12 21:21:05 2012
@@ -69,5 +69,5 @@ contentId = ContentManagementWorker.getF
context.subContentId = contentId;
context.contentIdTo = contentId;
forumId = ContentManagementWorker.getFromSomewhere("forumId", paramMap, request, context);
-//forumContent = delegator.findByPrimaryKeyCache("Content", [contentId : forumId]);
+//forumContent = delegator.findOne("Content", [contentId : forumId], true);
//context.forumContent = forumContent;
Modified: ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/BillSettings.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/BillSettings.groovy?rev=1337677&r1=1337676&r2=1337677&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/BillSettings.groovy (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/BillSettings.groovy Sat May 12 21:21:05 2012
@@ -40,7 +40,7 @@ context.partyId = partyId;
request.removeAttribute("_EVENT_MESSAGE_");
if (partyId && !partyId.equals("_NA_")) {
- party = delegator.findByPrimaryKey("Party", [partyId : partyId]);
+ party = delegator.findOne("Party", [partyId : partyId], false);
person = party.getRelatedOne("Person");
context.party = party;
context.person = person;
@@ -57,7 +57,7 @@ if (partyId && !partyId.equals("_NA_"))
if (parameters.useShipAddr && cart.getShippingContactMechId()) {
shippingContactMech = cart.getShippingContactMechId();
- postalAddress = delegator.findByPrimaryKey("PostalAddress", [contactMechId : shippingContactMech]);
+ postalAddress = delegator.findOne("PostalAddress", [contactMechId : shippingContactMech], false);
context.useEntityFields = "Y";
context.postalFields = postalAddress;
@@ -75,7 +75,7 @@ if (cart && !parameters.singleUsePayment
if (cart.getPaymentMethodIds() ) {
checkOutPaymentId = cart.getPaymentMethodIds()[0];
context.checkOutPaymentId = checkOutPaymentId;
- paymentMethod = delegator.findByPrimaryKey("PaymentMethod", [paymentMethodId : checkOutPaymentId]);
+ paymentMethod = delegator.findOne("PaymentMethod", [paymentMethodId : checkOutPaymentId], false);
account = null;
if ("CREDIT_CARD".equals(paymentMethod.paymentMethodTypeId)) {
Modified: ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/CheckoutReview.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/CheckoutReview.groovy?rev=1337677&r1=1337676&r2=1337677&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/CheckoutReview.groovy (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/CheckoutReview.groovy Sat May 12 21:21:05 2012
@@ -63,7 +63,7 @@ paymentMethodType = null;
paymentMethodTypeId = null;
if (paymentMethodTypeIds) {
paymentMethodTypeId = paymentMethodTypeIds[0];
- paymentMethodType = delegator.findByPrimaryKey("PaymentMethodType", [paymentMethodTypeId : paymentMethodTypeId]);
+ paymentMethodType = delegator.findOne("PaymentMethodType", [paymentMethodTypeId : paymentMethodTypeId], false);
context.paymentMethodType = paymentMethodType;
}
@@ -82,7 +82,7 @@ if (paymentAddress) context.paymentAddre
// TODO: FIXME!
/*
-billingAccount = cart.getBillingAccountId() ? delegator.findByPrimaryKey("BillingAccount", [billingAccountId : cart.getBillingAccountId()]) : null;
+billingAccount = cart.getBillingAccountId() ? delegator.findOne("BillingAccount", [billingAccountId : cart.getBillingAccountId()], false) : null;
if (billingAccount)
context.billingAccount = billingAccount;
*/
@@ -96,7 +96,7 @@ context.giftMessage = cart.getGiftMessag
context.isGift = cart.getIsGift();
context.currencyUomId = cart.getCurrency();
-shipmentMethodType = delegator.findByPrimaryKey("ShipmentMethodType", [shipmentMethodTypeId : cart.getShipmentMethodTypeId()]);
+shipmentMethodType = delegator.findOne("ShipmentMethodType", [shipmentMethodTypeId : cart.getShipmentMethodTypeId()], false);
if (shipmentMethodType) context.shipMethDescription = shipmentMethodType.description;
orh = new OrderReadHelper(orderAdjustments, orderItems);
Modified: ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/CustSettings.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/CustSettings.groovy?rev=1337677&r1=1337676&r2=1337677&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/CustSettings.groovy (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/CustSettings.groovy Sat May 12 21:21:05 2012
@@ -35,7 +35,7 @@ if (partyId) {
// NOTE: if there was an error, then don't look up and fill in all of this data, just use the values from the previous request (which will be in the parameters Map automagically)
if (!request.getAttribute("_ERROR_MESSAGE_") && !request.getAttribute("_ERROR_MESSAGE_LIST_")) {
- person = delegator.findByPrimaryKey("Person", [partyId : partyId]);
+ person = delegator.findOne("Person", [partyId : partyId], false);
if (person) {
context.callSubmitForm = true;
// should never be null for the anonymous checkout, but just in case
Modified: ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/OptionSettings.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/OptionSettings.groovy?rev=1337677&r1=1337676&r2=1337677&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/OptionSettings.groovy (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/OptionSettings.groovy Sat May 12 21:21:05 2012
@@ -40,7 +40,7 @@ request.removeAttribute("_EVENT_MESSAGE_
party = null;
partyId = session.getAttribute("orderPartyId");
if (partyId) {
- party = delegator.findByPrimaryKey("Party", [partyId : partyId]);
+ party = delegator.findOne("Party", [partyId : partyId], false);
context.party = party;
}
Modified: ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/OrderHistory.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/OrderHistory.groovy?rev=1337677&r1=1337676&r2=1337677&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/OrderHistory.groovy (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/OrderHistory.groovy Sat May 12 21:21:05 2012
@@ -22,7 +22,7 @@ import org.ofbiz.entity.*;
import org.ofbiz.entity.util.*;
import org.ofbiz.entity.condition.*;
-partyRole = delegator.findByPrimaryKey("PartyRole", [partyId : userLogin.partyId, roleTypeId : "SUPPLIER"]);
+partyRole = delegator.findOne("PartyRole", [partyId : userLogin.partyId, roleTypeId : "SUPPLIER"], false);
if (partyRole) {
if ("SUPPLIER".equals(partyRole.roleTypeId)) {
/** drop shipper or supplier **/
Modified: ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/OrderStatus.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/OrderStatus.groovy?rev=1337677&r1=1337676&r2=1337677&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/OrderStatus.groovy (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/OrderStatus.groovy Sat May 12 21:21:05 2012
@@ -87,7 +87,7 @@ allowAnonymousView = context.allowAnonym
isDemoStore = true;
if (orderId) {
- orderHeader = delegator.findByPrimaryKey("OrderHeader", [orderId : orderId]);
+ orderHeader = delegator.findOne("OrderHeader", [orderId : orderId], false);
if ("PURCHASE_ORDER".equals(orderHeader?.orderTypeId)) {
//drop shipper or supplier
roleTypeId = "SUPPLIER_AGENT";
@@ -129,7 +129,7 @@ if (orderHeader) {
placingCustomerOrderRoles = delegator.findByAnd("OrderRole", [orderId : orderId, roleTypeId : roleTypeId]);
placingCustomerOrderRole = EntityUtil.getFirst(placingCustomerOrderRoles);
- placingCustomerPerson = placingCustomerOrderRole == null ? null : delegator.findByPrimaryKey("Person", [partyId : placingCustomerOrderRole.partyId]);
+ placingCustomerPerson = placingCustomerOrderRole == null ? null : delegator.findOne("Person", [partyId : placingCustomerOrderRole.partyId], false);
billingAccount = orderHeader.getRelatedOne("BillingAccount");
Modified: ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/PaymentInformation.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/PaymentInformation.groovy?rev=1337677&r1=1337676&r2=1337677&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/PaymentInformation.groovy (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/PaymentInformation.groovy Sat May 12 21:21:05 2012
@@ -36,7 +36,7 @@ if (!partyId) {
context.partyId = partyId;
if (partyId && !partyId.equals("_NA_")) {
- party = delegator.findByPrimaryKey("Party", [partyId : partyId]);
+ party = delegator.findOne("Party", [partyId : partyId], false);
person = party.getRelatedOne("Person");
context.party = party;
context.person = person;
@@ -47,7 +47,7 @@ request.removeAttribute("_EVENT_MESSAGE_
if (parameters.useShipAddr && cart.getShippingContactMechId()) {
shippingContactMech = cart.getShippingContactMechId();
- postalAddress = delegator.findByPrimaryKey("PostalAddress", [contactMechId : shippingContactMech]);
+ postalAddress = delegator.findOne("PostalAddress", [contactMechId : shippingContactMech], false);
context.useEntityFields = "Y";
context.postalAddress = postalAddress;
Modified: ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/QuickAnonCustSettings.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/QuickAnonCustSettings.groovy?rev=1337677&r1=1337676&r2=1337677&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/QuickAnonCustSettings.groovy (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/QuickAnonCustSettings.groovy Sat May 12 21:21:05 2012
@@ -42,7 +42,7 @@ if (partyId) {
// NOTE: if there was an error, then don't look up and fill in all of this data, just use the values from the previous request (which will be in the parameters Map automagically)
if (!request.getAttribute("_ERROR_MESSAGE_") && !request.getAttribute("_ERROR_MESSAGE_LIST_")) {
- person = delegator.findByPrimaryKey("Person", [partyId : partyId]);
+ person = delegator.findOne("Person", [partyId : partyId], false);
if (person) {
context.callSubmitForm = true;
// should never be null for the anonymous checkout, but just in case
@@ -93,7 +93,7 @@ context.cart = cart;
request.removeAttribute("_EVENT_MESSAGE_");
if (cartPartyId && !cartPartyId.equals("_NA_")) {
- cartParty = delegator.findByPrimaryKey("Party", [partyId : cartPartyId]);
+ cartParty = delegator.findOne("Party", [partyId : cartPartyId], false);
if (cartParty) {
cartPerson = cartParty.getRelatedOne("Person");
context.party = cartParty;
@@ -121,7 +121,7 @@ if (cart && cart.getShippingContactMechI
billingContactMechId = session.getAttribute("billingContactMechId");
if (billingContactMechId) {
- billPostalAddress = delegator.findByPrimaryKey("PostalAddress", [contactMechId : billingContactMechId]);
+ billPostalAddress = delegator.findOne("PostalAddress", [contactMechId : billingContactMechId], false);
parameters.billingContactMechId = billPostalAddress.contactMechId;
parameters.billToName = billPostalAddress.toName;
parameters.billToAttnName = billPostalAddress.attnName;
Modified: ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/QuickAnonOptionSettings.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/QuickAnonOptionSettings.groovy?rev=1337677&r1=1337676&r2=1337677&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/QuickAnonOptionSettings.groovy (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/QuickAnonOptionSettings.groovy Sat May 12 21:21:05 2012
@@ -40,7 +40,7 @@ request.removeAttribute("_EVENT_MESSAGE_
party = null;
partyId = session.getAttribute("orderPartyId");
if (partyId) {
- party = delegator.findByPrimaryKey("Party", [partyId : partyId]);
+ party = delegator.findOne("Party", [partyId : partyId], false);
context.party = party;
}
Modified: ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/RequestReturn.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/RequestReturn.groovy?rev=1337677&r1=1337676&r2=1337677&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/RequestReturn.groovy (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/RequestReturn.groovy Sat May 12 21:21:05 2012
@@ -36,7 +36,7 @@ context.returnReasons = returnReasons;
if (orderId) {
returnRes = dispatcher.runSync("getReturnableItems", [orderId : orderId]);
context.returnableItems = returnRes.returnableItems;
- orderHeader = delegator.findByPrimaryKey("OrderHeader", [orderId : orderId]);
+ orderHeader = delegator.findOne("OrderHeader", [orderId : orderId], false);
context.orderHeader = orderHeader;
}
@@ -47,7 +47,7 @@ context.returnItemTypeMap = typeMap;
//put in the return to party information from the order header
if (orderId) {
- order = delegator.findByPrimaryKey("OrderHeader", [orderId : orderId]);
+ order = delegator.findOne("OrderHeader", [orderId : orderId], false);
productStore = order.getRelatedOne("ProductStore");
context.toPartyId = productStore.payToPartyId;
}
Modified: ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/ShipSettings.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/ShipSettings.groovy?rev=1337677&r1=1337676&r2=1337677&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/ShipSettings.groovy (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/ShipSettings.groovy Sat May 12 21:21:05 2012
@@ -32,7 +32,7 @@ context.cart = cart;
request.removeAttribute("_EVENT_MESSAGE_");
if (partyId && !partyId.equals("_NA_")) {
- party = delegator.findByPrimaryKey("Party", [partyId : partyId]);
+ party = delegator.findOne("Party", [partyId : partyId], false);
person = party.getRelatedOne("Person");
context.party = party;
context.person = person;
Modified: ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/ShipmentStatus.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/ShipmentStatus.groovy?rev=1337677&r1=1337676&r2=1337677&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/ShipmentStatus.groovy (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/ShipmentStatus.groovy Sat May 12 21:21:05 2012
@@ -25,7 +25,7 @@ import org.ofbiz.entity.util.*;
shipmentId = parameters.shipmentId;
if (shipmentId) {
- shipment = delegator.findByPrimaryKey("Shipment", [shipmentId : shipmentId]);
+ shipment = delegator.findOne("Shipment", [shipmentId : shipmentId], false);
shipmentItems = delegator.findByAnd("ShipmentItem", [shipmentId : shipmentId]);
// get Shipment tracking info
Modified: ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/SplitShip.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/SplitShip.groovy?rev=1337677&r1=1337676&r2=1337677&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/SplitShip.groovy (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/SplitShip.groovy Sat May 12 21:21:05 2012
@@ -34,5 +34,5 @@ context.cart = cart;
context.shippingContactMechList = ContactHelper.getContactMech(party, "SHIPPING_LOCATION", "POSTAL_ADDRESS", false);
-profiledefs = delegator.findByPrimaryKey("PartyProfileDefault", [partyId : userLogin.partyId, productStoreId : productStoreId]);
+profiledefs = delegator.findOne("PartyProfileDefault", [partyId : userLogin.partyId, productStoreId : productStoreId], false);
context.profileDefs = profiledefs;
Modified: ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/shoppinglist/EditShoppingList.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/shoppinglist/EditShoppingList.groovy?rev=1337677&r1=1337676&r2=1337677&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/shoppinglist/EditShoppingList.groovy (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/shoppinglist/EditShoppingList.groovy Sat May 12 21:21:05 2012
@@ -71,7 +71,7 @@ session.setAttribute("currentShoppingLis
// 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;
if (shoppingList) {
@@ -200,7 +200,7 @@ if (shoppingListId) {
context.shippingContactMechList = ContactHelper.getContactMech(party, "SHIPPING_LOCATION", "POSTAL_ADDRESS", false);
context.paymentMethodList = EntityUtil.filterByDate(party.getRelated("PaymentMethod", null, ["paymentMethodTypeId"]));
- shipAddress = delegator.findByPrimaryKey("PostalAddress", ["contactMechId" : shoppingList.contactMechId]);
+ shipAddress = delegator.findOne("PostalAddress", ["contactMechId" : shoppingList.contactMechId], false);
Debug.log("SL - address : " + shipAddress);
if (shipAddress) {
listCart = ShoppingListServices.makeShoppingListCart(dispatcher, shoppingListId, locale);
Modified: ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/catalog/ProductCategoryLink.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/catalog/ProductCategoryLink.ftl?rev=1337677&r1=1337676&r2=1337677&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/catalog/ProductCategoryLink.ftl (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/catalog/ProductCategoryLink.ftl Sat May 12 21:21:05 2012
@@ -32,7 +32,7 @@ under the License.
<#assign linkUrl = productCategoryLink.linkInfo?if_exists/>
<#elseif productCategoryLink.linkTypeEnumId == "PCLT_CAT_ID">
<#assign linkUrl = requestAttributes._REQUEST_HANDLER_.makeLink(request, response, "category/~category_id=" + productCategoryLink.linkInfo) + "/~pcategory=" + productCategoryId/>
- <#assign linkProductCategory = delegator.findByPrimaryKeyCache("ProductCategory", Static["org.ofbiz.base.util.UtilMisc"].toMap("productCategoryId", productCategoryLink.linkInfo))/>
+ <#assign linkProductCategory = delegator.findOne("ProductCategory", Static["org.ofbiz.base.util.UtilMisc"].toMap("productCategoryId", productCategoryLink.linkInfo), true)/>
<#assign linkCategoryContentWrapper = Static["org.ofbiz.product.category.CategoryContentWrapper"].makeCategoryContentWrapper(linkProductCategory, request)/>
<#assign titleText = productCategoryLink.titleText?default(linkCategoryContentWrapper.get("CATEGORY_NAME"))?if_exists/>
<#assign imageUrl = productCategoryLink.imageUrl?default(linkCategoryContentWrapper.get("CATEGORY_IMAGE_URL"))?if_exists/>
Modified: ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/catalog/ShowBestSellingCategory.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/catalog/ShowBestSellingCategory.ftl?rev=1337677&r1=1337676&r2=1337677&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/catalog/ShowBestSellingCategory.ftl (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/catalog/ShowBestSellingCategory.ftl Sat May 12 21:21:05 2012
@@ -38,7 +38,7 @@ under the License.
<#assign categoryImageUrl = productCategory.categoryImageUrl/>
<#elseif productCategoryMembers?has_content>
<#assign productCategoryMember = Static["org.ofbiz.entity.util.EntityUtil"].getFirst(productCategoryMembers)/>
- <#assign product = delegator.findByPrimaryKey("Product", Static["org.ofbiz.base.util.UtilMisc"].toMap("productId", productCategoryMember.productId))/>
+ <#assign product = delegator.findOne("Product", Static["org.ofbiz.base.util.UtilMisc"].toMap("productId", productCategoryMember.productId), false)/>
<#if product.smallImageUrl?has_content>
<#assign categoryImageUrl = product.smallImageUrl/>
</#if>
@@ -67,7 +67,7 @@ under the License.
<#break>
</#if>
<#if productCategoryMember?has_content>
- <#assign product = delegator.findByPrimaryKey("Product", Static["org.ofbiz.base.util.UtilMisc"].toMap("productId", productCategoryMember.productId))>
+ <#assign product = delegator.findOne("Product", Static["org.ofbiz.base.util.UtilMisc"].toMap("productId", productCategoryMember.productId), false)>
<li class="browsecategorytext">
<a class="linktext" href="<@ofbizCatalogAltUrl productCategoryId="PROMOTIONS" productId="${product.productId}"/>">
${product.productName!product.productId}
Modified: ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/catalog/advancedsearch.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/catalog/advancedsearch.ftl?rev=1337677&r1=1337676&r2=1337677&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/catalog/advancedsearch.ftl (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/catalog/advancedsearch.ftl Sat May 12 21:21:05 2012
@@ -49,7 +49,7 @@ under the License.
</tr>
<#list productFeatureTypeIdsOrdered as productFeatureTypeId>
<#assign findPftMap = Static["org.ofbiz.base.util.UtilMisc"].toMap("productFeatureTypeId", productFeatureTypeId)>
- <#assign productFeatureType = delegator.findByPrimaryKeyCache("ProductFeatureType", findPftMap)>
+ <#assign productFeatureType = delegator.findOne("ProductFeatureType", findPftMap, true)>
<#assign productFeatures = productFeaturesByTypeMap[productFeatureTypeId]>
<tr valign="middle">
<td>${(productFeatureType.get("description",locale))?if_exists}</td>
Modified: ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/catalog/minilastviewedcategories.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/catalog/minilastviewedcategories.ftl?rev=1337677&r1=1337676&r2=1337677&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/catalog/minilastviewedcategories.ftl (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/catalog/minilastviewedcategories.ftl Sat May 12 21:21:05 2012
@@ -32,7 +32,7 @@ under the License.
<div class="screenlet-body">
<ul class="browsecategorylist">
<#list lastViewedCategories[0..limit] as categoryId>
- <#assign category = delegator.findByPrimaryKeyCache("ProductCategory", Static["org.ofbiz.base.util.UtilMisc"].toMap("productCategoryId", categoryId))?if_exists>
+ <#assign category = delegator.findOne("ProductCategory", Static["org.ofbiz.base.util.UtilMisc"].toMap("productCategoryId", categoryId), true)?if_exists>
<#if category?has_content>
<li class="browsecategorytext">
<#if catContentWrappers?exists && catContentWrappers[category.productCategoryId]?exists && catContentWrappers[category.productCategoryId].get("CATEGORY_NAME")?exists>
Modified: ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/content/searchContent.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/content/searchContent.ftl?rev=1337677&r1=1337676&r2=1337677&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/content/searchContent.ftl (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/content/searchContent.ftl Sat May 12 21:21:05 2012
@@ -49,7 +49,7 @@ under the License.
</tr>
<#list productFeatureTypeIdsOrdered as productFeatureTypeId>
<#assign findPftMap = Static["org.ofbiz.base.util.UtilMisc"].toMap("productFeatureTypeId", productFeatureTypeId)>
- <#assign productFeatureType = delegator.findByPrimaryKeyCache("ProductFeatureType", findPftMap)>
+ <#assign productFeatureType = delegator.findOne("ProductFeatureType", findPftMap, true)>
<#assign productFeatures = productFeaturesByTypeMap[productFeatureTypeId]>
<tr>
<td align="right" valign="middle">
Modified: ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/content/viewcontent.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/content/viewcontent.ftl?rev=1337677&r1=1337676&r2=1337677&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/content/viewcontent.ftl (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/content/viewcontent.ftl Sat May 12 21:21:05 2012
@@ -54,7 +54,7 @@ under the License.
<#assign subContent=lastNode.value/>
</#if>
<#else>
- <#assign subContent = delegator.findByPrimaryKeyCache("Content", Static["org.ofbiz.base.util.UtilMisc"].toMap("contentId", subContentId))/>
+ <#assign subContent = delegator.findOne("Content", Static["org.ofbiz.base.util.UtilMisc"].toMap("contentId", subContentId), true)/>
</#if>
<#assign dummy=Static["org.ofbiz.base.util.Debug"].logInfo("in viewcontent, subContent:" + subContent, "")/>
<br />
Modified: ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/customer/editcontactmech.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/customer/editcontactmech.ftl?rev=1337677&r1=1337676&r2=1337677&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/customer/editcontactmech.ftl (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/customer/editcontactmech.ftl Sat May 12 21:21:05 2012
@@ -185,7 +185,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/specialpurpose/ecommerce/webapp/ecommerce/customer/newcustomer.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/customer/newcustomer.ftl?rev=1337677&r1=1337676&r2=1337677&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/customer/newcustomer.ftl (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/customer/newcustomer.ftl Sat May 12 21:21:05 2012
@@ -212,7 +212,7 @@ will generally always be reserved for th
${screens.render("component://common/widget/CommonScreens.xml#countries")}
<#assign defaultCountryGeoId = Static["org.ofbiz.base.util.UtilProperties"].getPropertyValue("general.properties", "country.geo.id.default")>
<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/specialpurpose/ecommerce/webapp/ecommerce/forum/showforumresponse.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/forum/showforumresponse.ftl?rev=1337677&r1=1337676&r2=1337677&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/forum/showforumresponse.ftl (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/forum/showforumresponse.ftl Sat May 12 21:21:05 2012
@@ -27,7 +27,7 @@ under the License.
<#if lastNode?has_content>
<#assign subContent=lastNode.value/>
<#else>
-<#assign subContent = delegator.findByPrimaryKeyCache("Content", Static["org.ofbiz.base.util.UtilMisc"].toMap("contentId", subContentId))/>
+<#assign subContent = delegator.findOne("Content", Static["org.ofbiz.base.util.UtilMisc"].toMap("contentId", subContentId), true)/>
<#assign dummy = globalNodeTrail.add(lastNode)/>
</#if>
<br />