| <?xml version="1.0" encoding="UTF-8" ?> |
| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one |
| or more contributor license agreements. See the NOTICE file |
| distributed with this work for additional information |
| regarding copyright ownership. The ASF licenses this file |
| to you under the Apache License, Version 2.0 (the |
| "License"); you may not use this file except in compliance |
| with the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, |
| software distributed under the License is distributed on an |
| "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| KIND, either express or implied. See the License for the |
| specific language governing permissions and limitations |
| under the License. |
| --> |
| |
| <simple-methods xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/simple-methods-v2.xsd"> |
| |
| <simple-method method-name="migrateStatusToGlReconciliation" short-description="Migrate statusId to GlReconciliation entity"> |
| <entity-condition entity-name="GlReconciliation" list="glReconciliationList"> |
| <use-iterator/> |
| </entity-condition> |
| <iterate list="glReconciliationList" entry="glReconciliation"> |
| <if-empty field="glReconciliation.statusId"> |
| <if-empty field="glReconciliation.reconciledBalance"> |
| <set field="glReconciliation.statusId" value="GLREC_CREATED"/> |
| <else> |
| <set field="glReconciliation.statusId" value="GLREC_RECONCILED"/> |
| </else> |
| </if-empty> |
| <store-value value-field="glReconciliation"/> |
| </if-empty> |
| </iterate> |
| </simple-method> |
| |
| <simple-method method-name="migrateStatusToFinAccountTrans" short-description="Migrate statusId to FinAccountTrans entity"> |
| <entity-condition entity-name="FinAccountTrans" list="finAccountTransList"> |
| <use-iterator/> |
| </entity-condition> |
| <iterate list="finAccountTransList" entry="finAccountTrans"> |
| <if-empty field="finAccountTrans.statusId"> |
| <set field="finAccountTrans.statusId" value="FINACT_TRNS_APPROVED"/> |
| <store-value value-field="finAccountTrans"/> |
| </if-empty> |
| </iterate> |
| </simple-method> |
| |
| <simple-method method-name="migrateFixedAssetMaintMeter" short-description="Copy FixedAssetMaintMeter To FixedAssetMeter"> |
| <entity-condition list="maintMeterList" entity-name="FixedAssetMaintMeter"/> |
| <iterate list="maintMeterList" entry="maintMeter"> |
| <make-value value-field="newEntity" entity-name="FixedAssetMeter"/> |
| <set-pk-fields map="maintMeter" value-field="newEntity"/> |
| <set-nonpk-fields map="maintMeter" value-field="newEntity"/> |
| <set field="newEntity.readingDate" from-field="maintMeter.createdStamp"/> |
| <entity-one entity-name="FixedAssetMeter" value-field="lookedUpValue" auto-field-map="false"> |
| <field-map field-name="fixedAssetId" from-field="newEntity.fixedAssetId"/> |
| <field-map field-name="productMeterTypeId" from-field="newEntity.productMeterTypeId"/> |
| <field-map field-name="readingDate" from-field="newEntity.readingDate"/> |
| </entity-one> |
| <if-empty field="lookedUpValue"> |
| <create-value value-field="newEntity"/> |
| <check-errors/> |
| </if-empty> |
| </iterate> |
| </simple-method> |
| |
| <simple-method method-name="migrateAgreementWorkEffortAppl" short-description="Copy AgreementWorkEffortAppl To AgreementWorkEffortApplic"> |
| <entity-condition list="agreementWorkEffortApplList" entity-name="OldAgreementWorkEffortAppl"/> |
| <iterate list="agreementWorkEffortApplList" entry="agreementWorkEffortAppl"> |
| <make-value value-field="newEntity" entity-name="AgreementWorkEffortApplic"/> |
| <set-pk-fields map="agreementWorkEffortAppl" value-field="newEntity"/> |
| <create-value value-field="newEntity"/> |
| <check-errors/> |
| </iterate> |
| </simple-method> |
| </simple-methods> |