Author: doogie
Date: Tue May 29 04:19:33 2012
New Revision: 1343520
URL: http://svn.apache.org/viewvc?rev=1343520&view=rev
Log:
DEPRECATION: specialpurpose/ecommerce: GenericValue.getRelated/getRelatedCache
variants replaced with a getRelated that takes a boolean useCache parameter.
Modified:
ofbiz/trunk/specialpurpose/ecommerce/templates/survey/genericresult.ftl
ofbiz/trunk/specialpurpose/ecommerce/templates/survey/miniresult.ftl
ofbiz/trunk/specialpurpose/ecommerce/templates/survey/minisurvey.ftl
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditBillingAddress.groovy
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditShippingAddress.groovy
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/forum/RespondPermAndPrep.groovy
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/BillSettings.groovy
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/order/OrderStatus.groovy
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/shoppinglist/EditShoppingList.groovy
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/catalog/productdetail.ftl
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/order/orderitems.ftl
Modified:
ofbiz/trunk/specialpurpose/ecommerce/templates/survey/genericresult.ftl
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/templates/survey/genericresult.ftl?rev=1343520&r1=1343519&r2=1343520&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/templates/survey/genericresult.ftl
(original)
+++ ofbiz/trunk/specialpurpose/ecommerce/templates/survey/genericresult.ftl Tue
May 29 04:19:33 2012
@@ -102,7 +102,7 @@ under the License.
<a href="/content/control/img?imgId=${content.dataResourceId}"
class="buttontext">${answer.contentId}</a> - ${content.contentName?if_exists}
</#if>
<#elseif surveyQuestionAndAppl.surveyQuestionTypeId == "OPTION">
- <#assign options =
surveyQuestionAndAppl.getRelated("SurveyQuestionOption",
sequenceSort)?if_exists>
+ <#assign options =
surveyQuestionAndAppl.getRelated("SurveyQuestionOption", null, sequenceSort,
false)?if_exists>
<#assign selectedOption =
(answer.surveyOptionSeqId)?default("_NA_")>
<#if options?has_content>
<#list options as option>
Modified: ofbiz/trunk/specialpurpose/ecommerce/templates/survey/miniresult.ftl
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/templates/survey/miniresult.ftl?rev=1343520&r1=1343519&r2=1343520&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/templates/survey/miniresult.ftl
(original)
+++ ofbiz/trunk/specialpurpose/ecommerce/templates/survey/miniresult.ftl Tue
May 29 04:19:33 2012
@@ -57,7 +57,7 @@ under the License.
</span></div>
<#elseif surveyQuestionAndAppl.surveyQuestionTypeId == "OPTION">
- <#assign options =
surveyQuestionAndAppl.getRelated("SurveyQuestionOption",
sequenceSort)?if_exists>
+ <#assign options =
surveyQuestionAndAppl.getRelated("SurveyQuestionOption", null, sequenceSort,
false)?if_exists>
<#assign selectedOption = (answer.surveyOptionSeqId)?default("_NA_")>
<#if options?has_content>
<#list options as option>
Modified: ofbiz/trunk/specialpurpose/ecommerce/templates/survey/minisurvey.ftl
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/templates/survey/minisurvey.ftl?rev=1343520&r1=1343519&r2=1343520&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/templates/survey/minisurvey.ftl
(original)
+++ ofbiz/trunk/specialpurpose/ecommerce/templates/survey/minisurvey.ftl Tue
May 29 04:19:33 2012
@@ -89,7 +89,7 @@ under the License.
<#elseif surveyQuestionAndAppl.surveyQuestionTypeId == "PASSWORD">
<input type="password" size="30" class="textBox"
name="answers_${surveyQuestionAndAppl.surveyQuestionId}"
value="${(answer.textResponse)?if_exists}"/>
<#elseif surveyQuestionAndAppl.surveyQuestionTypeId == "OPTION">
- <#assign options =
surveyQuestionAndAppl.getRelated("SurveyQuestionOption",
sequenceSort)?if_exists>
+ <#assign options =
surveyQuestionAndAppl.getRelated("SurveyQuestionOption", null, sequenceSort,
false)?if_exists>
<#assign selectedOption =
(answer.surveyOptionSeqId)?default("_NA_")>
<select class="selectBox"
name="answers_${surveyQuestionAndAppl.surveyQuestionId}">
<#if surveyQuestionAndAppl.requiredField?default("N") != "Y">
Modified:
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditBillingAddress.groovy
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditBillingAddress.groovy?rev=1343520&r1=1343519&r2=1343520&view=diff
==============================================================================
---
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditBillingAddress.groovy
(original)
+++
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditBillingAddress.groovy
Tue May 29 04:19:33 2012
@@ -68,7 +68,7 @@ if (userLogin) {
billToContactMechList = ContactHelper.getContactMech(party,
"PHONE_BILLING", "TELECOM_NUMBER", false)
if (billToContactMechList) {
billToTelecomNumber =
(EntityUtil.getFirst(billToContactMechList)).getRelatedOne("TelecomNumber",
false);
- pcm =
EntityUtil.getFirst(billToTelecomNumber.getRelated("PartyContactMech"));
+ pcm =
EntityUtil.getFirst(billToTelecomNumber.getRelated("PartyContactMech", null,
null, false));
context.billToTelecomNumber = billToTelecomNumber;
context.billToExtension = pcm.extension;
}
@@ -76,7 +76,7 @@ if (userLogin) {
billToFaxNumberList = ContactHelper.getContactMech(party, "FAX_BILLING",
"TELECOM_NUMBER", false)
if (billToFaxNumberList) {
billToFaxNumber =
(EntityUtil.getFirst(billToFaxNumberList)).getRelatedOne("TelecomNumber",
false);
- faxPartyContactMech =
EntityUtil.getFirst(billToFaxNumber.getRelated("PartyContactMech"));
+ faxPartyContactMech =
EntityUtil.getFirst(billToFaxNumber.getRelated("PartyContactMech", null, null,
false));
context.billToFaxNumber = billToFaxNumber;
context.billToFaxExtension = faxPartyContactMech.extension;
}
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=1343520&r1=1343519&r2=1343520&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
Tue May 29 04:19:33 2012
@@ -61,7 +61,7 @@ if (userLogin) {
shipToContactMechList = ContactHelper.getContactMech(party,
"PHONE_SHIPPING", "TELECOM_NUMBER", false)
if (shipToContactMechList) {
shipToTelecomNumber =
(EntityUtil.getFirst(shipToContactMechList)).getRelatedOne("TelecomNumber",
false);
- pcm =
EntityUtil.getFirst(shipToTelecomNumber.getRelated("PartyContactMech"));
+ pcm =
EntityUtil.getFirst(shipToTelecomNumber.getRelated("PartyContactMech", null,
null, false));
context.shipToTelecomNumber = shipToTelecomNumber;
context.shipToExtension = pcm.extension;
}
@@ -69,7 +69,7 @@ if (userLogin) {
shipToFaxNumberList = ContactHelper.getContactMech(party, "FAX_SHIPPING",
"TELECOM_NUMBER", false)
if (shipToFaxNumberList) {
shipToFaxNumber =
(EntityUtil.getFirst(shipToFaxNumberList)).getRelatedOne("TelecomNumber",
false);
- faxPartyContactMech =
EntityUtil.getFirst(shipToFaxNumber.getRelated("PartyContactMech"));
+ faxPartyContactMech =
EntityUtil.getFirst(shipToFaxNumber.getRelated("PartyContactMech", null, null,
false));
context.shipToFaxNumber = shipToFaxNumber;
context.shipToFaxExtension = faxPartyContactMech.extension;
}
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=1343520&r1=1343519&r2=1343520&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
Tue May 29 04:19:33 2012
@@ -56,7 +56,7 @@ if (!pubPt) {
*/
contentToValue = delegator.findOne("Content", [contentId : contentIdTo],
false);
-contentToPurposeList = contentToValue.getRelatedCache("ContentPurpose");
+contentToPurposeList = contentToValue.getRelated("ContentPurpose", null, null,
true);
currentValue = delegator.makeValue("Content", [contentTypeId : "DOCUMENT",
statusId : "CTNT_PUBLISHED", privilegeEnumId : "_00_"]);
if (contentToPurposeList.contains("RESPONSE")) {
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=1343520&r1=1343519&r2=1343520&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
Tue May 29 04:19:33 2012
@@ -45,7 +45,7 @@ if (partyId && !partyId.equals("_NA_"))
context.party = party;
context.person = person;
if (party) {
- context.paymentMethodList =
EntityUtil.filterByDate(party.getRelated("PaymentMethod"));
+ context.paymentMethodList =
EntityUtil.filterByDate(party.getRelated("PaymentMethod", null, null, false));
billingAccountList =
BillingAccountWorker.makePartyBillingAccountList(userLogin, currencyUomId,
partyId, delegator, dispatcher);
if (billingAccountList) {
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=1343520&r1=1343519&r2=1343520&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
Tue May 29 04:19:33 2012
@@ -38,12 +38,12 @@ if (!userLogin) {
if (!userLogin) {
if (orderId) {
orderHeader = delegator.findOne("OrderHeader", [orderId :
orderId], false);
- orderStatuses = orderHeader.getRelated("OrderStatus");
+ orderStatuses = orderHeader.getRelated("OrderStatus", null, null,
false);
filteredOrderStatusList = [];
extOfflineModeExists = false;
// Handled the case of OFFLINE payment method. In case of OFFLINE
payment "ORDER_CREATED" status must be checked.
- orderPaymentPreferences =
orderHeader.getRelated("OrderPaymentPreference",
UtilMisc.toList("orderPaymentPreferenceId"));
+ orderPaymentPreferences =
orderHeader.getRelated("OrderPaymentPreference", null,
UtilMisc.toList("orderPaymentPreferenceId"), false);
filteredOrderPaymentPreferences =
EntityUtil.filterByCondition(orderPaymentPreferences,
EntityCondition.makeCondition("paymentMethodTypeId", EntityOperator.IN,
["EXT_OFFLINE"]));
if (filteredOrderPaymentPreferences) {
extOfflineModeExists = true;
@@ -133,7 +133,7 @@ if (orderHeader) {
billingAccount = orderHeader.getRelatedOne("BillingAccount", false);
- orderPaymentPreferences =
EntityUtil.filterByAnd(orderHeader.getRelated("OrderPaymentPreference"),
[EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL,
"PAYMENT_CANCELLED")]);
+ orderPaymentPreferences =
EntityUtil.filterByAnd(orderHeader.getRelated("OrderPaymentPreference", null,
null, false), [EntityCondition.makeCondition("statusId",
EntityOperator.NOT_EQUAL, "PAYMENT_CANCELLED")]);
paymentMethods = [];
orderPaymentPreferences.each { opp ->
paymentMethod = opp.getRelatedOne("PaymentMethod", false);
@@ -177,7 +177,7 @@ if (orderHeader) {
totalItems = 0.00;
orderItems.each { oitem ->
totalItems += oitem.quantity;
- ritems = oitem.getRelated("ReturnItem");
+ ritems = oitem.getRelated("ReturnItem", null, null, false);
ritems.each { ritem ->
rh = ritem.getRelatedOne("ReturnHeader", false);
if (!rh.statusId.equals("RETURN_CANCELLED")) {
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=1343520&r1=1343519&r2=1343520&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
Tue May 29 04:19:33 2012
@@ -78,7 +78,7 @@ if (shoppingListId) {
shoppingListItemTotal = 0.0;
shoppingListChildTotal = 0.0;
- shoppingListItems = shoppingList.getRelatedCache("ShoppingListItem");
+ shoppingListItems = shoppingList.getRelated("ShoppingListItem", null,
null, true);
if (shoppingListItems) {
shoppingListItemDatas = new ArrayList(shoppingListItems.size());
shoppingListItems.each { shoppingListItem ->
@@ -125,7 +125,7 @@ if (shoppingListId) {
productVariantAssocs = null;
if ("Y".equals(product.isVirtual)) {
- productVariantAssocs =
product.getRelatedCache("MainProductAssoc", [productAssocTypeId :
"PRODUCT_VARIANT"], ["sequenceNum"]);
+ productVariantAssocs =
product.getRelated("MainProductAssoc", [productAssocTypeId :
"PRODUCT_VARIANT"], ["sequenceNum"], true);
productVariantAssocs =
EntityUtil.filterByDate(productVariantAssocs);
}
shoppingListItemData.shoppingListItem = shoppingListItem;
@@ -198,7 +198,7 @@ if (shoppingListId) {
// get customer's shipping & payment info
context.chosenShippingMethod =
shoppingList.shipmentMethodTypeId + "@" + shoppingList.carrierPartyId;
context.shippingContactMechList =
ContactHelper.getContactMech(party, "SHIPPING_LOCATION", "POSTAL_ADDRESS",
false);
- context.paymentMethodList =
EntityUtil.filterByDate(party.getRelated("PaymentMethod", null,
["paymentMethodTypeId"]));
+ context.paymentMethodList =
EntityUtil.filterByDate(party.getRelated("PaymentMethod", null,
["paymentMethodTypeId"], false));
shipAddress = delegator.findOne("PostalAddress",
["contactMechId" : shoppingList.contactMechId], false);
Debug.log("SL - address : " + shipAddress);
Modified:
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/catalog/productdetail.ftl
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/catalog/productdetail.ftl?rev=1343520&r1=1343519&r2=1343520&view=diff
==============================================================================
---
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/catalog/productdetail.ftl
(original)
+++
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/catalog/productdetail.ftl
Tue May 29 04:19:33 2012
@@ -322,7 +322,7 @@ $(function(){
<#if unavailableVariants?exists>
<ul>
<#list unavailableVariants as prod>
- <#assign features = prod.getRelated("ProductFeatureAppl")/>
+ <#assign features = prod.getRelated("ProductFeatureAppl", null, null,
false)/>
<li>
<#list features as feature>
<em>${feature.getRelatedOne("ProductFeature",
false).description}</em><#if feature_has_next>, </#if>
Modified:
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/order/orderitems.ftl
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/order/orderitems.ftl?rev=1343520&r1=1343519&r2=1343520&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/order/orderitems.ftl
(original)
+++ ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/order/orderitems.ftl
Tue May 29 04:19:33 2012
@@ -105,7 +105,7 @@ under the License.
</#if>
</#list>
<#else>
- <#assign WorkOrderItemFulfillments =
orderItem.getRelated("WorkOrderItemFulfillment")?if_exists>
+ <#assign WorkOrderItemFulfillments =
orderItem.getRelated("WorkOrderItemFulfillment", null, null, false)?if_exists>
<#if WorkOrderItemFulfillments?has_content>
<#list WorkOrderItemFulfillments as WorkOrderItemFulfillment>
<#assign workEffortSave =
WorkOrderItemFulfillment.getRelatedOne("WorkEffort", true)?if_exists>
@@ -123,7 +123,7 @@ under the License.
<#assign product = orderItem.getRelatedOne("Product",
true)?if_exists/> <#-- should always exist because of FK constraint, but just
in case -->
<td >
<a href="<@ofbizCatalogAltUrl fullPath="true" secure="false"
productId=orderItem.productId/>" class="linktext">${orderItem.productId} -
${orderItem.itemDescription?default("")}</a>
- <#assign orderItemAttributes =
orderItem.getRelated("OrderItemAttribute")/>
+ <#assign orderItemAttributes =
orderItem.getRelated("OrderItemAttribute", null, null, false)/>
<#if orderItemAttributes?has_content>
<ul>
<#list orderItemAttributes as orderItemAttribute>
@@ -159,7 +159,7 @@ under the License.
</#if>
</#if>
<#if maySelectItems?default("N") == "Y">
- <#assign returns = orderItem.getRelated("ReturnItem")?if_exists>
+ <#assign returns = orderItem.getRelated("ReturnItem", null,
null, false)?if_exists>
<#if returns?has_content>
<#list returns as return>
<#assign returnHeader = return.getRelatedOne("ReturnHeader",
false)>
@@ -275,7 +275,7 @@ under the License.
</tr>
</#list>
<#-- show the order item ship group info -->
- <#assign orderItemShipGroupAssocs =
orderItem.getRelated("OrderItemShipGroupAssoc")?if_exists>
+ <#assign orderItemShipGroupAssocs =
orderItem.getRelated("OrderItemShipGroupAssoc", null, null, false)?if_exists>
<#if orderItemShipGroupAssocs?has_content>
<#list orderItemShipGroupAssocs as shipGroupAssoc>
<#assign shipGroup =
shipGroupAssoc.getRelatedOne("OrderItemShipGroup", false)?if_exists>