|
Author: doogie
Date: Tue May 29 04:12:36 2012 New Revision: 1343484 URL: http://svn.apache.org/viewvc?rev=1343484&view=rev Log: DEPRECATION: applications/marketing: getRelatedOne variants replaced with a getRelatedOne variant that takes a boolean useCache parameter. Modified: ofbiz/trunk/applications/marketing/src/org/ofbiz/sfa/vcard/VCard.java ofbiz/trunk/applications/marketing/webapp/marketing/WEB-INF/actions/contact/GetContactListMarketingEmail.groovy ofbiz/trunk/applications/marketing/webapp/sfa/WEB-INF/action/CloneLead.groovy ofbiz/trunk/applications/marketing/webapp/sfa/WEB-INF/action/MergeContacts.groovy Modified: ofbiz/trunk/applications/marketing/src/org/ofbiz/sfa/vcard/VCard.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/src/org/ofbiz/sfa/vcard/VCard.java?rev=1343484&r1=1343483&r2=1343484&view=diff ============================================================================== --- ofbiz/trunk/applications/marketing/src/org/ofbiz/sfa/vcard/VCard.java (original) +++ ofbiz/trunk/applications/marketing/src/org/ofbiz/sfa/vcard/VCard.java Tue May 29 04:12:36 2012 @@ -239,13 +239,13 @@ public class VCard { address.setCity(postalAddress.getString("city")); address.setPostalCode(postalAddress.getString("postalCode")); - GenericValue state = postalAddress.getRelatedOne("StateProvinceGeo"); + GenericValue state = postalAddress.getRelatedOne("StateProvinceGeo", false); if (UtilValidate.isNotEmpty(state)) { address.setRegion(state.getString("geoName")); } - GenericValue countryGeo = postalAddress.getRelatedOne("CountryGeo"); + GenericValue countryGeo = postalAddress.getRelatedOne("CountryGeo", false); if (UtilValidate.isNotEmpty(countryGeo)) { - String country = postalAddress.getRelatedOne("CountryGeo").getString("geoName"); + String country = postalAddress.getRelatedOne("CountryGeo", false).getString("geoName"); address.setCountry(country); address.setWork(true); // this can be better set by checking contactMechPurposeTypeId } Modified: ofbiz/trunk/applications/marketing/webapp/marketing/WEB-INF/actions/contact/GetContactListMarketingEmail.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/webapp/marketing/WEB-INF/actions/contact/GetContactListMarketingEmail.groovy?rev=1343484&r1=1343483&r2=1343484&view=diff ============================================================================== --- ofbiz/trunk/applications/marketing/webapp/marketing/WEB-INF/actions/contact/GetContactListMarketingEmail.groovy (original) +++ ofbiz/trunk/applications/marketing/webapp/marketing/WEB-INF/actions/contact/GetContactListMarketingEmail.groovy Tue May 29 04:12:36 2012 @@ -22,7 +22,7 @@ if (!contactList && contactListId) { contactList = delegator.findOne("ContactList", [contactListId : "contactListId"], true); } if (contactList) { - ownerParty = contactList.getRelatedOne("OwnerParty"); + ownerParty = contactList.getRelatedOne("OwnerParty", false); if (ownerParty) { contactMechs = ownerParty.getRelatedByAnd("PartyContactMechPurpose", [contactMechPurposeTypeId : "MARKETING_EMAIL"]); if (!contactMechs) { Modified: ofbiz/trunk/applications/marketing/webapp/sfa/WEB-INF/action/CloneLead.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/webapp/sfa/WEB-INF/action/CloneLead.groovy?rev=1343484&r1=1343483&r2=1343484&view=diff ============================================================================== --- ofbiz/trunk/applications/marketing/webapp/sfa/WEB-INF/action/CloneLead.groovy (original) +++ ofbiz/trunk/applications/marketing/webapp/sfa/WEB-INF/action/CloneLead.groovy Tue May 29 04:12:36 2012 @@ -24,7 +24,7 @@ import org.ofbiz.party.contact.ContactHe partyId = parameters.partyId; if (partyId) { party = delegator.findOne("Party", [partyId : partyId], false); - person = party.getRelatedOne("Person"); + person = party.getRelatedOne("Person", false); contactDetailMap = [partyId : partyId, firstName : person.firstName, lastName : person.lastName, suffix : person.suffix]; partyRelationship = EntityUtil.getFirst(EntityUtil.filterByDate(delegator.findList("PartyRelationship", EntityCondition.makeCondition([partyIdTo : partyId, roleTypeIdTo : 'EMPLOYEE', roleTypeIdFrom : 'LEAD', partyRelationshipTypeId : 'EMPLOYMENT']), @@ -47,7 +47,7 @@ if (partyId) { generalContactMech = EntityUtil.getFirst(ContactHelper.getContactMech(person, "GENERAL_LOCATION", "POSTAL_ADDRESS", false)); if (generalContactMech) { contactDetailMap.addrContactMechId = generalContactMech.contactMechId; - postalAddress = generalContactMech.getRelatedOne("PostalAddress"); + postalAddress = generalContactMech.getRelatedOne("PostalAddress", false); if (postalAddress) { contactDetailMap.address1 = postalAddress.address1; contactDetailMap.city = postalAddress.city; @@ -68,7 +68,7 @@ if (partyId) { phoneContactMech = EntityUtil.getFirst(ContactHelper.getContactMech(person, "PRIMARY_PHONE", "TELECOM_NUMBER", false)); if (phoneContactMech) { contactDetailMap.phoneContactMechId = phoneContactMech.contactMechId; - telecomNumber = phoneContactMech.getRelatedOne("TelecomNumber"); + telecomNumber = phoneContactMech.getRelatedOne("TelecomNumber", false); if (telecomNumber) { countryCode = telecomNumber.countryCode; if (countryCode) { @@ -86,7 +86,7 @@ if (partyId) { } partyDataSource = EntityUtil.getFirst(party.getRelated("PartyDataSource")); if (partyDataSource) { - dataSource = partyDataSource.getRelatedOne("DataSource"); + dataSource = partyDataSource.getRelatedOne("DataSource", false); contactDetailMap.leadSource = dataSource.description; } } Modified: ofbiz/trunk/applications/marketing/webapp/sfa/WEB-INF/action/MergeContacts.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/webapp/sfa/WEB-INF/action/MergeContacts.groovy?rev=1343484&r1=1343483&r2=1343484&view=diff ============================================================================== --- ofbiz/trunk/applications/marketing/webapp/sfa/WEB-INF/action/MergeContacts.groovy (original) +++ ofbiz/trunk/applications/marketing/webapp/sfa/WEB-INF/action/MergeContacts.groovy Tue May 29 04:12:36 2012 @@ -28,13 +28,13 @@ if (partyIdFrom && partyIdTo) { partyList = [partyIdTo, partyIdFrom]; partyList.each { partyId -> party = delegator.findOne("Party", [partyId : partyId], false); - person = party.getRelatedOne("Person"); + person = party.getRelatedOne("Person", false); contactDetailMap = [partyId : partyId, firstName : person.firstName, lastName : person.lastName]; generalContactMech = EntityUtil.getFirst(ContactHelper.getContactMech(party, "GENERAL_LOCATION", "POSTAL_ADDRESS", false)); if (generalContactMech) { contactDetailMap.addrContactMechId = generalContactMech.contactMechId; - postalAddress = generalContactMech.getRelatedOne("PostalAddress"); + postalAddress = generalContactMech.getRelatedOne("PostalAddress", false); if (postalAddress) { contactDetailMap.address1 = postalAddress.address1; contactDetailMap.city = postalAddress.city; @@ -57,7 +57,7 @@ if (partyIdFrom && partyIdTo) { phoneContactMech = EntityUtil.getFirst(ContactHelper.getContactMech(party, "PRIMARY_PHONE", "TELECOM_NUMBER", false)); if (phoneContactMech) { contactDetailMap.phoneContactMechId = phoneContactMech.contactMechId; - telecomNumber = phoneContactMech.getRelatedOne("TelecomNumber"); + telecomNumber = phoneContactMech.getRelatedOne("TelecomNumber", false); if (telecomNumber) { countryCode = telecomNumber.countryCode; if (countryCode) { |
| Free forum by Nabble | Edit this page |
