[ofbiz-framework] branch trunk updated: Improved: Converted all TrackingCodeOrderReturn related CRUD services from simple to entity-auto (#89)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[ofbiz-framework] branch trunk updated: Improved: Converted all TrackingCodeOrderReturn related CRUD services from simple to entity-auto (#89)

surajk
This is an automated email from the ASF dual-hosted git repository.

surajk pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 8f77e45  Improved: Converted all TrackingCodeOrderReturn related CRUD services from simple to entity-auto (#89)
8f77e45 is described below

commit 8f77e45f152407572a71b4a379bad39483d94526
Author: Suraj Khurana <[hidden email]>
AuthorDate: Fri May 1 14:31:03 2020 +0530

    Improved: Converted all TrackingCodeOrderReturn related CRUD services from simple to entity-auto (#89)
   
    * Improved: Converted all TrackingCodeOrderReturn related CRUD services from simple to entity-auto
    (OFBIZ-11623)
---
 .../marketing/tracking/TrackingCodeServices.xml    | 34 ----------------------
 applications/marketing/servicedef/services.xml     |  9 ++----
 2 files changed, 3 insertions(+), 40 deletions(-)

diff --git a/applications/marketing/minilang/marketing/tracking/TrackingCodeServices.xml b/applications/marketing/minilang/marketing/tracking/TrackingCodeServices.xml
index d1a1e7c..aa28a84 100644
--- a/applications/marketing/minilang/marketing/tracking/TrackingCodeServices.xml
+++ b/applications/marketing/minilang/marketing/tracking/TrackingCodeServices.xml
@@ -44,20 +44,6 @@ under the License.
         <set from-field="lastModifiedDate" field="newEntity.createdDate"/>
         <store-value value-field="lookedUpValue"/>
     </simple-method>
-
-    <!-- add service for tracking code return -->
-    <simple-method method-name="createTrackingCodeOrderReturn" short-description="Create an TrackingCodeOrderReturn">
-        <now-timestamp field="nowStamp"/>
-        <make-value entity-name="TrackingCodeOrderReturn" value-field="newEntity"/>
-        <set-nonpk-fields map="parameters" value-field="newEntity"/>
-        <set-pk-fields map="parameters" value-field="newEntity"/>
-
-        <!-- set the history/audit info -->
-        <set from-field="nowStamp" field="newEntity.createdStamp"/>
-
-        <create-value value-field="newEntity"/>
-    </simple-method>
-
     <simple-method method-name="createTrackingCodeOrderReturns" short-description="Create TrackingCodeOrderReturn for all the Return Items with Orders that have trackingCodeOrder entry">
         <if-not-empty field="parameters.returnId">
             <set field="returnHeaderFindContext.returnId" from-field="parameters.returnId"/>
@@ -85,24 +71,4 @@ under the License.
             </iterate>
         </if-not-empty>
     </simple-method>
-    <simple-method method-name="updateTrackingCodeOrderReturn" short-description="update an TrackingCodeOrderReturn">
-        <now-timestamp field="nowStamp"/>
-
-        <make-value entity-name="TrackingCodeOrderReturn" value-field="lookupPKMap"/>
-        <set-pk-fields map="parameters" value-field="lookupPKMap"/>
-        <find-by-primary-key entity-name="TrackingCodeOrderReturn" map="lookupPKMap" value-field="lookedUpValue"/>
-        <set-nonpk-fields map="parameters" value-field="lookedUpValue"/>
-
-        <!-- set the history/audit info -->
-        <set from-field="userLogin.userLoginId" field="newEntity.lastModifiedByUserLogin"/>
-        <set from-field="lastModifiedDate" field="newEntity.createdDate"/>
-        <store-value value-field="lookedUpValue"/>
-    </simple-method>
-    <simple-method method-name="deleteTrackingCodeOrderReturn" short-description="delete an TrackingCodeOrderReturn">
-        <make-value entity-name="TrackingCodeOrderReturn" value-field="lookupPKMap"/>
-        <set-pk-fields map="parameters" value-field="lookupPKMap"/>
-        <find-by-primary-key entity-name="TrackingCodeOrderReturn" map="lookupPKMap" value-field="lookedUpValue"/>
-        <remove-value value-field="lookedUpValue"/>
-    </simple-method>
-
 </simple-methods>
diff --git a/applications/marketing/servicedef/services.xml b/applications/marketing/servicedef/services.xml
index 712b0ae..82fbf1a 100644
--- a/applications/marketing/servicedef/services.xml
+++ b/applications/marketing/servicedef/services.xml
@@ -449,22 +449,19 @@ under the License.
     </service>
 
     <!-- Tracking Code Order return  -->
-    <service name="createTrackingCodeOrderReturn" default-entity-name="TrackingCodeOrderReturn" engine="simple"
-            location="component://marketing/minilang/marketing/tracking/TrackingCodeServices.xml" invoke="createTrackingCodeOrderReturn">
+    <service name="createTrackingCodeOrderReturn" default-entity-name="TrackingCodeOrderReturn" engine="entity-auto" invoke="create">
         <description>Create a TrackingCodeOrderReturn  record</description>
         <permission-service service-name="marketingPermissionService" main-action="CREATE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
     </service>
-    <service name="updateTrackingCodeOrderReturn" default-entity-name="TrackingCodeOrderReturn" engine="simple"
-            location="component://marketing/minilang/marketing/tracking/TrackingCodeServices.xml" invoke="updateTrackingCodeOrderReturn">
+    <service name="updateTrackingCodeOrderReturn" default-entity-name="TrackingCodeOrderReturn" engine="entity-auto" invoke="update">
         <description>Update a TrackingCode record</description>
         <permission-service service-name="marketingPermissionService" main-action="UPDATE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
     </service>
-    <service name="deleteTrackingCodeOrderReturn" default-entity-name="TrackingCodeOrderReturn" engine="simple"
-            location="component://marketing/minilang/marketing/tracking/TrackingCodeServices.xml" invoke="deleteTrackingCodeOrderReturn">
+    <service name="deleteTrackingCodeOrderReturn" default-entity-name="TrackingCodeOrderReturn" engine="entity-auto" invoke="delete">
         <description>Update a TrackingCode record</description>
         <permission-service service-name="marketingPermissionService" main-action="DELETE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>