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

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 SalaryStep related CRUD services from simple to entity-auto (#98)

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 71d9040  Improved: Converted all SalaryStep related CRUD services from simple to entity-auto (#98)
71d9040 is described below

commit 71d90409230cd13a31dca4a131664719f7c7c996
Author: Suraj Khurana <[hidden email]>
AuthorDate: Sun May 3 11:26:36 2020 +0530

    Improved: Converted all SalaryStep related CRUD services from simple to entity-auto (#98)
   
    Improved: Converted all SalaryStep related CRUD services from simple to entity-auto
    (OFBIZ-11631)
---
 applications/humanres/minilang/HumanResServices.xml | 19 -------------------
 applications/humanres/servicedef/services.xml       | 15 +++++----------
 2 files changed, 5 insertions(+), 29 deletions(-)

diff --git a/applications/humanres/minilang/HumanResServices.xml b/applications/humanres/minilang/HumanResServices.xml
index 4108af4..96e00a5 100644
--- a/applications/humanres/minilang/HumanResServices.xml
+++ b/applications/humanres/minilang/HumanResServices.xml
@@ -227,24 +227,5 @@
         <create-value value-field="personTraining"/>
         <check-errors/>
     </simple-method>
-    
-    <simple-method method-name="createSalaryStep" short-description="Create a Salary Step">
-        <make-value entity-name="SalaryStep" value-field="newEntity"/>
-        <set-pk-fields map="parameters" value-field="newEntity"/>
-        <set-nonpk-fields map="parameters" value-field="newEntity"/>
-        <set field="newEntity.createdByUserLogin" from-field="parameters.userLogin.userLoginId"/>
-        <sequenced-id sequence-name="SalaryStep" field="newEntity.salaryStepSeqId"/>
-        <field-to-result field="salaryStepSeqId" result-name="salaryStepSeqId"/>
-        <create-value value-field="newEntity"/>
-    </simple-method>
-    
-    <simple-method method-name="updateSalaryStep" short-description="Update Salary Step">
-        <entity-one entity-name="SalaryStep" value-field="lookedUpValue"/>
-        <set-nonpk-fields map="parameters" value-field="lookedUpValue"/>
-        <set field="lookedUpValue.lastModifiedByUserLogin" from-field="parameters.userLogin.userLoginId"/>
-        <now field="fromDate"/>
-        <set field="lookedUpValue.dateModified" from-field="fromDate"/>
-        <store-value value-field="lookedUpValue"/>
-    </simple-method>
 
 </simple-methods>
diff --git a/applications/humanres/servicedef/services.xml b/applications/humanres/servicedef/services.xml
index 08a3f69..4d671d8 100644
--- a/applications/humanres/servicedef/services.xml
+++ b/applications/humanres/servicedef/services.xml
@@ -296,29 +296,27 @@ under the License.
         <auto-attributes mode="IN" include="pk" optional="false"/>
     </service>
 
-    <service name="createSalaryStep" engine="simple" default-entity-name="SalaryStep"
-             location="component://humanres/minilang/HumanResServices.xml" invoke="createSalaryStep" auth="true">
+    <!-- SalaryStep services -->
+    <service name="createSalaryStep" engine="entity-auto" default-entity-name="SalaryStep" invoke="create" auth="true">
         <description>Create Salary Step</description>
         <permission-service service-name="humanResManagerPermission" main-action="CREATE"/>
         <auto-attributes mode="IN" include="pk" optional="false"/>
         <auto-attributes mode="IN" include="nonpk" optional="true"/>
         <override type="String" mode="IN" name="salaryStepSeqId" optional="true"/>
     </service>
-
-    <service name="updateSalaryStep" engine="simple" default-entity-name="SalaryStep"
-             location="component://humanres/minilang/HumanResServices.xml" invoke="updateSalaryStep" auth="true">
+    <service name="updateSalaryStep" engine="entity-auto" default-entity-name="SalaryStep" invoke="update" auth="true">
         <description>Update Salary Step</description>
         <permission-service service-name="humanResManagerPermission" main-action="UPDATE"/>
         <auto-attributes mode="IN" include="pk" optional="false"/>
         <auto-attributes mode="IN" include="nonpk" optional="true"/>
     </service>
-
     <service name="deleteSalaryStep" engine="entity-auto" default-entity-name="SalaryStep" invoke="delete" auth="true">
         <description>Delete Salary Step</description>
         <permission-service service-name="humanResManagerPermission" main-action="DELETE"/>
         <auto-attributes mode="IN" include="pk" optional="false"/>
     </service>
 
+    <!-- TerminationReason services -->
     <service name="createTerminationReason" engine="entity-auto" default-entity-name="TerminationReason" invoke="create" auth="true">
         <description>Create an Termination Reason</description>
         <permission-service service-name="humanResManagerPermission" main-action="CREATE"/>
@@ -326,7 +324,6 @@ under the License.
         <auto-attributes mode="IN" include="nonpk" optional="true"/>
         <override name="description" optional="false"/>
     </service>
-
     <service name="updateTerminationReason" engine="entity-auto" default-entity-name="TerminationReason" invoke="update" auth="true">
         <description>Update an Termination Reason</description>
         <permission-service service-name="humanResManagerPermission" main-action="UPDATE"/>
@@ -334,27 +331,25 @@ under the License.
         <auto-attributes mode="IN" include="nonpk" optional="true"/>
         <override name="description" optional="false"/>
     </service>
-
     <service name="deleteTerminationReason" engine="entity-auto" default-entity-name="TerminationReason" invoke="delete" auth="true">
         <description>Delete an Termination Reason</description>
         <permission-service service-name="humanResManagerPermission" main-action="DELETE"/>
         <auto-attributes mode="IN" include="pk" optional="false"/>
     </service>
 
+    <!-- UnemploymentClaim services -->
     <service name="createUnemploymentClaim" engine="entity-auto" default-entity-name="UnemploymentClaim" invoke="create" auth="true">
         <description>Create an Unemployment Claim</description>
         <permission-service service-name="humanResManagerPermission" main-action="CREATE"/>
         <auto-attributes mode="INOUT" include="pk" optional="true"/>
         <auto-attributes mode="IN" include="nonpk" optional="true"/>
     </service>
-
     <service name="updateUnemploymentClaim" engine="entity-auto" default-entity-name="UnemploymentClaim" invoke="update" auth="true">
         <description>Update an Unemployment Claim</description>
         <permission-service service-name="humanResManagerPermission" main-action="UPDATE"/>
         <auto-attributes mode="IN" include="pk" optional="false"/>
         <auto-attributes mode="IN" include="nonpk" optional="true"/>
     </service>
-
     <service name="deleteUnemploymentClaim" engine="entity-auto" default-entity-name="UnemploymentClaim" invoke="delete" auth="true">
         <description>Delete an Unemployment Claim</description>
         <permission-service service-name="humanResManagerPermission" main-action="DELETE"/>