diff --git a/entity/Context_entity/Context_entity.aod b/entity/Context_entity/Context_entity.aod deleted file mode 100644 index 78700e60337b83a887d324c25ba37d6f60c44481..0000000000000000000000000000000000000000 --- 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 b680913caaa74df6a14e86de3118184658004cad..0000000000000000000000000000000000000000 --- 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 1733703a2a64a8e0b6f083fc6b2f1b82db066ef1..0000000000000000000000000000000000000000 --- 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 e5c221ca10fb040e997a36cf183dcb15386ff310..76b6aec8681850505253c6081a36e0f7edb98d82 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 5f470da0cc219d8c305b419a6a832c5e7a5a3b54..0000000000000000000000000000000000000000 --- 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 d189f026bbda9b46e16b64e32c730b00dfc06b52..0000000000000000000000000000000000000000 --- 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 8a80d4be7ef95e71302ff88d345a95b97ad10d51..0000000000000000000000000000000000000000 --- 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 2160ef62efa8f525f4f17659425c717a7e595011..0000000000000000000000000000000000000000 --- 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 4ad606ce7581373dac0916bbc52582cead88ad7e..0000000000000000000000000000000000000000 --- 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 b78d71076c7c186dd23123bcc8c543266a087d51..0000000000000000000000000000000000000000 --- 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 710c40de475bab34407ce49a29c2015c997e9545..0000000000000000000000000000000000000000 --- 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 7d99ab991e0db32c5e2666c93aebe5ba80473a3f..0000000000000000000000000000000000000000 --- 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 57711c82d252d92f76eb8583b9fa722f79711799..0000000000000000000000000000000000000000 --- 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 7534f59b7990b19ae9b63907e2d23caac2ad023d..3333669e4c6812e6963eed21f0b1cd0610069fd2 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 261298d70507407f2412c76f8bda51043d2ad848..bb0a5084254ca569df6d530ea7dace1656d49924 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 3ea38fd37c8efd4ea3d4f44583df66d47561eee9..834f62928bfa86db1c8685d6b31a70b41691273d 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 008915f61deac19ccdd40fff81701de63eb3b6a2..efc405cb8b7289310ca284800a6ff50eea9bbe12 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 9d48a70d99b332fdb2b0bbb6bcc47fbec1eb0836..0000000000000000000000000000000000000000 --- 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 c077fd895d666b7edbdee8926d1c967c444e5467..4e07153b0da1edb8c26414e3b1f13bf990d7f88e 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 caa1d92103cd697ec6a3136f88c59fa5449520de..0000000000000000000000000000000000000000 --- 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 a3d6d9157298f5a0ac13be96d465b3e2a1db56a2..0000000000000000000000000000000000000000 --- 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 ba515aa7454ecec4c49328cd8034341febf19e56..34ae91ccc4bcb403fe4f58f47dde87cc4f28aa5a 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 ef7c409388961a7f2dc4e67099f8b3680301a00c..50293fbada3f46619345b0d1d5eacbd9a560ad43 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 77cc2f184e4c94f8e0a4bde129557dcb4873bb49..0000000000000000000000000000000000000000 --- 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 25512e27c7b872b270b2249713fcf43f2cb9fbea..0000000000000000000000000000000000000000 --- 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