Author: jonesde
Date: Wed Oct 11 10:05:40 2006
New Revision: 462860

URL: http://svn.apache.org/viewvc?view=rev&rev=462860
Log:
Added new view entity to more effectively get and display it, namely 
PartyContactDetailByPurpose; also added ContactMechPurpose for previous address

Modified:
    incubator/ofbiz/trunk/applications/party/data/PartyTypeData.xml
    incubator/ofbiz/trunk/applications/party/entitydef/entitygroup.xml
    incubator/ofbiz/trunk/applications/party/entitydef/entitymodel.xml

Modified: incubator/ofbiz/trunk/applications/party/data/PartyTypeData.xml
URL: 
http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/party/data/PartyTypeData.xml?view=diff&rev=462860&r1=462859&r2=462860
==============================================================================
--- incubator/ofbiz/trunk/applications/party/data/PartyTypeData.xml (original)
+++ incubator/ofbiz/trunk/applications/party/data/PartyTypeData.xml Wed Oct 11 
10:05:40 2006
@@ -55,6 +55,7 @@
     <ContactMechPurposeType contactMechPurposeTypeId="GENERAL_LOCATION" 
description="General Correspondence Address"/>
     <ContactMechPurposeType contactMechPurposeTypeId="PUR_RET_LOCATION" 
description="Purchase Return Address"/>
     <ContactMechPurposeType contactMechPurposeTypeId="PRIMARY_LOCATION" 
description="Primary Address"/>
+    <ContactMechPurposeType contactMechPurposeTypeId="PREVIOUS_LOCATION" 
description="Previous Address"/>
     <ContactMechPurposeType contactMechPurposeTypeId="PHONE_SHIPPING" 
description="Shipping Destination Phone Number"/>
     <ContactMechPurposeType contactMechPurposeTypeId="PHONE_SHIP_ORIG" 
description="Shipping Origin Phone Number"/>
     <ContactMechPurposeType contactMechPurposeTypeId="PHONE_BILLING" 
description="Billing (AP) Phone Number"/>
@@ -91,6 +92,7 @@
     <ContactMechTypePurpose contactMechPurposeTypeId="GENERAL_LOCATION" 
contactMechTypeId="POSTAL_ADDRESS"/>
     <ContactMechTypePurpose contactMechPurposeTypeId="PUR_RET_LOCATION" 
contactMechTypeId="POSTAL_ADDRESS"/>
     <ContactMechTypePurpose contactMechPurposeTypeId="PRIMARY_LOCATION" 
contactMechTypeId="POSTAL_ADDRESS"/>
+    <ContactMechTypePurpose contactMechPurposeTypeId="PREVIOUS_LOCATION" 
contactMechTypeId="POSTAL_ADDRESS"/>
     <ContactMechTypePurpose contactMechPurposeTypeId="FAX_NUMBER" 
contactMechTypeId="TELECOM_NUMBER"/>
     <ContactMechTypePurpose contactMechPurposeTypeId="FAX_NUMBER_SEC" 
contactMechTypeId="TELECOM_NUMBER"/>
     <ContactMechTypePurpose contactMechPurposeTypeId="PHONE_HOME" 
contactMechTypeId="TELECOM_NUMBER"/>

Modified: incubator/ofbiz/trunk/applications/party/entitydef/entitygroup.xml
URL: 
http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/party/entitydef/entitygroup.xml?view=diff&rev=462860&r1=462859&r2=462860
==============================================================================
--- incubator/ofbiz/trunk/applications/party/entitydef/entitygroup.xml 
(original)
+++ incubator/ofbiz/trunk/applications/party/entitydef/entitygroup.xml Wed Oct 
11 10:05:40 2006
@@ -68,6 +68,7 @@
     <entity-group group="org.ofbiz" entity="ContactMechType" />
     <entity-group group="org.ofbiz" entity="ContactMechTypeAttr" />
     <entity-group group="org.ofbiz" entity="ContactMechTypePurpose" />
+    <entity-group group="org.ofbiz" entity="PartyContactDetailByPurpose" />
     <entity-group group="org.ofbiz" entity="PartyContactMech" />
     <entity-group group="org.ofbiz" entity="PartyContactMechPurpose" />
     <entity-group group="org.ofbiz" entity="PostalAddress" />

Modified: incubator/ofbiz/trunk/applications/party/entitydef/entitymodel.xml
URL: 
http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/party/entitydef/entitymodel.xml?view=diff&rev=462860&r1=462859&r2=462860
==============================================================================
--- incubator/ofbiz/trunk/applications/party/entitydef/entitymodel.xml 
(original)
+++ incubator/ofbiz/trunk/applications/party/entitydef/entitymodel.xml Wed Oct 
11 10:05:40 2006
@@ -782,6 +782,51 @@
         <key-map field-name="contactMechPurposeTypeId"/>
       </relation>
     </entity>
+    <view-entity entity-name="PartyContactDetailByPurpose"
+        package-name="org.ofbiz.party.contact"
+        title="Party Contact Purpose View Entity">
+        <member-entity entity-alias="PCM" entity-name="PartyContactMech"/>
+        <member-entity entity-alias="PCMP" 
entity-name="PartyContactMechPurpose"/>
+        <member-entity entity-alias="CM" entity-name="ContactMech"/>
+        <member-entity entity-alias="PA" entity-name="PostalAddress"/>
+        <member-entity entity-alias="TN" entity-name="TelecomNumber"/>
+        <member-entity entity-alias="STTG" entity-name="Geo"/>
+        <member-entity entity-alias="CTYG" entity-name="Geo"/>
+        <member-entity entity-alias="CTRYG" entity-name="Geo"/>
+        <alias-all entity-alias="PCM"/>
+        <alias-all entity-alias="PA"/>
+        <alias-all entity-alias="TN"/>
+        <alias-all entity-alias="STTG" prefix="state"/>
+        <alias-all entity-alias="CTYG" prefix="county"/>
+        <alias-all entity-alias="CTRYG" prefix="country"/>
+        <alias entity-alias="PCMP" name="contactMechPurposeTypeId"/>
+        <alias entity-alias="PCMP" name="purposeFromDate" field="fromDate"/>
+        <alias entity-alias="PCMP" name="purposeThruDate" field="thruDate"/>
+        <alias entity-alias="CM" name="contactMechTypeId"/>
+        <alias entity-alias="CM" name="infoString"/>
+        <view-link entity-alias="PCM" rel-entity-alias="CM">
+            <key-map field-name="contactMechId"/>
+        </view-link>
+        <view-link entity-alias="PCM" rel-entity-alias="PCMP">
+            <key-map field-name="partyId"/>
+            <key-map field-name="contactMechId"/>
+        </view-link>
+        <view-link entity-alias="CM" rel-entity-alias="PA" rel-optional="true">
+            <key-map field-name="contactMechId"/>
+        </view-link>
+        <view-link entity-alias="CM" rel-entity-alias="TN" rel-optional="true">
+            <key-map field-name="contactMechId"/>
+        </view-link>
+        <view-link entity-alias="PA" rel-entity-alias="STTG" 
rel-optional="true">
+            <key-map field-name="stateProvinceGeoId" rel-field-name="geoId"/>
+        </view-link>
+        <view-link entity-alias="PA" rel-entity-alias="CTYG" 
rel-optional="true">
+            <key-map field-name="countyGeoId" rel-field-name="geoId"/>
+        </view-link>
+        <view-link entity-alias="PA" rel-entity-alias="CTRYG" 
rel-optional="true">
+            <key-map field-name="countryGeoId" rel-field-name="geoId"/>
+        </view-link>
+    </view-entity>
     <entity entity-name="PartyContactMech"
             package-name="org.ofbiz.party.contact"
             title="Party Contact Mechanism Entity">
@@ -1398,30 +1443,30 @@
     <view-entity entity-name="PartyContactWithPurpose"
             package-name="org.ofbiz.party.party"
             title="Party Contact Purpose View Entity">
-      <member-entity entity-alias="PR" entity-name="PartyContactMechPurpose"/>
+      <member-entity entity-alias="PCMP" 
entity-name="PartyContactMechPurpose"/>
       <member-entity entity-alias="CM" entity-name="ContactMech"/>
-      <member-entity entity-alias="PC" entity-name="PartyContactMech"/>
+      <member-entity entity-alias="PCM" entity-name="PartyContactMech"/>
       <member-entity entity-alias="PT" entity-name="ContactMechPurposeType"/>
       <alias entity-alias="CM" name="contactMechId"/>
-      <alias entity-alias="PC" name="partyId"/>
-      <alias entity-alias="PR" name="contactMechPurposeTypeId"/>
-      <alias entity-alias="PC" name="contactFromDate" field="fromDate"/>
-      <alias entity-alias="PR" name="purposeFromDate" field="fromDate"/>
-      <alias entity-alias="PR" name="purposeThruDate" field="thruDate"/>
-      <alias entity-alias="PC" name="contactThruDate" field="thruDate"/>
+      <alias entity-alias="PCM" name="partyId"/>
+      <alias entity-alias="PCMP" name="contactMechPurposeTypeId"/>
+      <alias entity-alias="PCM" name="contactFromDate" field="fromDate"/>
+      <alias entity-alias="PCM" name="contactThruDate" field="thruDate"/>
+      <alias entity-alias="PCMP" name="purposeFromDate" field="fromDate"/>
+      <alias entity-alias="PCMP" name="purposeThruDate" field="thruDate"/>
       <alias entity-alias="CM" name="contactMechTypeId"/>
       <alias entity-alias="CM" name="infoString"/>
-      <alias entity-alias="PC" name="comments"/>
-      <alias entity-alias="PC" name="extension"/>
-      <alias entity-alias="PC" name="allowSolicitation"/>
+      <alias entity-alias="PCM" name="comments"/>
+      <alias entity-alias="PCM" name="extension"/>
+      <alias entity-alias="PCM" name="allowSolicitation"/>
       <alias entity-alias="PT" name="purposeDescription" field="description"/>
-      <view-link entity-alias="PR" rel-entity-alias="CM">
+      <view-link entity-alias="PCMP" rel-entity-alias="CM">
         <key-map field-name="contactMechId"/>
       </view-link>
-      <view-link entity-alias="CM" rel-entity-alias="PC">
+      <view-link entity-alias="CM" rel-entity-alias="PCM">
         <key-map field-name="contactMechId"/>
       </view-link>
-      <view-link entity-alias="PR" rel-entity-alias="PT">
+      <view-link entity-alias="PCMP" rel-entity-alias="PT">
         <key-map field-name="contactMechPurposeTypeId"/>
       </view-link>
       <relation type="many" rel-entity-name="PartyContactMech">


Reply via email to