From 288cc2404207f8be71a0744b76aef994fbb17918 Mon Sep 17 00:00:00 2001 From: Johannes Hoermann <j.hoermann@adito.de> Date: Wed, 6 Feb 2019 07:08:03 +0100 Subject: [PATCH] Revert "wip" This reverts commit 21e9dbb3cb17bca4fbbc3cfd6e00ae78da7729c5. --- entity/Context_entity/Context_entity.aod | 40 ------------- .../recordcontainers/jdito/contentProcess.js | 11 ---- entity/Context_entity/titleProcess.js | 4 -- .../ObjectRelation_entity.aod | 29 ++------- .../object1_rowid/stateProcess.js | 14 ----- .../object1_rowid/valueProcess.js | 16 ----- .../object1_type/displayValueProcess.js | 18 ------ .../entityfields/object1_type/stateProcess.js | 13 ---- .../entityfields/object1_type/valueProcess.js | 18 ------ .../object2_rowid/stateProcess.js | 12 ---- .../object2_rowid/valueProcess.js | 12 ---- .../entityfields/object2_type/stateProcess.js | 10 ---- .../entityfields/object2_type/valueProcess.js | 12 ---- .../object1_rowid.displayvalue/expression.js | 1 - .../object2_rowid.displayvalue/expression.js | 1 - entity/Pers_entity/Pers_entity.aod | 1 + .../children/anyobjecttype_param/code.js | 2 +- .../Context_context/Context_context.aod | 13 ---- .../ObjectRelation_context.aod | 5 -- .../ContextLookup_view/ContextLookup_view.aod | 26 -------- .../ObjectRelationEdit_view.aod | 35 ----------- process/Context_lib/process.js | 60 +++---------------- process/Entity_lib/process.js | 1 + .../ObjectRelation_lib/ObjectRelation_lib.aod | 9 --- process/ObjectRelation_lib/process.js | 15 ----- 25 files changed, 16 insertions(+), 362 deletions(-) delete mode 100644 entity/Context_entity/Context_entity.aod delete mode 100644 entity/Context_entity/recordcontainers/jdito/contentProcess.js delete mode 100644 entity/Context_entity/titleProcess.js delete mode 100644 entity/ObjectRelation_entity/entityfields/object1_rowid/stateProcess.js delete mode 100644 entity/ObjectRelation_entity/entityfields/object1_rowid/valueProcess.js delete mode 100644 entity/ObjectRelation_entity/entityfields/object1_type/displayValueProcess.js delete mode 100644 entity/ObjectRelation_entity/entityfields/object1_type/stateProcess.js delete mode 100644 entity/ObjectRelation_entity/entityfields/object1_type/valueProcess.js delete mode 100644 entity/ObjectRelation_entity/entityfields/object2_rowid/stateProcess.js delete mode 100644 entity/ObjectRelation_entity/entityfields/object2_rowid/valueProcess.js delete mode 100644 entity/ObjectRelation_entity/entityfields/object2_type/stateProcess.js delete mode 100644 entity/ObjectRelation_entity/entityfields/object2_type/valueProcess.js delete mode 100644 neonContext/Context_context/Context_context.aod delete mode 100644 neonView/ContextLookup_view/ContextLookup_view.aod delete mode 100644 neonView/ObjectRelationEdit_view/ObjectRelationEdit_view.aod delete mode 100644 process/ObjectRelation_lib/ObjectRelation_lib.aod delete mode 100644 process/ObjectRelation_lib/process.js diff --git a/entity/Context_entity/Context_entity.aod b/entity/Context_entity/Context_entity.aod deleted file mode 100644 index 78700e6033..0000000000 --- a/entity/Context_entity/Context_entity.aod +++ /dev/null @@ -1,40 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<entity xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.1.1"> - <name>Context_entity</name> - <majorModelMode>DISTRIBUTED</majorModelMode> - <titleProcess>%aditoprj%/entity/Context_entity/titleProcess.js</titleProcess> - <recordContainer>jdito</recordContainer> - <entityFields> - <entityIncomingField> - <name>#INCOMING</name> - <recordContainer>jdito</recordContainer> - <dependencies> - <entityDependency> - <name>40037d07-01a3-474a-aaf6-875aaf250bbf</name> - <entityName>ObjectRelation_entity</entityName> - <fieldName>Context_dfo</fieldName> - <isOutgoing v="false" /> - </entityDependency> - </dependencies> - </entityIncomingField> - <entityField> - <name>UID</name> - <title>Context id</title> - </entityField> - <entityField> - <name>CONTEXT_NAME</name> - <title>Context name</title> - </entityField> - </entityFields> - <recordContainers> - <jDitoRecordContainer> - <name>jdito</name> - <jDitoRecordAlias>Data_alias</jDitoRecordAlias> - <contentProcess>%aditoprj%/entity/Context_entity/recordcontainers/jdito/contentProcess.js</contentProcess> - <recordFields> - <element>UID.value</element> - <element>CONTEXT_NAME.value</element> - </recordFields> - </jDitoRecordContainer> - </recordContainers> -</entity> diff --git a/entity/Context_entity/recordcontainers/jdito/contentProcess.js b/entity/Context_entity/recordcontainers/jdito/contentProcess.js deleted file mode 100644 index b680913caa..0000000000 --- a/entity/Context_entity/recordcontainers/jdito/contentProcess.js +++ /dev/null @@ -1,11 +0,0 @@ -import("system.result"); -import("system.project"); -import("system.logging"); -import("Context_lib"); - -var contextNames = project.getDataModelNames(project.DATAMODEL_KIND_CONTEXT); -// var contextModels = project.getDataModels(project.DATAMODEL_KIND_CONTEXT, contextNames); - -result.object(contextNames.map(function(contextName) { - return [contextName, ContextUtils.getContextName(contextName)]; -})); \ No newline at end of file diff --git a/entity/Context_entity/titleProcess.js b/entity/Context_entity/titleProcess.js deleted file mode 100644 index 1733703a2a..0000000000 --- a/entity/Context_entity/titleProcess.js +++ /dev/null @@ -1,4 +0,0 @@ -import("system.vars"); -import("system.result"); - -result.string(vars.get("$field.CONTEXT_NAME")) \ No newline at end of file diff --git a/entity/ObjectRelation_entity/ObjectRelation_entity.aod b/entity/ObjectRelation_entity/ObjectRelation_entity.aod index e5c221ca10..76b6aec868 100644 --- a/entity/ObjectRelation_entity/ObjectRelation_entity.aod +++ b/entity/ObjectRelation_entity/ObjectRelation_entity.aod @@ -12,17 +12,11 @@ <entityField> <name>OBJECT1_TYPE</name> <title>Type 1</title> - <outgoingField>Context_dfo</outgoingField> - <stateProcess>%aditoprj%/entity/ObjectRelation_entity/entityfields/object1_type/stateProcess.js</stateProcess> - <valueProcess>%aditoprj%/entity/ObjectRelation_entity/entityfields/object1_type/valueProcess.js</valueProcess> - <displayValueProcess>%aditoprj%/entity/ObjectRelation_entity/entityfields/object1_type/displayValueProcess.js</displayValueProcess> </entityField> <entityField> <name>OBJECT1_ROWID</name> <title>Object 1</title> <linkedContextProcess>%aditoprj%/entity/ObjectRelation_entity/entityfields/object1_rowid/linkedContextProcess.js</linkedContextProcess> - <stateProcess>%aditoprj%/entity/ObjectRelation_entity/entityfields/object1_rowid/stateProcess.js</stateProcess> - <valueProcess>%aditoprj%/entity/ObjectRelation_entity/entityfields/object1_rowid/valueProcess.js</valueProcess> </entityField> <entityField> <name>AB_OBJECTRELATIONID</name> @@ -53,16 +47,10 @@ <name>OBJECT2_ROWID</name> <title>Object 2</title> <linkedContextProcess>%aditoprj%/entity/ObjectRelation_entity/entityfields/object2_rowid/linkedContextProcess.js</linkedContextProcess> - <stateProcess>%aditoprj%/entity/ObjectRelation_entity/entityfields/object2_rowid/stateProcess.js</stateProcess> - <valueProcess>%aditoprj%/entity/ObjectRelation_entity/entityfields/object2_rowid/valueProcess.js</valueProcess> </entityField> <entityField> <name>OBJECT2_TYPE</name> <title>Type 2</title> - <linkedContext>Context_context</linkedContext> - <outgoingField>Context_dfo</outgoingField> - <stateProcess>%aditoprj%/entity/ObjectRelation_entity/entityfields/object2_type/stateProcess.js</stateProcess> - <valueProcess>%aditoprj%/entity/ObjectRelation_entity/entityfields/object2_type/valueProcess.js</valueProcess> </entityField> <entityParameter> <name>Object1Type_param</name> @@ -243,19 +231,19 @@ <children> <entityParameter> <name>Object1Rowid_param</name> - <expose v="true" /> + <expose v="false" /> </entityParameter> <entityParameter> <name>Object1Type_param</name> - <expose v="true" /> + <expose v="false" /> </entityParameter> <entityParameter> <name>Object2Rowid_param</name> - <expose v="true" /> + <expose v="false" /> </entityParameter> <entityParameter> <name>Object2Type_param</name> - <expose v="true" /> + <expose v="false" /> </entityParameter> <entityParameter> <name>AnyObjectRowid_param</name> @@ -267,15 +255,6 @@ </entityParameter> </children> </entityIncomingField> - <entityOutgoingField> - <name>Context_dfo</name> - <fieldType>DEPENDENCY_OUT</fieldType> - <dependency> - <name>dependency</name> - <entityName>Context_entity</entityName> - <fieldName>#INCOMING</fieldName> - </dependency> - </entityOutgoingField> </entityFields> <recordContainers> <dbRecordContainer> diff --git a/entity/ObjectRelation_entity/entityfields/object1_rowid/stateProcess.js b/entity/ObjectRelation_entity/entityfields/object1_rowid/stateProcess.js deleted file mode 100644 index 5f470da0cc..0000000000 --- a/entity/ObjectRelation_entity/entityfields/object1_rowid/stateProcess.js +++ /dev/null @@ -1,14 +0,0 @@ -import("system.result"); -import("system.neon"); -import("system.vars"); - -var recordstate = vars.get("$sys.recordstate"); -if (recordstate == neon.OPERATINGSTATE_NEW || recordstate == neon.OPERATINGSTATE_EDIT) -{ - - if ((vars.exists("$param.AnyObjectRowid_param") && vars.get("$param.AnyObjectRowid_param")) - || (vars.exists("$param.Object1Rowid_param") && vars.get("$param.Object1Rowid_param"))) - { - result.string(neon.COMPONENTSTATE_READONLY); - } -} \ No newline at end of file diff --git a/entity/ObjectRelation_entity/entityfields/object1_rowid/valueProcess.js b/entity/ObjectRelation_entity/entityfields/object1_rowid/valueProcess.js deleted file mode 100644 index d189f026bb..0000000000 --- a/entity/ObjectRelation_entity/entityfields/object1_rowid/valueProcess.js +++ /dev/null @@ -1,16 +0,0 @@ -import("system.result"); -import("system.neon"); -import("system.vars"); - -var recordstate = vars.get("$sys.recordstate"); -if (recordstate == neon.OPERATINGSTATE_NEW || recordstate == neon.OPERATINGSTATE_EDIT) -{ - if (vars.exists("$param.AnyObjectRowid_param") && vars.get("$param.AnyObjectRowid_param")) - { - result.string(vars.get("$param.AnyObjectRowid_param")); - } - else if (vars.exists("$param.Object1Rowid_param") && vars.get("$param.Object1Rowid_param")) - { - result.string(vars.get("$param.Object1Rowid_param")); - } -} \ No newline at end of file diff --git a/entity/ObjectRelation_entity/entityfields/object1_type/displayValueProcess.js b/entity/ObjectRelation_entity/entityfields/object1_type/displayValueProcess.js deleted file mode 100644 index 8a80d4be7e..0000000000 --- a/entity/ObjectRelation_entity/entityfields/object1_type/displayValueProcess.js +++ /dev/null @@ -1,18 +0,0 @@ -import("system.logging"); -import("system.result"); -import("system.neon"); -import("system.vars"); - -var recordstate = vars.get("$sys.recordstate"); -if (recordstate == neon.OPERATINGSTATE_NEW || recordstate == neon.OPERATINGSTATE_EDIT) -{ - if (vars.exists("$param.AnyObjectType_param") && vars.get("$param.AnyObjectType_param")) - { - logging.log(vars.get("$param.AnyObjectType_param")); - result.string("disp: " + vars.get("$param.AnyObjectType_param")); - } - else if (vars.exists("$param.Object1Type_param") && vars.get("$param.Object1Type_param")) - { - result.string("disp: " + vars.get("$param.Object1Type_param")); - } -} \ No newline at end of file diff --git a/entity/ObjectRelation_entity/entityfields/object1_type/stateProcess.js b/entity/ObjectRelation_entity/entityfields/object1_type/stateProcess.js deleted file mode 100644 index 2160ef62ef..0000000000 --- a/entity/ObjectRelation_entity/entityfields/object1_type/stateProcess.js +++ /dev/null @@ -1,13 +0,0 @@ -import("system.result"); -import("system.neon"); -import("system.vars"); - -var recordstate = vars.get("$sys.recordstate"); -if (recordstate == neon.OPERATINGSTATE_NEW || recordstate == neon.OPERATINGSTATE_EDIT) -{ - if ((vars.exists("$param.AnyObjectType_param") && vars.get("$param.AnyObjectType_param")) - || (vars.exists("$param.Object1Type_param") && vars.get("$param.Object1Type_param"))) - { - result.string(neon.COMPONENTSTATE_READONLY); - } -} \ No newline at end of file diff --git a/entity/ObjectRelation_entity/entityfields/object1_type/valueProcess.js b/entity/ObjectRelation_entity/entityfields/object1_type/valueProcess.js deleted file mode 100644 index 4ad606ce75..0000000000 --- a/entity/ObjectRelation_entity/entityfields/object1_type/valueProcess.js +++ /dev/null @@ -1,18 +0,0 @@ -import("system.logging"); -import("system.result"); -import("system.neon"); -import("system.vars"); - -var recordstate = vars.get("$sys.recordstate"); -if (recordstate == neon.OPERATINGSTATE_NEW || recordstate == neon.OPERATINGSTATE_EDIT) -{ - if (vars.exists("$param.AnyObjectType_param") && vars.get("$param.AnyObjectType_param")) - { - logging.log(vars.get("$param.AnyObjectType_param")); - result.string(vars.get("$param.AnyObjectType_param")); - } - else if (vars.exists("$param.Object1Type_param") && vars.get("$param.Object1Type_param")) - { - result.string(vars.get("$param.Object1Type_param")); - } -} \ No newline at end of file diff --git a/entity/ObjectRelation_entity/entityfields/object2_rowid/stateProcess.js b/entity/ObjectRelation_entity/entityfields/object2_rowid/stateProcess.js deleted file mode 100644 index b78d71076c..0000000000 --- a/entity/ObjectRelation_entity/entityfields/object2_rowid/stateProcess.js +++ /dev/null @@ -1,12 +0,0 @@ -import("system.logging"); -import("system.result"); -import("system.neon"); -import("system.vars"); - -var recordstate = vars.get("$sys.recordstate"); -if (recordstate == neon.OPERATINGSTATE_NEW || recordstate == neon.OPERATINGSTATE_EDIT) -{ - logging.log(vars.exists("$param.Object2Rowid_param") && vars.get("$param.Object2Rowid_param")) - if (vars.exists("$param.Object2Rowid_param") && vars.get("$param.Object2Rowid_param")) - result.string(neon.COMPONENTSTATE_READONLY); -} \ No newline at end of file diff --git a/entity/ObjectRelation_entity/entityfields/object2_rowid/valueProcess.js b/entity/ObjectRelation_entity/entityfields/object2_rowid/valueProcess.js deleted file mode 100644 index 710c40de47..0000000000 --- a/entity/ObjectRelation_entity/entityfields/object2_rowid/valueProcess.js +++ /dev/null @@ -1,12 +0,0 @@ -import("system.result"); -import("system.neon"); -import("system.vars"); - -var recordstate = vars.get("$sys.recordstate"); -if (recordstate == neon.OPERATINGSTATE_NEW || recordstate == neon.OPERATINGSTATE_EDIT) -{ - if (vars.exists("$param.Object2Rowid_param") && vars.get("$param.Object2Rowid_param")) - { - result.string(vars.get("$param.Object2Rowid_param")); - } -} \ No newline at end of file diff --git a/entity/ObjectRelation_entity/entityfields/object2_type/stateProcess.js b/entity/ObjectRelation_entity/entityfields/object2_type/stateProcess.js deleted file mode 100644 index 7d99ab991e..0000000000 --- a/entity/ObjectRelation_entity/entityfields/object2_type/stateProcess.js +++ /dev/null @@ -1,10 +0,0 @@ -import("system.result"); -import("system.neon"); -import("system.vars"); - -var recordstate = vars.get("$sys.recordstate"); -if (recordstate == neon.OPERATINGSTATE_NEW || recordstate == neon.OPERATINGSTATE_EDIT) -{ - if (vars.exists("$param.Object2Type_param") && vars.get("$param.Object2Type_param")) - result.string(neon.COMPONENTSTATE_READONLY); -} \ No newline at end of file diff --git a/entity/ObjectRelation_entity/entityfields/object2_type/valueProcess.js b/entity/ObjectRelation_entity/entityfields/object2_type/valueProcess.js deleted file mode 100644 index 57711c82d2..0000000000 --- a/entity/ObjectRelation_entity/entityfields/object2_type/valueProcess.js +++ /dev/null @@ -1,12 +0,0 @@ -import("system.result"); -import("system.neon"); -import("system.vars"); - -var recordstate = vars.get("$sys.recordstate"); -if (recordstate == neon.OPERATINGSTATE_NEW || recordstate == neon.OPERATINGSTATE_EDIT) -{ - if (vars.exists("$param.Object2Type_param") && vars.get("$param.Object2Type_param")) - { - result.string(vars.get("$param.Object2Type_param")); - } -} \ No newline at end of file diff --git a/entity/ObjectRelation_entity/recordcontainers/db/recordfieldmappings/object1_rowid.displayvalue/expression.js b/entity/ObjectRelation_entity/recordcontainers/db/recordfieldmappings/object1_rowid.displayvalue/expression.js index 7534f59b79..3333669e4c 100644 --- a/entity/ObjectRelation_entity/recordcontainers/db/recordfieldmappings/object1_rowid.displayvalue/expression.js +++ b/entity/ObjectRelation_entity/recordcontainers/db/recordfieldmappings/object1_rowid.displayvalue/expression.js @@ -1,5 +1,4 @@ import("system.result"); import("Context_lib"); -// TODO: no subselect? result.string(ContextUtils.getNameSubselectSql("OBJECT1_TYPE", "OBJECT1_ROWID")) \ No newline at end of file diff --git a/entity/ObjectRelation_entity/recordcontainers/db/recordfieldmappings/object2_rowid.displayvalue/expression.js b/entity/ObjectRelation_entity/recordcontainers/db/recordfieldmappings/object2_rowid.displayvalue/expression.js index 261298d705..bb0a508425 100644 --- a/entity/ObjectRelation_entity/recordcontainers/db/recordfieldmappings/object2_rowid.displayvalue/expression.js +++ b/entity/ObjectRelation_entity/recordcontainers/db/recordfieldmappings/object2_rowid.displayvalue/expression.js @@ -1,5 +1,4 @@ import("system.result"); import("Context_lib"); -// TODO: no subselect? result.string(ContextUtils.getNameSubselectSql("OBJECT2_TYPE", "OBJECT2_ROWID")) \ No newline at end of file diff --git a/entity/Pers_entity/Pers_entity.aod b/entity/Pers_entity/Pers_entity.aod index 3ea38fd37c..834f62928b 100644 --- a/entity/Pers_entity/Pers_entity.aod +++ b/entity/Pers_entity/Pers_entity.aod @@ -513,6 +513,7 @@ <children> <entityParameter> <name>AnyObjectRowid_param</name> + <title></title> <code>%aditoprj%/entity/Pers_entity/entityfields/objectrelation_dfo/children/anyobjectrowid_param/code.js</code> </entityParameter> <entityParameter> diff --git a/entity/Pers_entity/entityfields/objectrelation_dfo/children/anyobjecttype_param/code.js b/entity/Pers_entity/entityfields/objectrelation_dfo/children/anyobjecttype_param/code.js index 008915f61d..efc405cb8b 100644 --- a/entity/Pers_entity/entityfields/objectrelation_dfo/children/anyobjecttype_param/code.js +++ b/entity/Pers_entity/entityfields/objectrelation_dfo/children/anyobjecttype_param/code.js @@ -1,4 +1,4 @@ import("system.result"); import("Context_lib"); -result.string(ContextUtils.getCurrentContextId()); \ No newline at end of file +result.string(ContextUtils.getCurrentContextId()) \ No newline at end of file diff --git a/neonContext/Context_context/Context_context.aod b/neonContext/Context_context/Context_context.aod deleted file mode 100644 index 9d48a70d99..0000000000 --- a/neonContext/Context_context/Context_context.aod +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<neonContext xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.0.0" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonContext/1.0.0"> - <name>Context_context</name> - <majorModelMode>DISTRIBUTED</majorModelMode> - <lookupview>ContextLookup_view</lookupview> - <entity>Context_entity</entity> - <references> - <neonViewReference> - <name>3eedbcba-63f3-4825-852a-ab8269343e9a</name> - <view>ContextLookup_view</view> - </neonViewReference> - </references> -</neonContext> diff --git a/neonContext/ObjectRelation_context/ObjectRelation_context.aod b/neonContext/ObjectRelation_context/ObjectRelation_context.aod index c077fd895d..4e07153b0d 100644 --- a/neonContext/ObjectRelation_context/ObjectRelation_context.aod +++ b/neonContext/ObjectRelation_context/ObjectRelation_context.aod @@ -3,7 +3,6 @@ <name>ObjectRelation_context</name> <majorModelMode>DISTRIBUTED</majorModelMode> <filterview>ObjectRelationFilter_view</filterview> - <editview>ObjectRelationEdit_view</editview> <preview>ObjectRelationPreview_view</preview> <entity>ObjectRelation_entity</entity> <references> @@ -15,9 +14,5 @@ <name>dc0bd793-a472-4a7b-8394-06c4bc31258a</name> <view>ObjectRelationPreview_view</view> </neonViewReference> - <neonViewReference> - <name>3b480346-0cf4-44ee-9422-1693b386aa86</name> - <view>ObjectRelationEdit_view</view> - </neonViewReference> </references> </neonContext> diff --git a/neonView/ContextLookup_view/ContextLookup_view.aod b/neonView/ContextLookup_view/ContextLookup_view.aod deleted file mode 100644 index caa1d92103..0000000000 --- a/neonView/ContextLookup_view/ContextLookup_view.aod +++ /dev/null @@ -1,26 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.0.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.0.1"> - <name>ContextLookup_view</name> - <majorModelMode>DISTRIBUTED</majorModelMode> - <layout> - <boxLayout> - <name>layout</name> - </boxLayout> - </layout> - <children> - <tableViewTemplate> - <name>contexts</name> - <entityField>#ENTITY</entityField> - <columns> - <neonTableColumn> - <name>a748ea55-7c16-4b09-81f3-0bf88674e18a</name> - <entityField>UID</entityField> - </neonTableColumn> - <neonTableColumn> - <name>e3178147-3010-48e2-b23c-022e1badc3f7</name> - <entityField>CONTEXT_NAME</entityField> - </neonTableColumn> - </columns> - </tableViewTemplate> - </children> -</neonView> diff --git a/neonView/ObjectRelationEdit_view/ObjectRelationEdit_view.aod b/neonView/ObjectRelationEdit_view/ObjectRelationEdit_view.aod deleted file mode 100644 index a3d6d91572..0000000000 --- a/neonView/ObjectRelationEdit_view/ObjectRelationEdit_view.aod +++ /dev/null @@ -1,35 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.0.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.0.1"> - <name>ObjectRelationEdit_view</name> - <majorModelMode>DISTRIBUTED</majorModelMode> - <layout> - <boxLayout> - <name>layout</name> - </boxLayout> - </layout> - <children> - <genericViewTemplate> - <name>ObjectRelationData</name> - <editMode v="true" /> - <entityField>#ENTITY</entityField> - <fields> - <entityFieldLink> - <name>ba83e512-e1d3-4c21-a4d3-067df3816e74</name> - <entityField>OBJECT1_TYPE</entityField> - </entityFieldLink> - <entityFieldLink> - <name>86f45e13-f96b-4d84-908b-444e238bb9ea</name> - <entityField>OBJECT1_ROWID</entityField> - </entityFieldLink> - <entityFieldLink> - <name>3415855d-b97e-46df-9bee-6b33101b950a</name> - <entityField>OBJECT2_TYPE</entityField> - </entityFieldLink> - <entityFieldLink> - <name>e9bb5d31-712f-4643-b183-61584400707c</name> - <entityField>OBJECT2_ROWID</entityField> - </entityFieldLink> - </fields> - </genericViewTemplate> - </children> -</neonView> diff --git a/process/Context_lib/process.js b/process/Context_lib/process.js index ba515aa745..34ae91ccc4 100644 --- a/process/Context_lib/process.js +++ b/process/Context_lib/process.js @@ -1,5 +1,3 @@ -import("system.logging"); -import("system.project"); import("system.SQLTYPES"); import("system.vars"); import("Sql_lib"); @@ -21,8 +19,6 @@ function ContextUtils() {} ContextUtils.getCurrentContextId = function() { var entityName = vars.getString("$sys.currententityname"); - //logging.log(vars.getString("$sys.currentcontextname")) - //return vars.getString("$sys.currentcontextname"); // TODO: replace with Core-method instead of switch-case!!! switch (entityName) { @@ -35,7 +31,7 @@ ContextUtils.getCurrentContextId = function() } /** - * TODO: use System function. Currently the Name is also the id. + * TODO: use System function * Returns the Name of a context by the Id * * @param {String} pContextId the id of a context @@ -47,61 +43,23 @@ ContextUtils.getContextName = function(pContextId) return pContextId; } -/** - * Get all contexts of the project. - * - * @return {String[][]} [ ["contextid", "contextName" ], [..., ...], ...] - */ -ContextUtils.getContexts = function() -{ - // TODO: The name is currently also the id. This may change. - return project.getDataModelNames(project.DATAMODEL_KIND_CONTEXT).map(function(contextName) { - return [contextName, ContextUtils.getContextName(contextName)]; - }); -} - -/** - * TODO: !!!temporary function until you can get fields from another Entity!!! - */ -ContextUtils._getNameSelectMap = function() -{ - var maskingUtils = new SqlMaskingUtils(); - return { - "Org_context": ["select \"NAME\" from ORG", "ORG.ORGID"], - "Pers_context": ["select " + maskingUtils.concat(["FIRSTNAME", "LASTNAME"]) + " from PERS", "PERS.PERSID"], - "Activity_context": ["select SUBJECT from ACTIVITY", "ACTIVITY.ACTIVITYID"], - "Salesproject_context": ["select " + maskingUtils.concat([maskingUtils.cast("PROJECTCODE", SQLTYPES.VARCHAR, 10), "':'", "PROJECTTITLE"]) + " from SALESPROJECT", "SALESPROJECT.SALESPROJECTID"], - // TODO: keywords sind noch nicht in der DB somit gibt es nichts ähnliches zu getKeySQL. - // select " + maskingUtils.concat([SqlMaskingUtils.cast("CONTRACTCODE", "varchar", 10), getKeySQL("CONTRACTTYPE", "CONTRACTTYPE" )]) + " from CONTRACT - "Contract_context": ["select " + maskingUtils.cast("CONTRACTCODE", SQLTYPES.VARCHAR, 10) + " from CONTRACT", "CONTRACT.CONTRACTID"] - } -} - /** * TODO: !!!temporary function until you can get fields from another Entity!!! */ ContextUtils.getNameSubselectSql = function(pContextIdDbField, pRowIdDbField) { var select = "(case " + pContextIdDbField + " "; + var maskingUtils = new SqlMaskingUtils(); - - var selectMap = ContextUtils._getNameSelectMap() - for (let contextId in selectMap) - { - select += "when '" + contextId + "' then (" + selectMap[contextId][0] + " where " + selectMap[contextId][1] + " = " + pRowIdDbField + ") "; - } - + select += "when 'Org_context' then (select \"NAME\" from ORG where ORG.ORGID = " + pRowIdDbField + ") "; + select += "when 'Pers_context' then (select " + maskingUtils.concat(["FIRSTNAME", "LASTNAME"]) + " from PERS where PERS.PERSID = " + pRowIdDbField + ") "; + select += "when 'Activity_context' then (select SUBJECT from ACTIVITY where ACTIVITY.ACTIVITYID = " + pRowIdDbField + ") "; + select += "when 'Salesproject_context' then (select " + maskingUtils.concat([maskingUtils.cast("PROJECTCODE", SQLTYPES.VARCHAR, 10), "':'", "PROJECTTITLE"]) + " from SALESPROJECT where SALESPROJECT.SALESPROJECTID = " + pRowIdDbField + ") "; + // TODO: keywords sind noch nicht in der DB somit gibt es nichts ähnliches zu getKeySQL. + //select += "when 'Contract_context' then (select " + maskingUtils.concat([SqlMaskingUtils.cast("CONTRACTCODE", "varchar", 10), getKeySQL("CONTRACTTYPE", "CONTRACTTYPE" )]) + " from CONTRACT where CONTRACT.CONTRACTID = " + pRowIdDbField + ") "; + select += "when 'Contract_context' then (select " + maskingUtils.cast("CONTRACTCODE", SQLTYPES.VARCHAR, 10) + " from CONTRACT where CONTRACT.CONTRACTID = " + pRowIdDbField + ") "; select += "else 'Not defined in ContextUtils.getNameSql()!'"; select += "end)"; return select; -} - -/** - * TODO: !!!temporary function until you can get fields from another Entity!!! - */ -ContextUtils.getNameSql = function(pContextId, pRowId) -{ - var selectMap = ContextUtils._getNameSelectMap() - return SqlCondition.begin().andPrepare(selectMap[pContextId][1], pRowId).buildSql(selectMap[pContextId][0], "1=2"); } \ No newline at end of file diff --git a/process/Entity_lib/process.js b/process/Entity_lib/process.js index ef7c409388..50293fbada 100644 --- a/process/Entity_lib/process.js +++ b/process/Entity_lib/process.js @@ -44,6 +44,7 @@ ProcessHandlingUtils.initialParamToResult = function(pParamVarName) result.object(paramValue); } } + } /** diff --git a/process/ObjectRelation_lib/ObjectRelation_lib.aod b/process/ObjectRelation_lib/ObjectRelation_lib.aod deleted file mode 100644 index 77cc2f184e..0000000000 --- a/process/ObjectRelation_lib/ObjectRelation_lib.aod +++ /dev/null @@ -1,9 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<process xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.7" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/process/1.1.7"> - <name>ObjectRelation_lib</name> - <majorModelMode>DISTRIBUTED</majorModelMode> - <process>%aditoprj%/process/ObjectRelation_lib/process.js</process> - <variants> - <element>LIBRARY</element> - </variants> -</process> diff --git a/process/ObjectRelation_lib/process.js b/process/ObjectRelation_lib/process.js deleted file mode 100644 index 25512e27c7..0000000000 --- a/process/ObjectRelation_lib/process.js +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Methods to manage ObjectRelations. - * Do not create an instance of this! - * - * @class - */ -function ObjectRelationUtils() {} - -/** - * - */ -ObjectRelationUtils.get = function() -{ - -} \ No newline at end of file -- GitLab