[ofbiz-framework] branch trunk updated: Improved: Converted all EntitySyncInclude services from simple to entity-auto (#84)

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 EntitySyncInclude services from simple to entity-auto (#84)

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 f637e3c  Improved: Converted all EntitySyncInclude services from simple to entity-auto (#84)
f637e3c is described below

commit f637e3c5fe89ba73062740992e265ecf1c536247
Author: Suraj Khurana <[hidden email]>
AuthorDate: Thu Apr 30 13:14:26 2020 +0530

    Improved: Converted all EntitySyncInclude services from simple to entity-auto (#84)
   
    * Improved: Converted all EntitySyncInclude services from simple to entity-auto
    (OFBIZ-11613)
---
 .../entityext/minilang/EntitySyncServices.xml      | 25 ----------------------
 framework/entityext/servicedef/services.xml        |  9 +++-----
 2 files changed, 3 insertions(+), 31 deletions(-)

diff --git a/framework/entityext/minilang/EntitySyncServices.xml b/framework/entityext/minilang/EntitySyncServices.xml
index 830ccfc..a134c26 100644
--- a/framework/entityext/minilang/EntitySyncServices.xml
+++ b/framework/entityext/minilang/EntitySyncServices.xml
@@ -20,16 +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">
-    <simple-method method-name="createEntitySync" short-description="Create a EntitySync">
-        <make-value entity-name="EntitySync" value-field="newEntity"/>
-        <set-nonpk-fields map="parameters" value-field="newEntity"/>
-
-        <sequenced-id sequence-name="EntitySync" field="entitySyncId"/>
-        <set field="newEntity.entitySyncId" from-field="entitySyncId"/>
-        <field-to-result field="entitySyncId" result-name="entitySyncId"/>
-
-        <create-value value-field="newEntity"/>
-    </simple-method>
     <simple-method method-name="resetEntitySyncStatusToNotStarted" short-description="Update a EntitySync, set the Status to ESR_NOT_STARTED, but ONLY if running (ie in ESR_RUNNING)">
         <!-- TODO: add some code to make sure, as much as possible, that this really isn't running -->
         <set field="lookupPKMap.entitySyncId" from-field="parameters.entitySyncId"/>
@@ -39,21 +29,6 @@ under the License.
             <store-value value-field="valueToStore"/>
         </if-compare>
     </simple-method>
-
-    <!-- EntitySyncInclude services -->
-    <simple-method method-name="createEntitySyncInclude" short-description="Create EntitySyncInclude">
-        <make-value entity-name="EntitySyncInclude" value-field="newEntity"/>
-        <set-pk-fields map="parameters" value-field="newEntity"/>
-        <set-nonpk-fields map="parameters" value-field="newEntity"/>
-        <create-value value-field="newEntity"/>
-    </simple-method>
-    <simple-method method-name="deleteEntitySyncInclude" short-description="Delete EntitySyncInclude">
-        <make-value entity-name="EntitySyncInclude" value-field="lookupPKMap"/>
-        <set-pk-fields map="parameters" value-field="lookupPKMap"/>
-        <find-by-primary-key map="lookupPKMap" value-field="lookedUpValue"/>
-        <remove-value value-field="lookedUpValue"/>
-    </simple-method>
-
     <simple-method method-name="entitySyncPermissionCheck" short-description="Check user permission for entity sync.">
         <set field="primaryPermission" value="ENTITY_SYNC"/>
         <call-simple-method method-name="genericBasePermissionCheck" xml-resource="component://common/minilang/permission/CommonPermissionServices.xml"/>
diff --git a/framework/entityext/servicedef/services.xml b/framework/entityext/servicedef/services.xml
index c914728..7d0951e 100644
--- a/framework/entityext/servicedef/services.xml
+++ b/framework/entityext/servicedef/services.xml
@@ -167,8 +167,7 @@ under the License.
     </service>
 
     <!-- EntitySync Services -->
-    <service name="createEntitySync" default-entity-name="EntitySync" engine="simple"
-            location="component://entityext/minilang/EntitySyncServices.xml" invoke="createEntitySync" auth="true">
+    <service name="createEntitySync" default-entity-name="EntitySync" engine="entity-auto" invoke="create" auth="true">
         <description>Create EntitySync</description>
         <permission-service service-name="entitySyncPermissionCheck" main-action="CREATE"/>
         <auto-attributes include="pk" mode="OUT" optional="false"/>
@@ -180,8 +179,7 @@ under the License.
         <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
     </service>
-    <service name="createEntitySyncInclude" default-entity-name="EntitySyncInclude" engine="simple"
-            location="component://entityext/minilang/EntitySyncServices.xml" invoke="createEntitySyncInclude" auth="true">
+    <service name="createEntitySyncInclude" default-entity-name="EntitySyncInclude" engine="entity-auto" invoke="create" auth="true">
         <description>Create EntitySyncInclude</description>
         <permission-service service-name="entitySyncPermissionCheck" main-action="CREATE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>
@@ -194,8 +192,7 @@ under the License.
         <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
     </service>
-    <service name="deleteEntitySyncInclude" default-entity-name="EntitySyncInclude" engine="simple"
-            location="component://entityext/minilang/EntitySyncServices.xml" invoke="deleteEntitySyncInclude" auth="true">
+    <service name="deleteEntitySyncInclude" default-entity-name="EntitySyncInclude" engine="entity-auto" invoke="delete" auth="true">
         <description>Delete EntitySyncInclude</description>
         <permission-service service-name="entitySyncPermissionCheck" main-action="DELETE"/>
         <auto-attributes include="pk" mode="IN" optional="false"/>