diff --git a/ebay/src/org/ofbiz/ebay/EbayHelper.java b/ebay/src/org/ofbiz/ebay/EbayHelper.java index 85c0a5ea1..2d15d08d3 100644 --- a/ebay/src/org/ofbiz/ebay/EbayHelper.java +++ b/ebay/src/org/ofbiz/ebay/EbayHelper.java @@ -516,7 +516,7 @@ public class EbayHelper { GenericValue postalAddress; try { // get the postal address for this contact mech - postalAddress = delegator.findByPrimaryKey("PostalAddress", UtilMisc.toMap("contactMechId", contactMechId)); + postalAddress = delegator.findOne("PostalAddress", UtilMisc.toMap("contactMechId", contactMechId), false); // match values to compare by modifying them the same way they // were when they were created @@ -588,8 +588,8 @@ public class EbayHelper { GenericValue phoneNumber; try { // get the phone number for this contact mech - phoneNumber = delegator.findByPrimaryKey("TelecomNumber", UtilMisc - .toMap("contactMechId", contactMechId)); + phoneNumber = delegator.findOne("TelecomNumber", UtilMisc + .toMap("contactMechId", contactMechId), false); // now compare values. If one matches, that's our phone number. // Return the related contact mech id. @@ -622,7 +622,7 @@ public class EbayHelper { titleFirstWord = title.substring(0, title.indexOf(' ')); } if (UtilValidate.isNotEmpty(titleFirstWord)) { - GenericValue product = delegator.findByPrimaryKey("Product", UtilMisc.toMap("productId", titleFirstWord)); + GenericValue product = delegator.findOne("Product", UtilMisc.toMap("productId", titleFirstWord), false); if (UtilValidate.isNotEmpty(product)) { productId = product.getString("productId"); } diff --git a/ebay/src/org/ofbiz/ebay/EbayOrderServices.java b/ebay/src/org/ofbiz/ebay/EbayOrderServices.java index 0b2c61aa2..405fac4ce 100644 --- a/ebay/src/org/ofbiz/ebay/EbayOrderServices.java +++ b/ebay/src/org/ofbiz/ebay/EbayOrderServices.java @@ -992,7 +992,7 @@ public class EbayOrderServices { if (productStoreId == null) { return ServiceUtil.returnFailure(UtilProperties.getMessage(resource, "ordersImportFromEbay.productStoreIdIsMandatory", locale)); } else { - GenericValue productStore = delegator.findByPrimaryKey("ProductStore", UtilMisc.toMap("productStoreId", productStoreId)); + GenericValue productStore = delegator.findOne("ProductStore", UtilMisc.toMap("productStoreId", productStoreId), false); if (productStore != null) { defaultCurrencyUomId = productStore.getString("defaultCurrencyUomId"); payToPartyId = productStore.getString("payToPartyId"); @@ -1150,7 +1150,7 @@ public class EbayOrderServices { // if we get a party, check its contact information. if (UtilValidate.isNotEmpty(partyId)) { Debug.logInfo("Found existing party associated to the eBay buyer: " + partyId, module); - GenericValue party = delegator.findByPrimaryKey("Party", UtilMisc.toMap("partyId", partyId)); + GenericValue party = delegator.findOne("Party", UtilMisc.toMap("partyId", partyId), false); contactMechId = EbayHelper.setShippingAddressContactMech(dispatcher, delegator, party, userLogin, shippingAddressCtx); String emailBuyer = (String) context.get("emailBuyer"); diff --git a/ebay/src/org/ofbiz/ebay/ImportOrdersFromEbay.java b/ebay/src/org/ofbiz/ebay/ImportOrdersFromEbay.java index 3143be7ca..7c95b8370 100755 --- a/ebay/src/org/ofbiz/ebay/ImportOrdersFromEbay.java +++ b/ebay/src/org/ofbiz/ebay/ImportOrdersFromEbay.java @@ -141,7 +141,7 @@ public class ImportOrdersFromEbay { if (UtilValidate.isNotEmpty(orderId)) { // Get the order header and verify if this order has been imported // from eBay (i.e. sales channel = EBAY_CHANNEL and externalId is set) - orderHeader = delegator.findByPrimaryKey("OrderHeader", UtilMisc.toMap("orderId", orderId)); + orderHeader = delegator.findOne("OrderHeader", UtilMisc.toMap("orderId", orderId), false); if (orderHeader == null) { Debug.logError("Cannot find order with orderId [" + orderId + "]", module); return ServiceUtil.returnFailure(UtilProperties.getMessage(resource, "ordersImportFromEbay.errorRetrievingOrderFromOrderId", locale)); @@ -600,7 +600,7 @@ public class ImportOrdersFromEbay { if (productStoreId == null) { return ServiceUtil.returnFailure(UtilProperties.getMessage(resource, "ordersImportFromEbay.productStoreIdIsMandatory", locale)); } else { - GenericValue productStore = delegator.findByPrimaryKey("ProductStore", UtilMisc.toMap("productStoreId", productStoreId)); + GenericValue productStore = delegator.findOne("ProductStore", UtilMisc.toMap("productStoreId", productStoreId), false); if (productStore != null) { defaultCurrencyUomId = productStore.getString("defaultCurrencyUomId"); payToPartyId = productStore.getString("payToPartyId"); @@ -658,7 +658,7 @@ public class ImportOrdersFromEbay { if (UtilValidate.isEmpty(productId)) { return ServiceUtil.returnFailure(UtilProperties.getMessage(resource, "ordersImportFromEbay.productIdNotAvailable", locale)); } else { - GenericValue product = delegator.findByPrimaryKey("Product", UtilMisc.toMap("productId", productId)); + GenericValue product = delegator.findOne("Product", UtilMisc.toMap("productId", productId), false); if (UtilValidate.isEmpty(product)) { return ServiceUtil.returnFailure(UtilProperties.getMessage(resource, "ordersImportFromEbay.productIdDoesNotExist", locale)); } @@ -735,7 +735,7 @@ public class ImportOrdersFromEbay { if (UtilValidate.isNotEmpty(partyAttribute)) { partyId = (String) partyAttribute.get("partyId"); Debug.logInfo("Found existing party associated to the eBay buyer: " + partyId, module); - GenericValue party = delegator.findByPrimaryKey("Party", UtilMisc.toMap("partyId", partyId)); + GenericValue party = delegator.findOne("Party", UtilMisc.toMap("partyId", partyId), false); contactMechId = EbayHelper.setShippingAddressContactMech(dispatcher, delegator, party, userLogin, parameters); String emailBuyer = (String) parameters.get("emailBuyer"); diff --git a/ebay/webapp/ebay/find/EbayAdvancedSearch.ftl b/ebay/webapp/ebay/find/EbayAdvancedSearch.ftl index fa5f0c7c9..6ffdffe82 100644 --- a/ebay/webapp/ebay/find/EbayAdvancedSearch.ftl +++ b/ebay/webapp/ebay/find/EbayAdvancedSearch.ftl @@ -269,7 +269,7 @@ under the License. <#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] />