[ofbiz-framework] branch trunk updated: Improved: Converted all TrackingCodeType entities from simple to entity-auto (#87)

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 TrackingCodeType entities from simple to entity-auto (#87)

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 4f90498  Improved: Converted all TrackingCodeType entities from simple to entity-auto (#87)
4f90498 is described below

commit 4f90498f5db689bda0f074c3ff72afcb1a9e7db7
Author: Suraj Khurana <[hidden email]>
AuthorDate: Fri May 1 10:44:32 2020 +0530

    Improved: Converted all TrackingCodeType entities from simple to entity-auto (#87)
   
    * Improved: Converted all TrackingCodeType entities from simple to entity-auto
    (OFBIZ-11615)
---
 .../marketing/tracking/TrackingCodeServices.xml      | 20 --------------------
 applications/marketing/servicedef/services.xml       |  6 ++----
 2 files changed, 2 insertions(+), 24 deletions(-)

diff --git a/applications/marketing/minilang/marketing/tracking/TrackingCodeServices.xml b/applications/marketing/minilang/marketing/tracking/TrackingCodeServices.xml
index d66b1a2..d1a1e7c 100644
--- a/applications/marketing/minilang/marketing/tracking/TrackingCodeServices.xml
+++ b/applications/marketing/minilang/marketing/tracking/TrackingCodeServices.xml
@@ -20,26 +20,6 @@ under the License.
 
 <simple-methods xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns="http://ofbiz.apache.org/Simple-Method" xsi:schemaLocation="http://ofbiz.apache.org/Simple-Method http://ofbiz.apache.org/dtds/simple-methods.xsd">
-    <!-- TrackingCodeType methods -->
-    <simple-method method-name="createTrackingCodeType" short-description="Create an TrackingCodeType">
-        <now-timestamp field="nowStamp"/>
-
-        <make-value entity-name="TrackingCodeType" 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="deleteTrackingCodeType" short-description="Delete an TrackingCodeType">
-        <make-value entity-name="TrackingCodeType" value-field="lookupPKMap"/>
-        <set-pk-fields map="parameters" value-field="lookupPKMap"/>
-        <find-by-primary-key entity-name="TrackingCodeType" map="lookupPKMap" value-field="lookedUpValue"/>
-        <remove-value value-field="lookedUpValue"/>
-    </simple-method>
-
     <simple-method method-name="createTrackingCodeOrder" short-description="Create an TrackingCodeOrder">
         <now-timestamp field="nowStamp"/>
         <make-value entity-name="TrackingCodeOrder" value-field="newEntity"/>
diff --git a/applications/marketing/servicedef/services.xml b/applications/marketing/servicedef/services.xml
index d1c3c1c..712b0ae 100644
--- a/applications/marketing/servicedef/services.xml
+++ b/applications/marketing/servicedef/services.xml
@@ -326,8 +326,7 @@ under the License.
     </service>
 
     <!-- TrackingCodeType Services -->
-    <service name="createTrackingCodeType" default-entity-name="TrackingCodeType" engine="simple"
-            location="component://marketing/minilang/marketing/tracking/TrackingCodeServices.xml" invoke="createTrackingCodeType" auth="true">
+    <service name="createTrackingCodeType" default-entity-name="TrackingCodeType" engine="entity-auto" invoke="create" auth="true">
         <description>Create a TrackingCodeType record</description>
         <permission-service service-name="marketingPermissionService" main-action="CREATE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>
@@ -339,8 +338,7 @@ under the License.
         <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
     </service>
-    <service name="deleteTrackingCodeType" default-entity-name="TrackingCodeType" engine="simple"
-            location="component://marketing/minilang/marketing/tracking/TrackingCodeServices.xml" invoke="deleteTrackingCodeType" auth="true">
+    <service name="deleteTrackingCodeType" default-entity-name="TrackingCodeType" engine="entity-auto" invoke="delete" auth="true">
         <description>Update a TrackingCodeType record</description>
         <permission-service service-name="marketingPermissionService" main-action="DELETE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>