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/29 06:13:23 UTC
svn commit: r1343486 - in /ofbiz/trunk/applications/party:
src/org/ofbiz/party/communication/ src/org/ofbiz/party/contact/
src/org/ofbiz/party/party/ webapp/partymgr/WEB-INF/actions/party/
webapp/partymgr/party/ webapp/partymgr/party/contactmechtemplat...
Author: doogie
Date: Tue May 29 04:13:22 2012
New Revision: 1343486
URL: http://svn.apache.org/viewvc?rev=1343486&view=rev
Log:
DEPRECATION: applications/party: getRelatedOne variants replaced with a getRelatedOne variant that takes a boolean useCache parameter.
Modified:
ofbiz/trunk/applications/party/src/org/ofbiz/party/communication/CommunicationEventServices.java
ofbiz/trunk/applications/party/src/org/ofbiz/party/contact/ContactMechWorker.java
ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyServices.java
ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyTypeHelper.java
ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyWorker.java
ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/EditShoppingList.groovy
ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/GetUserLoginPrimaryEmail.groovy
ofbiz/trunk/applications/party/webapp/partymgr/party/contactmechtemplates/PostalAddress.fo.ftl
ofbiz/trunk/applications/party/webapp/partymgr/party/contactmechtemplates/PostalAddress.ftl
ofbiz/trunk/applications/party/webapp/partymgr/party/contactmechtemplates/PostalAddress_DEU.fo.ftl
ofbiz/trunk/applications/party/webapp/partymgr/party/contactmechtemplates/PostalAddress_DEU.ftl
ofbiz/trunk/applications/party/webapp/partymgr/party/contactmechtemplates/PostalAddress_USA.fo.ftl
ofbiz/trunk/applications/party/webapp/partymgr/party/contactmechtemplates/PostalAddress_USA.ftl
ofbiz/trunk/applications/party/webapp/partymgr/party/editcontactmech.ftl
ofbiz/trunk/applications/party/webapp/partymgr/party/editcreditcard.ftl
ofbiz/trunk/applications/party/webapp/partymgr/party/editeftaccount.ftl
ofbiz/trunk/applications/party/webapp/partymgr/party/findMatches.ftl
ofbiz/trunk/applications/party/webapp/partymgr/party/findparty.ftl
ofbiz/trunk/applications/party/webapp/partymgr/party/profileblocks/Contact.ftl
ofbiz/trunk/applications/party/webapp/partymgr/party/profileblocks/ContentList.ftl
ofbiz/trunk/applications/party/webapp/partymgr/visit/visitdetail.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=1343486&r1=1343485&r2=1343486&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 Tue May 29 04:13:22 2012
@@ -100,9 +100,9 @@ public class CommunicationEventServices
}
// make sure the from contact mech is an email if it is specified
- if ((communicationEvent.getRelatedOne("FromContactMech") == null) ||
- (!(communicationEvent.getRelatedOne("FromContactMech").getString("contactMechTypeId").equals("EMAIL_ADDRESS")) ||
- (communicationEvent.getRelatedOne("FromContactMech").getString("infoString") == null))) {
+ if ((communicationEvent.getRelatedOne("FromContactMech", false) == null) ||
+ (!(communicationEvent.getRelatedOne("FromContactMech", false).getString("contactMechTypeId").equals("EMAIL_ADDRESS")) ||
+ (communicationEvent.getRelatedOne("FromContactMech", false).getString("infoString") == null))) {
String errMsg = UtilProperties.getMessage(resource,"commeventservices.communication_event_from_contact_mech_must_be_email", locale);
return ServiceUtil.returnError(errMsg + " " + communicationEventId);
}
@@ -117,7 +117,7 @@ public class CommunicationEventServices
// prepare the email
Map<String, Object> sendMailParams = FastMap.newInstance();
- sendMailParams.put("sendFrom", communicationEvent.getRelatedOne("FromContactMech").getString("infoString"));
+ sendMailParams.put("sendFrom", communicationEvent.getRelatedOne("FromContactMech", false).getString("infoString"));
sendMailParams.put("subject", communicationEvent.getString("subject"));
sendMailParams.put("contentType", communicationEvent.getString("contentMimeTypeId"));
sendMailParams.put("userLogin", userLogin);
@@ -134,8 +134,8 @@ public class CommunicationEventServices
bodyParts.add(UtilMisc.<String, Object>toMap("content", communicationEvent.getString("content"), "type", communicationEvent.getString("contentMimeTypeId")));
}
for (GenericValue comEventContent : comEventContents) {
- GenericValue content = comEventContent.getRelatedOne("FromContent");
- GenericValue dataResource = content.getRelatedOne("DataResource");
+ GenericValue content = comEventContent.getRelatedOne("FromContent", false);
+ GenericValue dataResource = content.getRelatedOne("DataResource", false);
ByteBuffer dataContent = DataResourceWorker.getContentAsByteBuffer(delegator, dataResource.getString("dataResourceId"), null, null, locale, null);
bodyParts.add(UtilMisc.<String, Object>toMap("content", dataContent.array(), "type", dataResource.getString("mimeTypeId"), "filename", dataResource.getString("dataResourceName")));
}
@@ -150,7 +150,7 @@ public class CommunicationEventServices
String sendTo = communicationEvent.getString("toString");
if (UtilValidate.isEmpty(sendTo)) {
- GenericValue toContactMech = communicationEvent.getRelatedOne("ToContactMech");
+ GenericValue toContactMech = communicationEvent.getRelatedOne("ToContactMech", false);
if (toContactMech != null && "EMAIL_ADDRESS".equals(toContactMech.getString("contactMechTypeId"))) {
sendTo = toContactMech.getString("infoString");
}
@@ -169,7 +169,7 @@ public class CommunicationEventServices
if (commRole.getString("partyId").equals(communicationEvent.getString("partyIdFrom")) || commRole.getString("partyId").equals(communicationEvent.getString("partyIdTo"))) {
continue;
}
- GenericValue contactMech = commRole.getRelatedOne("ContactMech");
+ GenericValue contactMech = commRole.getRelatedOne("ContactMech", false);
if (UtilValidate.isNotEmpty(contactMech) && UtilValidate.isNotEmpty(contactMech.getString("infoString"))) {
if ("ADDRESSEE".equals(commRole.getString("roleTypeId"))) {
sendTo += "," + contactMech.getString("infoString");
@@ -290,7 +290,7 @@ public class CommunicationEventServices
GenericValue contactList = delegator.findOne("ContactList", UtilMisc.toMap("contactListId", contactListId), false);
Map<String, Object> sendMailParams = FastMap.newInstance();
- sendMailParams.put("sendFrom", communicationEvent.getRelatedOne("FromContactMech").getString("infoString"));
+ sendMailParams.put("sendFrom", communicationEvent.getRelatedOne("FromContactMech", false).getString("infoString"));
sendMailParams.put("subject", communicationEvent.getString("subject"));
sendMailParams.put("contentType", communicationEvent.getString("contentMimeTypeId"));
sendMailParams.put("userLogin", userLogin);
@@ -395,7 +395,7 @@ public class CommunicationEventServices
GenericValue webSite = delegator.findOne("WebSite", UtilMisc.toMap("webSiteId", contactList.getString("verifyEmailWebSiteId")), false);
if (UtilValidate.isNotEmpty(webSite)) {
- GenericValue productStore = webSite.getRelatedOne("ProductStore");
+ GenericValue productStore = webSite.getRelatedOne("ProductStore", false);
if (UtilValidate.isNotEmpty(productStore)) {
List<GenericValue> productStoreEmailSettings = productStore.getRelatedByAnd("ProductStoreEmailSetting", UtilMisc.toMap("emailType", "CONT_EMAIL_TEMPLATE"));
GenericValue productStoreEmailSetting = EntityUtil.getFirst(productStoreEmailSettings);
@@ -428,7 +428,7 @@ public class CommunicationEventServices
}
// deactivate from the contact list
try {
- GenericValue contactListParty = contactListPartyAndContactMech.getRelatedOne("ContactListParty");
+ GenericValue contactListParty = contactListPartyAndContactMech.getRelatedOne("ContactListParty", false);
if (contactListParty != null) {
contactListParty.set("statusId", "CLPT_INVALID");
contactListParty.store();
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=1343486&r1=1343485&r2=1343486&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 Tue May 29 04:13:22 2012
@@ -66,7 +66,7 @@ public class ContactMechWorker {
if (contactMechTypeId != null) {
List<GenericValue> tempColTemp = FastList.newInstance();
for (GenericValue partyContactMech: tempCol) {
- GenericValue contactMech = delegator.getRelatedOne("ContactMech", partyContactMech);
+ GenericValue contactMech = delegator.getRelatedOne("ContactMech", partyContactMech, false);
if (contactMech != null && contactMechTypeId.equals(contactMech.getString("contactMechTypeId"))) {
tempColTemp.add(partyContactMech);
}
@@ -86,7 +86,7 @@ public class ContactMechWorker {
GenericValue contactMech = null;
try {
- contactMech = partyContactMech.getRelatedOne("ContactMech");
+ contactMech = partyContactMech.getRelatedOne("ContactMech", false);
} catch (GenericEntityException e) {
Debug.logWarning(e, module);
}
@@ -98,7 +98,7 @@ public class ContactMechWorker {
partyContactMechValueMap.put("partyContactMech", partyContactMech);
try {
- partyContactMechValueMap.put("contactMechType", contactMech.getRelatedOneCache("ContactMechType"));
+ partyContactMechValueMap.put("contactMechType", contactMech.getRelatedOne("ContactMechType", true));
} catch (GenericEntityException e) {
Debug.logWarning(e, module);
}
@@ -114,9 +114,9 @@ public class ContactMechWorker {
try {
if ("POSTAL_ADDRESS".equals(contactMech.getString("contactMechTypeId"))) {
- partyContactMechValueMap.put("postalAddress", contactMech.getRelatedOne("PostalAddress"));
+ partyContactMechValueMap.put("postalAddress", contactMech.getRelatedOne("PostalAddress", false));
} else if ("TELECOM_NUMBER".equals(contactMech.getString("contactMechTypeId"))) {
- partyContactMechValueMap.put("telecomNumber", contactMech.getRelatedOne("TelecomNumber"));
+ partyContactMechValueMap.put("telecomNumber", contactMech.getRelatedOne("TelecomNumber", false));
}
} catch (GenericEntityException e) {
Debug.logWarning(e, module);
@@ -137,7 +137,7 @@ public class ContactMechWorker {
if (contactMechTypeId != null) {
List<GenericValue> tempColTemp = FastList.newInstance();
for (GenericValue partyContactMech: tempCol) {
- GenericValue contactMech = delegator.getRelatedOne("ContactMech", partyContactMech);
+ GenericValue contactMech = delegator.getRelatedOne("ContactMech", partyContactMech, false);
if (contactMech != null && contactMechTypeId.equals(contactMech.getString("contactMechTypeId"))) {
tempColTemp.add(partyContactMech);
}
@@ -157,7 +157,7 @@ public class ContactMechWorker {
GenericValue contactMech = null;
try {
- contactMech = facilityContactMech.getRelatedOne("ContactMech");
+ contactMech = facilityContactMech.getRelatedOne("ContactMech", false);
} catch (GenericEntityException e) {
Debug.logWarning(e, module);
}
@@ -169,7 +169,7 @@ public class ContactMechWorker {
facilityContactMechValueMap.put("facilityContactMech", facilityContactMech);
try {
- facilityContactMechValueMap.put("contactMechType", contactMech.getRelatedOneCache("ContactMechType"));
+ facilityContactMechValueMap.put("contactMechType", contactMech.getRelatedOne("ContactMechType", true));
} catch (GenericEntityException e) {
Debug.logWarning(e, module);
}
@@ -185,9 +185,9 @@ public class ContactMechWorker {
try {
if ("POSTAL_ADDRESS".equals(contactMech.getString("contactMechTypeId"))) {
- facilityContactMechValueMap.put("postalAddress", contactMech.getRelatedOne("PostalAddress"));
+ facilityContactMechValueMap.put("postalAddress", contactMech.getRelatedOne("PostalAddress", false));
} else if ("TELECOM_NUMBER".equals(contactMech.getString("contactMechTypeId"))) {
- facilityContactMechValueMap.put("telecomNumber", contactMech.getRelatedOne("TelecomNumber"));
+ facilityContactMechValueMap.put("telecomNumber", contactMech.getRelatedOne("TelecomNumber", false));
}
} catch (GenericEntityException e) {
Debug.logWarning(e, module);
@@ -216,7 +216,7 @@ public class ContactMechWorker {
GenericValue contactMech = null;
try {
- contactMech = orderContactMech.getRelatedOne("ContactMech");
+ contactMech = orderContactMech.getRelatedOne("ContactMech", false);
} catch (GenericEntityException e) {
Debug.logWarning(e, module);
}
@@ -228,13 +228,13 @@ public class ContactMechWorker {
orderContactMechValueMap.put("orderContactMech", orderContactMech);
try {
- orderContactMechValueMap.put("contactMechType", contactMech.getRelatedOneCache("ContactMechType"));
+ orderContactMechValueMap.put("contactMechType", contactMech.getRelatedOne("ContactMechType", true));
} catch (GenericEntityException e) {
Debug.logWarning(e, module);
}
try {
- GenericValue contactMechPurposeType = orderContactMech.getRelatedOne("ContactMechPurposeType");
+ GenericValue contactMechPurposeType = orderContactMech.getRelatedOne("ContactMechPurposeType", false);
orderContactMechValueMap.put("contactMechPurposeType", contactMechPurposeType);
} catch (GenericEntityException e) {
@@ -243,9 +243,9 @@ public class ContactMechWorker {
try {
if ("POSTAL_ADDRESS".equals(contactMech.getString("contactMechTypeId"))) {
- orderContactMechValueMap.put("postalAddress", contactMech.getRelatedOne("PostalAddress"));
+ orderContactMechValueMap.put("postalAddress", contactMech.getRelatedOne("PostalAddress", false));
} else if ("TELECOM_NUMBER".equals(contactMech.getString("contactMechTypeId"))) {
- orderContactMechValueMap.put("telecomNumber", contactMech.getRelatedOne("TelecomNumber"));
+ orderContactMechValueMap.put("telecomNumber", contactMech.getRelatedOne("TelecomNumber", false));
}
} catch (GenericEntityException e) {
Debug.logWarning(e, module);
@@ -274,7 +274,7 @@ public class ContactMechWorker {
GenericValue contactMech = null;
try {
- contactMech = workEffortContactMech.getRelatedOne("ContactMech");
+ contactMech = workEffortContactMech.getRelatedOne("ContactMech", false);
} catch (GenericEntityException e) {
Debug.logWarning(e, module);
}
@@ -286,16 +286,16 @@ public class ContactMechWorker {
workEffortContactMechValueMap.put("workEffortContactMech", workEffortContactMech);
try {
- workEffortContactMechValueMap.put("contactMechType", contactMech.getRelatedOneCache("ContactMechType"));
+ workEffortContactMechValueMap.put("contactMechType", contactMech.getRelatedOne("ContactMechType", true));
} catch (GenericEntityException e) {
Debug.logWarning(e, module);
}
try {
if ("POSTAL_ADDRESS".equals(contactMech.getString("contactMechTypeId"))) {
- workEffortContactMechValueMap.put("postalAddress", contactMech.getRelatedOne("PostalAddress"));
+ workEffortContactMechValueMap.put("postalAddress", contactMech.getRelatedOne("PostalAddress", false));
} else if ("TELECOM_NUMBER".equals(contactMech.getString("contactMechTypeId"))) {
- workEffortContactMechValueMap.put("telecomNumber", contactMech.getRelatedOne("TelecomNumber"));
+ workEffortContactMechValueMap.put("telecomNumber", contactMech.getRelatedOne("TelecomNumber", false));
}
} catch (GenericEntityException e) {
Debug.logWarning(e, module);
@@ -396,7 +396,7 @@ public class ContactMechWorker {
GenericValue contactMechPurposeType = null;
try {
- contactMechPurposeType = contactMechTypePurpose.getRelatedOne("ContactMechPurposeType");
+ contactMechPurposeType = contactMechTypePurpose.getRelatedOne("ContactMechPurposeType", false);
} catch (GenericEntityException e) {
Debug.logWarning(e, module);
}
@@ -443,7 +443,7 @@ public class ContactMechWorker {
GenericValue postalAddress = null;
try {
- if (contactMech != null) postalAddress = contactMech.getRelatedOne("PostalAddress");
+ if (contactMech != null) postalAddress = contactMech.getRelatedOne("PostalAddress", false);
} catch (GenericEntityException e) {
Debug.logWarning(e, module);
}
@@ -452,7 +452,7 @@ public class ContactMechWorker {
GenericValue telecomNumber = null;
try {
- if (contactMech != null) telecomNumber = contactMech.getRelatedOne("TelecomNumber");
+ if (contactMech != null) telecomNumber = contactMech.getRelatedOne("TelecomNumber", false);
} catch (GenericEntityException e) {
Debug.logWarning(e, module);
}
@@ -608,7 +608,7 @@ public class ContactMechWorker {
GenericValue contactMechPurposeType = null;
try {
- contactMechPurposeType = contactMechTypePurpose.getRelatedOne("ContactMechPurposeType");
+ contactMechPurposeType = contactMechTypePurpose.getRelatedOne("ContactMechPurposeType", false);
} catch (GenericEntityException e) {
Debug.logWarning(e, module);
}
@@ -655,7 +655,7 @@ public class ContactMechWorker {
GenericValue postalAddress = null;
try {
- if (contactMech != null) postalAddress = contactMech.getRelatedOne("PostalAddress");
+ if (contactMech != null) postalAddress = contactMech.getRelatedOne("PostalAddress", false);
} catch (GenericEntityException e) {
Debug.logWarning(e, module);
}
@@ -664,7 +664,7 @@ public class ContactMechWorker {
GenericValue telecomNumber = null;
try {
- if (contactMech != null) telecomNumber = contactMech.getRelatedOne("TelecomNumber");
+ if (contactMech != null) telecomNumber = contactMech.getRelatedOne("TelecomNumber", false);
} catch (GenericEntityException e) {
Debug.logWarning(e, module);
}
@@ -703,7 +703,7 @@ public class ContactMechWorker {
GenericValue contactMech = null;
try {
- contactMech = partyContactMech.getRelatedOne("ContactMech");
+ contactMech = partyContactMech.getRelatedOne("ContactMech", false);
} catch (GenericEntityException e) {
Debug.logWarning(e, module);
}
@@ -715,7 +715,7 @@ public class ContactMechWorker {
postalAddressInfo.put("partyContactMech", partyContactMech);
try {
- GenericValue postalAddress = contactMech.getRelatedOne("PostalAddress");
+ GenericValue postalAddress = contactMech.getRelatedOne("PostalAddress", false);
postalAddressInfo.put("postalAddress", postalAddress);
} catch (GenericEntityException e) {
Debug.logWarning(e, module);
@@ -751,7 +751,7 @@ public class ContactMechWorker {
GenericValue curContactMech = null;
if (curPartyContactMech != null) {
try {
- curContactMech = curPartyContactMech.getRelatedOne("ContactMech");
+ curContactMech = curPartyContactMech.getRelatedOne("ContactMech", false);
} catch (GenericEntityException e) {
Debug.logWarning(e, module);
}
@@ -769,7 +769,7 @@ public class ContactMechWorker {
GenericValue curPostalAddress = null;
if (curContactMech != null) {
try {
- curPostalAddress = curContactMech.getRelatedOne("PostalAddress");
+ curPostalAddress = curContactMech.getRelatedOne("PostalAddress", false);
} catch (GenericEntityException e) {
Debug.logWarning(e, module);
}
@@ -849,7 +849,7 @@ public class ContactMechWorker {
partyContactMechs = EntityUtil.filterByDate(partyContactMechs);
if (partyContactMechs != null) {
for (GenericValue pcm: partyContactMechs) {
- GenericValue addr = pcm.getRelatedOne("PostalAddress");
+ GenericValue addr = pcm.getRelatedOne("PostalAddress", false);
if (addr != null) {
postalAddresses.add(addr);
}
@@ -973,12 +973,12 @@ public class ContactMechWorker {
sb.append(", ").append(postalAddress.get("city"));
}
if (postalAddress.get("stateProvinceGeoId") != null) {
- GenericValue geoValue = postalAddress.getRelatedOne("StateProvinceGeo");
+ GenericValue geoValue = postalAddress.getRelatedOne("StateProvinceGeo", false);
if (geoValue != null) {
sb.append(", ").append(geoValue.get("geoName"));
}
} else if (postalAddress.get("countyGeoId") != null) {
- GenericValue geoValue = postalAddress.getRelatedOne("CountyGeo");
+ GenericValue geoValue = postalAddress.getRelatedOne("CountyGeo", false);
if (geoValue != null) {
sb.append(", ").append(geoValue.get("geoName"));
}
@@ -987,7 +987,7 @@ public class ContactMechWorker {
sb.append(", ").append(postalAddress.get("postalCode"));
}
if (postalAddress.get("countryGeoId") != null) {
- GenericValue geoValue = postalAddress.getRelatedOne("CountryGeo");
+ GenericValue geoValue = postalAddress.getRelatedOne("CountryGeo", false);
if (geoValue != null) {
sb.append(", ").append(geoValue.get("geoName"));
}
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=1343486&r1=1343485&r2=1343486&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 Tue May 29 04:13:22 2012
@@ -379,7 +379,7 @@ public class PartyServices {
}
if (party != null) {
- GenericValue partyType = party.getRelatedOneCache("PartyType");
+ GenericValue partyType = party.getRelatedOne("PartyType", true);
if (!EntityTypeUtil.isType(partyType, partyGroupPartyType)) {
return ServiceUtil.returnError(UtilProperties.getMessage(resourceError,
Modified: ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyTypeHelper.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyTypeHelper.java?rev=1343486&r1=1343485&r2=1343486&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyTypeHelper.java (original)
+++ ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyTypeHelper.java Tue May 29 04:13:22 2012
@@ -47,7 +47,7 @@ public class PartyTypeHelper {
try {
party = delegator.findOne("Party", UtilMisc.toMap("partyId", partyId), false);
if (UtilValidate.isNotEmpty(party)) {
- partyType = party.getRelatedOneCache("PartyType");
+ partyType = party.getRelatedOne("PartyType", true);
checkedTypeOfParty = delegator.findOne("PartyType", UtilMisc.toMap("partyTypeId", checkedPartyType), true);
} else {
return false;
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=1343486&r1=1343485&r2=1343486&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 Tue May 29 04:13:22 2012
@@ -123,7 +123,7 @@ public class PartyWorker {
GenericValue pcm = findPartyLatestContactMech(partyId, "POSTAL_ADDRESS", delegator);
if (pcm != null) {
try {
- return pcm.getRelatedOne("PostalAddress");
+ return pcm.getRelatedOne("PostalAddress", false);
} catch (GenericEntityException e) {
Debug.logError(e, "Error while finding latest PostalAddress for party with ID [" + partyId + "]: " + e.toString(), module);
}
@@ -135,7 +135,7 @@ public class PartyWorker {
GenericValue latestPostalAddress = findPartyLatestPostalAddress(partyId, delegator);
if (latestPostalAddress != null) {
try {
- GenericValue latestGeoPoint = latestPostalAddress.getRelatedOne("GeoPoint");
+ GenericValue latestGeoPoint = latestPostalAddress.getRelatedOne("GeoPoint", false);
if (latestGeoPoint != null) {
return latestGeoPoint;
}
@@ -151,7 +151,7 @@ public class PartyWorker {
GenericValue pcm = findPartyLatestContactMech(partyId, "TELECOM_NUMBER", delegator);
if (pcm != null) {
try {
- return pcm.getRelatedOne("TelecomNumber");
+ return pcm.getRelatedOne("TelecomNumber", false);
} catch (GenericEntityException e) {
Debug.logError(e, "Error while finding latest TelecomNumber for party with ID [" + partyId + "]: " + e.toString(), module);
}
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=1343486&r1=1343485&r2=1343486&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 Tue May 29 04:13:22 2012
@@ -32,8 +32,8 @@ partyId = parameters.partyId ?:request.g
party = delegator.findOne("Party", [partyId : partyId], false);
context.party = party;
if (party) {
- context.lookupPerson = party.getRelatedOne("Person");
- context.lookupGroup = party.getRelatedOne("PartyGroup");
+ context.lookupPerson = party.getRelatedOne("Person", false);
+ context.lookupGroup = party.getRelatedOne("PartyGroup", false);
}
shoppingListId = parameters.shoppingListId ?: request.getAttribute("shoppingListId");
@@ -77,7 +77,7 @@ if (shoppingListId) {
shoppingListItemDatas = new ArrayList(shoppingListItems.size());
shoppingListItems.each { shoppingListItem ->
shoppingListItemData = [:];
- product = shoppingListItem.getRelatedOneCache("Product");
+ product = shoppingListItem.getRelatedOne("Product", true);
// DEJ20050704 not sure about calculating price here, will have some bogus data when not in a store webapp
calcPriceInMap = [product : product, quantity : shoppingListItem.quantity , currencyUomId : currencyUomId, userLogin : userLogin, productStoreId : shoppingList.productStoreId];
@@ -120,7 +120,7 @@ if (shoppingListId) {
context.highIndex = highIndex;
}
- shoppingListType = shoppingList.getRelatedOne("ShoppingListType");
+ shoppingListType = shoppingList.getRelatedOne("ShoppingListType", false);
context.shoppingListType = shoppingListType;
// get the child shopping lists of the current list for the logged in user
@@ -138,7 +138,7 @@ if (shoppingListId) {
}
// get the parent shopping list if there is one
- parentShoppingList = shoppingList.getRelatedOne("ParentShoppingList");
+ parentShoppingList = shoppingList.getRelatedOne("ParentShoppingList", false);
context.parentShoppingList = parentShoppingList;
}
}
Modified: ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/GetUserLoginPrimaryEmail.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/GetUserLoginPrimaryEmail.groovy?rev=1343486&r1=1343485&r2=1343486&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/GetUserLoginPrimaryEmail.groovy (original)
+++ ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/GetUserLoginPrimaryEmail.groovy Tue May 29 04:13:22 2012
@@ -20,7 +20,7 @@
//figure out the PRIMARY_EMAIL of the logged in user, for setting in the send email link
//maybe nice to put in some secondary emails later
if (userLogin) {
- userLoginParty = userLogin.getRelatedOneCache("Party");
+ userLoginParty = userLogin.getRelatedOne("Party", true);
if (userLoginParty) {
userLoginPartyPrimaryEmails = userLoginParty.getRelatedByAnd("PartyContactMechPurpose", [contactMechPurposeTypeId : "PRIMARY_EMAIL"]);
if (userLoginPartyPrimaryEmails) {
Modified: ofbiz/trunk/applications/party/webapp/partymgr/party/contactmechtemplates/PostalAddress.fo.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/party/contactmechtemplates/PostalAddress.fo.ftl?rev=1343486&r1=1343485&r2=1343486&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/party/contactmechtemplates/PostalAddress.fo.ftl (original)
+++ ofbiz/trunk/applications/party/webapp/partymgr/party/contactmechtemplates/PostalAddress.fo.ftl Tue May 29 04:13:22 2012
@@ -21,7 +21,7 @@ under the License.
<fo:block>${postalAddress.city?if_exists}<#if postalAddress.stateProvinceGeoId?has_content>, ${postalAddress.stateProvinceGeoId}</#if> ${postalAddress.postalCode?if_exists}</fo:block>
<#if postalAddress.countryGeoId?has_content>
<fo:block>
- <#assign country = postalAddress.getRelatedOneCache("CountryGeo")>
+ <#assign country = postalAddress.getRelatedOne("CountryGeo", true)>
${country.get("geoName", locale)?default(country.geoId)}
</fo:block>
</#if>
Modified: ofbiz/trunk/applications/party/webapp/partymgr/party/contactmechtemplates/PostalAddress.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/party/contactmechtemplates/PostalAddress.ftl?rev=1343486&r1=1343485&r2=1343486&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/party/contactmechtemplates/PostalAddress.ftl (original)
+++ ofbiz/trunk/applications/party/webapp/partymgr/party/contactmechtemplates/PostalAddress.ftl Tue May 29 04:13:22 2012
@@ -23,12 +23,12 @@ under the License.
<#if postalAddress.address2?has_content>${postalAddress.address2}<br /></#if>
${postalAddress.city?if_exists},
<#if postalAddress.stateProvinceGeoId?has_content>
- <#assign stateProvince = postalAddress.getRelatedOneCache("StateProvinceGeo")>
+ <#assign stateProvince = postalAddress.getRelatedOne("StateProvinceGeo", true)>
${stateProvince.abbreviation?default(stateProvince.geoId)}
</#if>
${postalAddress.postalCode?if_exists}
<#if postalAddress.countryGeoId?has_content><br />
- <#assign country = postalAddress.getRelatedOneCache("CountryGeo")>
+ <#assign country = postalAddress.getRelatedOne("CountryGeo", true)>
${country.get("geoName", locale)?default(country.geoId)}
</#if>
</div>
Modified: ofbiz/trunk/applications/party/webapp/partymgr/party/contactmechtemplates/PostalAddress_DEU.fo.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/party/contactmechtemplates/PostalAddress_DEU.fo.ftl?rev=1343486&r1=1343485&r2=1343486&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/party/contactmechtemplates/PostalAddress_DEU.fo.ftl (original)
+++ ofbiz/trunk/applications/party/webapp/partymgr/party/contactmechtemplates/PostalAddress_DEU.fo.ftl Tue May 29 04:13:22 2012
@@ -21,7 +21,7 @@ under the License.
<fo:block>${postalAddress.postalCode?if_exists} ${postalAddress.city?if_exists}</fo:block>
<#if postalAddress.countryGeoId?has_content>
<fo:block>
- <#assign country = postalAddress.getRelatedOneCache("CountryGeo")>
+ <#assign country = postalAddress.getRelatedOne("CountryGeo", true)>
${country.get("geoName", locale)?default(country.geoId)}
</fo:block>
</#if>
Modified: ofbiz/trunk/applications/party/webapp/partymgr/party/contactmechtemplates/PostalAddress_DEU.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/party/contactmechtemplates/PostalAddress_DEU.ftl?rev=1343486&r1=1343485&r2=1343486&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/party/contactmechtemplates/PostalAddress_DEU.ftl (original)
+++ ofbiz/trunk/applications/party/webapp/partymgr/party/contactmechtemplates/PostalAddress_DEU.ftl Tue May 29 04:13:22 2012
@@ -23,7 +23,7 @@ under the License.
<#if postalAddress.address2?has_content>${postalAddress.address2}<br /></#if>
${postalAddress.postalCode?if_exists} ${postalAddress.city?if_exists}
<#if postalAddress.countryGeoId?has_content><br />
- <#assign country = postalAddress.getRelatedOneCache("CountryGeo")>
+ <#assign country = postalAddress.getRelatedOne("CountryGeo", true)>
${country.get("geoName", locale)?default(country.geoId)}
</#if>
</div>
Modified: ofbiz/trunk/applications/party/webapp/partymgr/party/contactmechtemplates/PostalAddress_USA.fo.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/party/contactmechtemplates/PostalAddress_USA.fo.ftl?rev=1343486&r1=1343485&r2=1343486&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/party/contactmechtemplates/PostalAddress_USA.fo.ftl (original)
+++ ofbiz/trunk/applications/party/webapp/partymgr/party/contactmechtemplates/PostalAddress_USA.fo.ftl Tue May 29 04:13:22 2012
@@ -21,7 +21,7 @@ under the License.
<fo:block>${postalAddress.city?if_exists}<#if postalAddress.stateProvinceGeoId?has_content>, ${postalAddress.stateProvinceGeoId}</#if> ${postalAddress.postalCode?if_exists}</fo:block>
<#if postalAddress.countryGeoId?has_content>
<fo:block>
- <#assign country = postalAddress.getRelatedOneCache("CountryGeo")>
+ <#assign country = postalAddress.getRelatedOne("CountryGeo", true)>
${country.get("geoName", locale)?default(country.geoId)}
</fo:block>
</#if>
Modified: ofbiz/trunk/applications/party/webapp/partymgr/party/contactmechtemplates/PostalAddress_USA.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/party/contactmechtemplates/PostalAddress_USA.ftl?rev=1343486&r1=1343485&r2=1343486&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/party/contactmechtemplates/PostalAddress_USA.ftl (original)
+++ ofbiz/trunk/applications/party/webapp/partymgr/party/contactmechtemplates/PostalAddress_USA.ftl Tue May 29 04:13:22 2012
@@ -23,12 +23,12 @@ under the License.
<#if postalAddress.address2?has_content>${postalAddress.address2}<br /></#if>
${postalAddress.city?if_exists},
<#if postalAddress.stateProvinceGeoId?has_content>
- <#assign stateProvince = postalAddress.getRelatedOneCache("StateProvinceGeo")>
+ <#assign stateProvince = postalAddress.getRelatedOne("StateProvinceGeo", true)>
${stateProvince.abbreviation?default(stateProvince.geoId)}
</#if>
${postalAddress.postalCode?if_exists}
<#if postalAddress.countryGeoId?has_content><br />
- <#assign country = postalAddress.getRelatedOneCache("CountryGeo")>
+ <#assign country = postalAddress.getRelatedOne("CountryGeo", true)>
${country.get("geoName", locale)?default(country.geoId)}
</#if>
</div>
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=1343486&r1=1343485&r2=1343486&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/party/editcontactmech.ftl (original)
+++ ofbiz/trunk/applications/party/webapp/partymgr/party/editcontactmech.ftl Tue May 29 04:13:22 2012
@@ -65,7 +65,7 @@ under the License.
<table class="basic-table" cellspacing="0">
<#if mechMap.partyContactMechPurposes?has_content>
<#list mechMap.partyContactMechPurposes as partyContactMechPurpose>
- <#assign contactMechPurposeType = partyContactMechPurpose.getRelatedOneCache("ContactMechPurposeType")>
+ <#assign contactMechPurposeType = partyContactMechPurpose.getRelatedOne("ContactMechPurposeType", true)>
<tr>
<td>
<#if contactMechPurposeType?has_content>
Modified: ofbiz/trunk/applications/party/webapp/partymgr/party/editcreditcard.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/party/editcreditcard.ftl?rev=1343486&r1=1343485&r2=1343486&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/party/editcreditcard.ftl (original)
+++ ofbiz/trunk/applications/party/webapp/partymgr/party/editcreditcard.ftl Tue May 29 04:13:22 2012
@@ -60,7 +60,7 @@ under the License.
<td>
<p><b>${uiLabelMap.PartyUseCurrentAddress}:</b></p>
<#list curPartyContactMechPurposes as curPartyContactMechPurpose>
- <#assign curContactMechPurposeType = curPartyContactMechPurpose.getRelatedOneCache("ContactMechPurposeType")>
+ <#assign curContactMechPurposeType = curPartyContactMechPurpose.getRelatedOne("ContactMechPurposeType", true)>
<p>
<b>${curContactMechPurposeType.get("description",locale)?if_exists}</b>
<#if curPartyContactMechPurpose.thruDate?exists>
@@ -103,7 +103,7 @@ under the License.
</td>
<td>
<#list partyContactMechPurposes as partyContactMechPurpose>
- <#assign contactMechPurposeType = partyContactMechPurpose.getRelatedOneCache("ContactMechPurposeType")>
+ <#assign contactMechPurposeType = partyContactMechPurpose.getRelatedOne("ContactMechPurposeType", true)>
<p>
<b>${contactMechPurposeType.get("description",locale)?if_exists}</b>
<#if partyContactMechPurpose.thruDate?exists>(${uiLabelMap.CommonExpire}:${partyContactMechPurpose.thruDate})</#if>
Modified: ofbiz/trunk/applications/party/webapp/partymgr/party/editeftaccount.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/party/editeftaccount.ftl?rev=1343486&r1=1343485&r2=1343486&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/party/editeftaccount.ftl (original)
+++ ofbiz/trunk/applications/party/webapp/partymgr/party/editeftaccount.ftl Tue May 29 04:13:22 2012
@@ -108,7 +108,7 @@ under the License.
<td>
<p><b>${uiLabelMap.PartyUseCurrentAddress}:</b></p>
<#list curPartyContactMechPurposes as curPartyContactMechPurpose>
- <#assign curContactMechPurposeType = curPartyContactMechPurpose.getRelatedOneCache("ContactMechPurposeType")>
+ <#assign curContactMechPurposeType = curPartyContactMechPurpose.getRelatedOne("ContactMechPurposeType", true)>
<p><b>${curContactMechPurposeType.get("description",locale)?if_exists}</b></p>
<#if curPartyContactMechPurpose.thruDate?exists>
<p>(${uiLabelMap.CommonExpire}:${curPartyContactMechPurpose.thruDate.toString()})</p>
@@ -149,7 +149,7 @@ under the License.
</td>
<td>
<#list partyContactMechPurposes as partyContactMechPurpose>
- <#assign contactMechPurposeType = partyContactMechPurpose.getRelatedOneCache("ContactMechPurposeType")>
+ <#assign contactMechPurposeType = partyContactMechPurpose.getRelatedOne("ContactMechPurposeType", true)>
<p><b>${contactMechPurposeType.get("description",locale)?if_exists}</b></p>
<#if partyContactMechPurpose.thruDate?exists><p>(${uiLabelMap.CommonExpire}:${partyContactMechPurpose.thruDate})</p></#if>
</#list>
Modified: ofbiz/trunk/applications/party/webapp/partymgr/party/findMatches.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/party/findMatches.ftl?rev=1343486&r1=1343485&r2=1343486&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/party/findMatches.ftl (original)
+++ ofbiz/trunk/applications/party/webapp/partymgr/party/findMatches.ftl Tue May 29 04:13:22 2012
@@ -89,8 +89,8 @@ under the License.
<td>${uiLabelMap.PartyPartyId}</td>
</tr>
<#list matches as match>
- <#assign person = match.getRelatedOne("Party").getRelatedOne("Person")?if_exists>
- <#assign group = match.getRelatedOne("Party").getRelatedOne("PartyGroup")?if_exists>
+ <#assign person = match.getRelatedOne("Party", false).getRelatedOne("Person", false)?if_exists>
+ <#assign group = match.getRelatedOne("Party", false).getRelatedOne("PartyGroup", false)?if_exists>
<tr>
<#if person?has_content>
<td>${person.lastName}</td>
Modified: ofbiz/trunk/applications/party/webapp/partymgr/party/findparty.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/party/findparty.ftl?rev=1343486&r1=1343485&r2=1343486&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/party/findparty.ftl (original)
+++ ofbiz/trunk/applications/party/webapp/partymgr/party/findparty.ftl Tue May 29 04:13:22 2012
@@ -258,7 +258,7 @@ under the License.
<#assign alt_row = false>
<#assign rowCount = 0>
<#list partyList as partyRow>
- <#assign partyType = partyRow.getRelatedOne("PartyType")?if_exists>
+ <#assign partyType = partyRow.getRelatedOne("PartyType", false)?if_exists>
<tr valign="middle"<#if alt_row> class="alternate-row"</#if>>
<td><a href="<@o...@ofbizUrl>">${partyRow.partyId}</a></td>
<td>
Modified: ofbiz/trunk/applications/party/webapp/partymgr/party/profileblocks/Contact.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/party/profileblocks/Contact.ftl?rev=1343486&r1=1343485&r2=1343486&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/party/profileblocks/Contact.ftl (original)
+++ ofbiz/trunk/applications/party/webapp/partymgr/party/profileblocks/Contact.ftl Tue May 29 04:13:22 2012
@@ -44,7 +44,7 @@ under the License.
<td class="label align-top">${contactMechMap.contactMechType.get("description",locale)}</td>
<td>
<#list contactMechMap.partyContactMechPurposes as partyContactMechPurpose>
- <#assign contactMechPurposeType = partyContactMechPurpose.getRelatedOneCache("ContactMechPurposeType")>
+ <#assign contactMechPurposeType = partyContactMechPurpose.getRelatedOne("ContactMechPurposeType", true)>
<div>
<#if contactMechPurposeType?has_content>
<b>${contactMechPurposeType.get("description",locale)}</b>
Modified: ofbiz/trunk/applications/party/webapp/partymgr/party/profileblocks/ContentList.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/party/profileblocks/ContentList.ftl?rev=1343486&r1=1343485&r2=1343486&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/party/profileblocks/ContentList.ftl (original)
+++ ofbiz/trunk/applications/party/webapp/partymgr/party/profileblocks/ContentList.ftl Tue May 29 04:13:22 2012
@@ -21,11 +21,11 @@ under the License.
<#if partyContent?has_content>
<table class="basic-table" cellspacing="0">
<#list partyContent as pContent>
- <#assign content = pContent.getRelatedOne("Content")>
- <#assign contentType = content.getRelatedOneCache("ContentType")>
- <#assign mimeType = content.getRelatedOneCache("MimeType")?if_exists>
- <#assign status = content.getRelatedOneCache("StatusItem")?if_exists>
- <#assign pcType = pContent.getRelatedOne("PartyContentType")>
+ <#assign content = pContent.getRelatedOne("Content", false)>
+ <#assign contentType = content.getRelatedOne("ContentType", true)>
+ <#assign mimeType = content.getRelatedOne("MimeType", true)?if_exists>
+ <#assign status = content.getRelatedOne("StatusItem", true)?if_exists>
+ <#assign pcType = pContent.getRelatedOne("PartyContentType", false)>
<tr>
<td class="button-col"><a href="<@o...@ofbizUrl>">${content.contentId}</a></td>
<td>${(pcType.get("description", locale))?if_exists}</td>
Modified: ofbiz/trunk/applications/party/webapp/partymgr/visit/visitdetail.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/visit/visitdetail.ftl?rev=1343486&r1=1343485&r2=1343486&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/visit/visitdetail.ftl (original)
+++ ofbiz/trunk/applications/party/webapp/partymgr/visit/visitdetail.ftl Tue May 29 04:13:22 2012
@@ -123,7 +123,7 @@ under the License.
<#assign alt_row = false>
<#if serverHits?has_content>
<#list serverHits[lowIndex..highIndex-1] as hit>
- <#assign serverHitType = hit.getRelatedOne("ServerHitType")?if_exists>
+ <#assign serverHitType = hit.getRelatedOne("ServerHitType", false)?if_exists>
<tr<#if alt_row> class="alternate-row"</#if>>
<td>${hit.contentId?if_exists}</td>
<td>${serverHitType.get("description",locale)?if_exists}</td>