diff --git a/aliasDefinition/Data_alias/Data_alias.aod b/aliasDefinition/Data_alias/Data_alias.aod index a82c125e7812bc597e87dc559e21f11a23f1d625..00af815b7339563dc8dce43c158618560674b191 100644 --- a/aliasDefinition/Data_alias/Data_alias.aod +++ b/aliasDefinition/Data_alias/Data_alias.aod @@ -4367,6 +4367,170 @@ </entityFieldDb> </entityFields> </entityDb> + <entityDb> + <name>AB_KEYWORD_ATTRIBUTE</name> + <dbName></dbName> + <idColumn>AB_KEYWORD_ATTRIBUTEID</idColumn> + <idGeneratorType v="0" /> + <idGeneratorInterval v="1" /> + <title></title> + <description></description> + <auditSyncConfig> + <name>auditSyncConfig</name> + <auditMode v="0" /> + <syncActive v="false" /> + <syncComplete v="true" /> + <syncDirection v="1" /> + <syncIds></syncIds> + </auditSyncConfig> + <entityFields> + <entityFieldDb> + <name>AB_KEYWORD_ATTRIBUTEID</name> + <dbName></dbName> + <primaryKey v="true" /> + <columnType v="1" /> + <size v="36" /> + <scale v="0" /> + <notNull v="true" /> + <isUnique v="true" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>CONTAINER</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="12" /> + <size v="80" /> + <scale v="0" /> + <notNull v="true" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>TYPE</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="12" /> + <size v="100" /> + <scale v="0" /> + <notNull v="true" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>NAME</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="1" /> + <size v="36" /> + <scale v="0" /> + <notNull v="true" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + </entityFields> + </entityDb> + <entityDb> + <name>AB_KEYWORD_ATTRIBUTERELATION</name> + <dbName></dbName> + <idColumn>AB_KEYWORD_ATTRIBUTERELATIONID</idColumn> + <idGeneratorType v="0" /> + <idGeneratorInterval v="1" /> + <title></title> + <description></description> + <auditSyncConfig> + <name>auditSyncConfig</name> + <auditMode v="0" /> + <syncActive v="false" /> + <syncComplete v="true" /> + <syncDirection v="1" /> + <syncIds></syncIds> + </auditSyncConfig> + <entityFields> + <entityFieldDb> + <name>CHAR_VALUE</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="12" /> + <size v="63" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>BOOL_VALUE</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="5" /> + <size v="5" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>AB_KEYWORD_ATTRIBUTERELATIONID</name> + <dbName></dbName> + <primaryKey v="true" /> + <columnType v="1" /> + <size v="36" /> + <scale v="0" /> + <notNull v="true" /> + <isUnique v="true" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>NUMBER_VALUE</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="2" /> + <size v="14" /> + <scale v="2" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>AB_KEYWORD_ENTRY_ID</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="1" /> + <size v="36" /> + <scale v="0" /> + <notNull v="true" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + </entityFields> + </entityDb> </entities> </entityGroup> </aliasDefDb> diff --git a/entity/Activity_entity/Activity_entity.aod b/entity/Activity_entity/Activity_entity.aod index f22dc2b0ba9577b37bb87a743bc3a40a8449e573..02808074ac1f3cc90adb99ae3871ff836430943c 100644 --- a/entity/Activity_entity/Activity_entity.aod +++ b/entity/Activity_entity/Activity_entity.aod @@ -198,7 +198,7 @@ <fieldType>DEPENDENCY_OUT</fieldType> <dependency> <name>dependency</name> - <entityName>Keyword_entity</entityName> + <entityName>KeywordEntry_entity</entityName> <fieldName>SpecificContainerKeywords</fieldName> </dependency> <children> diff --git a/entity/Activity_entity/entityfields/maindocuments/children/assignmentname_param/code.js b/entity/Activity_entity/entityfields/maindocuments/children/assignmentname_param/code.js new file mode 100644 index 0000000000000000000000000000000000000000..3e4bf7585b2ca4628118e46818683fc51bfcf1c5 --- /dev/null +++ b/entity/Activity_entity/entityfields/maindocuments/children/assignmentname_param/code.js @@ -0,0 +1,3 @@ +import("system.result"); + +result.string("DOCUMENT"); \ No newline at end of file diff --git a/entity/Activity_entity/entityfields/maindocuments/children/assignmentrowid_param/code.js b/entity/Activity_entity/entityfields/maindocuments/children/assignmentrowid_param/code.js new file mode 100644 index 0000000000000000000000000000000000000000..06fe7d36324315ad85bfd6d0099c5aa6b2da98d4 --- /dev/null +++ b/entity/Activity_entity/entityfields/maindocuments/children/assignmentrowid_param/code.js @@ -0,0 +1,4 @@ +import("system.result"); +import("system.vars"); + +result.string(vars.get("$field.ACTIVITYID")); \ No newline at end of file diff --git a/entity/Activity_entity/entityfields/maindocuments/children/assignmenttable_param/code.js b/entity/Activity_entity/entityfields/maindocuments/children/assignmenttable_param/code.js new file mode 100644 index 0000000000000000000000000000000000000000..f39bb16bbc16cc7a0d9f39a6bc549c63a0f16d02 --- /dev/null +++ b/entity/Activity_entity/entityfields/maindocuments/children/assignmenttable_param/code.js @@ -0,0 +1,3 @@ +import("system.result"); + +result.string("ACTIVITY"); \ No newline at end of file diff --git a/entity/Contract_entity/Contract_entity.aod b/entity/Contract_entity/Contract_entity.aod index 4a8d32b152669d6efe62f86b8537ee7e500b304e..c56de3ea1037c9b87888819798877d8c543db49e 100644 --- a/entity/Contract_entity/Contract_entity.aod +++ b/entity/Contract_entity/Contract_entity.aod @@ -13,6 +13,8 @@ <documentation>%aditoprj%/entity/Contract_entity/entityfields/contractcode/documentation.adoc</documentation> <title>Contract number</title> <mandatory v="true" /> + <state>READONLY</state> + <valueProcess>%aditoprj%/entity/Contract_entity/entityfields/contractcode/valueProcess.js</valueProcess> <onValidation>%aditoprj%/entity/Contract_entity/entityfields/contractcode/onValidation.js</onValidation> </entityField> <entityField> @@ -207,7 +209,7 @@ <fieldType>DEPENDENCY_OUT</fieldType> <dependency> <name>dependency</name> - <entityName>Keyword_entity</entityName> + <entityName>KeywordEntry_entity</entityName> <fieldName>SpecificContainerKeywords</fieldName> </dependency> <children> @@ -222,7 +224,7 @@ <fieldType>DEPENDENCY_OUT</fieldType> <dependency> <name>dependency</name> - <entityName>Keyword_entity</entityName> + <entityName>KeywordEntry_entity</entityName> <fieldName>SpecificContainerKeywords</fieldName> </dependency> <children> @@ -237,7 +239,7 @@ <fieldType>DEPENDENCY_OUT</fieldType> <dependency> <name>dependency</name> - <entityName>Keyword_entity</entityName> + <entityName>KeywordEntry_entity</entityName> <fieldName>SpecificContainerKeywords</fieldName> </dependency> <children> diff --git a/entity/Contract_entity/entityfields/contractcode/documentation.adoc b/entity/Contract_entity/entityfields/contractcode/documentation.adoc index fd63d0f0f336b7fa30a7710db6df032e8f91227f..ec170d7ddfe1f7c61e7bdfcef601ab46b25338fd 100644 --- a/entity/Contract_entity/entityfields/contractcode/documentation.adoc +++ b/entity/Contract_entity/entityfields/contractcode/documentation.adoc @@ -1,4 +1,5 @@ = CONTRACTCODE :hardbreaks: -Unique identification number of the contract. (max. 30 characters, not automatically generated) \ No newline at end of file +Unique identification number of the contract. +It's automatically generated from the starting number _1000_. \ No newline at end of file diff --git a/entity/Contract_entity/entityfields/contractcode/onValidation.js b/entity/Contract_entity/entityfields/contractcode/onValidation.js index 8d2de85d894a32c92d53fd9e16cffb2b1fd153fb..c9c46837558c4f545d61a8861b63a8a3d32dd0df 100644 --- a/entity/Contract_entity/entityfields/contractcode/onValidation.js +++ b/entity/Contract_entity/entityfields/contractcode/onValidation.js @@ -1,16 +1,11 @@ -import("system.translate"); -import("system.result"); import("system.vars"); -import("system.db"); -import("Util_lib"); +import("system.result"); +import("system.neon"); +import("Contract_lib"); import("Entity_lib"); -var contractCode, codeCount; - -contractCode = ProcessHandlingUtils.getOnValidationValue(vars.get("$field.CONTRACTCODE")); -codeCount = db.cell("select count(CONTRACTCODE) from CONTRACT where CONTRACTCODE = '" + contractCode + "'" - + " and CONTRACTID <> '" + vars.get("$field.CONTRACTID") + "'"); -if(codeCount > 0) +if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW + && !ContractUtils.validateContractNumber(ProcessHandlingUtils.getOnValidationValue(vars.get("$field.CONTRACTCODE")))) { - result.string(translate.text("The contract number already exists!")); + vars.set("$field.CONTRACTCODE", ContractUtils.getNextContractNumber().toString()); } \ No newline at end of file diff --git a/entity/Contract_entity/entityfields/contractcode/valueProcess.js b/entity/Contract_entity/entityfields/contractcode/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..be926defac630885c9949d6e770f76c7bc226a55 --- /dev/null +++ b/entity/Contract_entity/entityfields/contractcode/valueProcess.js @@ -0,0 +1,9 @@ +import("system.vars"); +import("system.result"); +import("system.neon"); +import("Contract_lib"); + +if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW) +{ + result.string(ContractUtils.getNextContractNumber()); +} \ No newline at end of file diff --git a/entity/Keyword_entity/Keyword_entity.aod b/entity/KeywordEntry_entity/KeywordEntry_entity.aod similarity index 82% rename from entity/Keyword_entity/Keyword_entity.aod rename to entity/KeywordEntry_entity/KeywordEntry_entity.aod index 9e906046725a5b39a2a2632016d04a4d348e4cbe..3a56ca85eee2549a8d19fcbc686a15680453ddc6 100644 --- a/entity/Keyword_entity/Keyword_entity.aod +++ b/entity/KeywordEntry_entity/KeywordEntry_entity.aod @@ -1,13 +1,13 @@ <?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.2.0" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.2.0"> - <name>Keyword_entity</name> + <name>KeywordEntry_entity</name> <title>Keyword</title> <majorModelMode>DISTRIBUTED</majorModelMode> - <documentation>%aditoprj%/entity/Keyword_entity/documentation.adoc</documentation> - <onValidation>%aditoprj%/entity/Keyword_entity/onValidation.js</onValidation> + <documentation>%aditoprj%/entity/KeywordEntry_entity/documentation.adoc</documentation> + <onValidation>%aditoprj%/entity/KeywordEntry_entity/onValidation.js</onValidation> <iconId>VAADIN:KEY</iconId> - <iconIdProcess>%aditoprj%/entity/Keyword_entity/iconIdProcess.js</iconIdProcess> - <titleProcess>%aditoprj%/entity/Keyword_entity/titleProcess.js</titleProcess> + <iconIdProcess>%aditoprj%/entity/KeywordEntry_entity/iconIdProcess.js</iconIdProcess> + <titleProcess>%aditoprj%/entity/KeywordEntry_entity/titleProcess.js</titleProcess> <recordContainer>db</recordContainer> <entityFields> <entityProvider> @@ -17,21 +17,21 @@ </entityProvider> <entityField> <name>CONTAINER</name> - <documentation>%aditoprj%/entity/Keyword_entity/entityfields/container/documentation.adoc</documentation> + <documentation>%aditoprj%/entity/KeywordEntry_entity/entityfields/container/documentation.adoc</documentation> <title>Container</title> <mandatory v="true" /> - <possibleItemsProcess>%aditoprj%/entity/Keyword_entity/entityfields/container/possibleItemsProcess.js</possibleItemsProcess> + <possibleItemsProcess>%aditoprj%/entity/KeywordEntry_entity/entityfields/container/possibleItemsProcess.js</possibleItemsProcess> <groupable v="true" /> </entityField> <entityField> <name>AB_KEYWORD_ENTRYID</name> - <valueProcess>%aditoprj%/entity/Keyword_entity/entityfields/ab_keyword_entryid/valueProcess.js</valueProcess> + <valueProcess>%aditoprj%/entity/KeywordEntry_entity/entityfields/ab_keyword_entryid/valueProcess.js</valueProcess> </entityField> <entityField> <name>KEYID</name> <title>Key</title> <state>READONLY</state> - <valueProcess>%aditoprj%/entity/Keyword_entity/entityfields/keyid/valueProcess.js</valueProcess> + <valueProcess>%aditoprj%/entity/KeywordEntry_entity/entityfields/keyid/valueProcess.js</valueProcess> </entityField> <entityField> <name>TITLE</name> @@ -40,7 +40,7 @@ </entityField> <entityField> <name>SORTING</name> - <documentation>%aditoprj%/entity/Keyword_entity/entityfields/sorting/documentation.adoc</documentation> + <documentation>%aditoprj%/entity/KeywordEntry_entity/entityfields/sorting/documentation.adoc</documentation> <title>Sorting</title> <state>READONLY</state> </entityField> @@ -48,21 +48,21 @@ <name>ISACTIVE</name> <title>Active</title> <contentType>BOOLEAN</contentType> - <possibleItemsProcess>%aditoprj%/entity/Keyword_entity/entityfields/isactive/possibleItemsProcess.js</possibleItemsProcess> - <valueProcess>%aditoprj%/entity/Keyword_entity/entityfields/isactive/valueProcess.js</valueProcess> + <possibleItemsProcess>%aditoprj%/entity/KeywordEntry_entity/entityfields/isactive/possibleItemsProcess.js</possibleItemsProcess> + <valueProcess>%aditoprj%/entity/KeywordEntry_entity/entityfields/isactive/valueProcess.js</valueProcess> </entityField> <entityField> <name>ISESSENTIAL</name> - <documentation>%aditoprj%/entity/Keyword_entity/entityfields/isessential/documentation.adoc</documentation> + <documentation>%aditoprj%/entity/KeywordEntry_entity/entityfields/isessential/documentation.adoc</documentation> <title>Essential</title> <contentType>BOOLEAN</contentType> - <possibleItemsProcess>%aditoprj%/entity/Keyword_entity/entityfields/isessential/possibleItemsProcess.js</possibleItemsProcess> + <possibleItemsProcess>%aditoprj%/entity/KeywordEntry_entity/entityfields/isessential/possibleItemsProcess.js</possibleItemsProcess> <state>READONLY</state> </entityField> <entityParameter> <name>containerName_param</name> <expose v="true" /> - <documentation>%aditoprj%/entity/Keyword_entity/entityfields/containername_param/documentation.adoc</documentation> + <documentation>%aditoprj%/entity/KeywordEntry_entity/entityfields/containername_param/documentation.adoc</documentation> </entityParameter> <entityProvider> <name>SpecificContainerKeywords</name> @@ -230,18 +230,18 @@ <children> <entityParameter> <name>onlyActives</name> - <code>%aditoprj%/entity/Keyword_entity/entityfields/specificcontainerkeywords/children/onlyactives/code.js</code> + <code>%aditoprj%/entity/KeywordEntry_entity/entityfields/specificcontainerkeywords/children/onlyactives/code.js</code> <expose v="true" /> </entityParameter> </children> </entityProvider> <entityField> <name>TITLE_TRANSLATED</name> - <valueProcess>%aditoprj%/entity/Keyword_entity/entityfields/title_translated/valueProcess.js</valueProcess> + <valueProcess>%aditoprj%/entity/KeywordEntry_entity/entityfields/title_translated/valueProcess.js</valueProcess> </entityField> <entityParameter> <name>onlyActives</name> - <code>%aditoprj%/entity/Keyword_entity/entityfields/onlyactives/code.js</code> + <code>%aditoprj%/entity/KeywordEntry_entity/entityfields/onlyactives/code.js</code> <expose v="true" /> <triggerRecalculation v="true" /> <description>PARAMETER</description> @@ -251,9 +251,9 @@ <dbRecordContainer> <name>db</name> <alias>Data_alias</alias> - <conditionProcess>%aditoprj%/entity/Keyword_entity/recordcontainers/db/conditionProcess.js</conditionProcess> - <orderClauseProcess>%aditoprj%/entity/Keyword_entity/recordcontainers/db/orderClauseProcess.js</orderClauseProcess> - <onDBUpdate>%aditoprj%/entity/Keyword_entity/recordcontainers/db/onDBUpdate.js</onDBUpdate> + <conditionProcess>%aditoprj%/entity/KeywordEntry_entity/recordcontainers/db/conditionProcess.js</conditionProcess> + <orderClauseProcess>%aditoprj%/entity/KeywordEntry_entity/recordcontainers/db/orderClauseProcess.js</orderClauseProcess> + <onDBUpdate>%aditoprj%/entity/KeywordEntry_entity/recordcontainers/db/onDBUpdate.js</onDBUpdate> <linkInformation> <linkInformation> <name>52acbfe0-57f4-4614-83af-9882e168f431</name> diff --git a/entity/Keyword_entity/documentation.adoc b/entity/KeywordEntry_entity/documentation.adoc similarity index 100% rename from entity/Keyword_entity/documentation.adoc rename to entity/KeywordEntry_entity/documentation.adoc diff --git a/entity/Keyword_entity/entityfields/ab_keyword_entryid/valueProcess.js b/entity/KeywordEntry_entity/entityfields/ab_keyword_entryid/valueProcess.js similarity index 100% rename from entity/Keyword_entity/entityfields/ab_keyword_entryid/valueProcess.js rename to entity/KeywordEntry_entity/entityfields/ab_keyword_entryid/valueProcess.js diff --git a/entity/Keyword_entity/entityfields/container/documentation.adoc b/entity/KeywordEntry_entity/entityfields/container/documentation.adoc similarity index 100% rename from entity/Keyword_entity/entityfields/container/documentation.adoc rename to entity/KeywordEntry_entity/entityfields/container/documentation.adoc diff --git a/entity/Keyword_entity/entityfields/container/possibleItemsProcess.js b/entity/KeywordEntry_entity/entityfields/container/possibleItemsProcess.js similarity index 100% rename from entity/Keyword_entity/entityfields/container/possibleItemsProcess.js rename to entity/KeywordEntry_entity/entityfields/container/possibleItemsProcess.js diff --git a/entity/Keyword_entity/entityfields/containername_param/documentation.adoc b/entity/KeywordEntry_entity/entityfields/containername_param/documentation.adoc similarity index 100% rename from entity/Keyword_entity/entityfields/containername_param/documentation.adoc rename to entity/KeywordEntry_entity/entityfields/containername_param/documentation.adoc diff --git a/entity/Keyword_entity/entityfields/isactive/possibleItemsProcess.js b/entity/KeywordEntry_entity/entityfields/isactive/possibleItemsProcess.js similarity index 100% rename from entity/Keyword_entity/entityfields/isactive/possibleItemsProcess.js rename to entity/KeywordEntry_entity/entityfields/isactive/possibleItemsProcess.js diff --git a/entity/Keyword_entity/entityfields/isactive/valueProcess.js b/entity/KeywordEntry_entity/entityfields/isactive/valueProcess.js similarity index 100% rename from entity/Keyword_entity/entityfields/isactive/valueProcess.js rename to entity/KeywordEntry_entity/entityfields/isactive/valueProcess.js diff --git a/entity/Keyword_entity/entityfields/isessential/documentation.adoc b/entity/KeywordEntry_entity/entityfields/isessential/documentation.adoc similarity index 100% rename from entity/Keyword_entity/entityfields/isessential/documentation.adoc rename to entity/KeywordEntry_entity/entityfields/isessential/documentation.adoc diff --git a/entity/Keyword_entity/entityfields/isessential/possibleItemsProcess.js b/entity/KeywordEntry_entity/entityfields/isessential/possibleItemsProcess.js similarity index 100% rename from entity/Keyword_entity/entityfields/isessential/possibleItemsProcess.js rename to entity/KeywordEntry_entity/entityfields/isessential/possibleItemsProcess.js diff --git a/entity/Keyword_entity/entityfields/keyid/valueProcess.js b/entity/KeywordEntry_entity/entityfields/keyid/valueProcess.js similarity index 100% rename from entity/Keyword_entity/entityfields/keyid/valueProcess.js rename to entity/KeywordEntry_entity/entityfields/keyid/valueProcess.js diff --git a/entity/Keyword_entity/entityfields/onlyactives/code.js b/entity/KeywordEntry_entity/entityfields/onlyactives/code.js similarity index 100% rename from entity/Keyword_entity/entityfields/onlyactives/code.js rename to entity/KeywordEntry_entity/entityfields/onlyactives/code.js diff --git a/entity/Keyword_entity/entityfields/sorting/documentation.adoc b/entity/KeywordEntry_entity/entityfields/sorting/documentation.adoc similarity index 100% rename from entity/Keyword_entity/entityfields/sorting/documentation.adoc rename to entity/KeywordEntry_entity/entityfields/sorting/documentation.adoc diff --git a/entity/Keyword_entity/entityfields/specificcontainerkeywords/children/onlyactives/code.js b/entity/KeywordEntry_entity/entityfields/specificcontainerkeywords/children/onlyactives/code.js similarity index 100% rename from entity/Keyword_entity/entityfields/specificcontainerkeywords/children/onlyactives/code.js rename to entity/KeywordEntry_entity/entityfields/specificcontainerkeywords/children/onlyactives/code.js diff --git a/entity/Keyword_entity/entityfields/title_translated/valueProcess.js b/entity/KeywordEntry_entity/entityfields/title_translated/valueProcess.js similarity index 100% rename from entity/Keyword_entity/entityfields/title_translated/valueProcess.js rename to entity/KeywordEntry_entity/entityfields/title_translated/valueProcess.js diff --git a/entity/Keyword_entity/iconIdProcess.js b/entity/KeywordEntry_entity/iconIdProcess.js similarity index 100% rename from entity/Keyword_entity/iconIdProcess.js rename to entity/KeywordEntry_entity/iconIdProcess.js diff --git a/entity/Keyword_entity/onValidation.js b/entity/KeywordEntry_entity/onValidation.js similarity index 100% rename from entity/Keyword_entity/onValidation.js rename to entity/KeywordEntry_entity/onValidation.js diff --git a/entity/Keyword_entity/recordcontainers/db/conditionProcess.js b/entity/KeywordEntry_entity/recordcontainers/db/conditionProcess.js similarity index 100% rename from entity/Keyword_entity/recordcontainers/db/conditionProcess.js rename to entity/KeywordEntry_entity/recordcontainers/db/conditionProcess.js diff --git a/entity/Keyword_entity/recordcontainers/db/onDBUpdate.js b/entity/KeywordEntry_entity/recordcontainers/db/onDBUpdate.js similarity index 100% rename from entity/Keyword_entity/recordcontainers/db/onDBUpdate.js rename to entity/KeywordEntry_entity/recordcontainers/db/onDBUpdate.js diff --git a/entity/Keyword_entity/recordcontainers/db/orderClauseProcess.js b/entity/KeywordEntry_entity/recordcontainers/db/orderClauseProcess.js similarity index 100% rename from entity/Keyword_entity/recordcontainers/db/orderClauseProcess.js rename to entity/KeywordEntry_entity/recordcontainers/db/orderClauseProcess.js diff --git a/entity/Keyword_entity/titleProcess.js b/entity/KeywordEntry_entity/titleProcess.js similarity index 100% rename from entity/Keyword_entity/titleProcess.js rename to entity/KeywordEntry_entity/titleProcess.js diff --git a/entity/ObjectRelation_entity/ObjectRelation_entity.aod b/entity/ObjectRelation_entity/ObjectRelation_entity.aod index 5aeb94ee24cd2785d4f62caf643360a7904ca453..5cf415ce65458415ad238fa58de961ae01dd0686 100644 --- a/entity/ObjectRelation_entity/ObjectRelation_entity.aod +++ b/entity/ObjectRelation_entity/ObjectRelation_entity.aod @@ -97,6 +97,7 @@ <entityParameter> <name>Object1Type_param</name> <expose v="true" /> + <mandatory v="true" /> </entityParameter> <entityParameter> <name>Object1Rowid_param</name> @@ -141,6 +142,7 @@ <entityParameter> <name>Object2Type_param</name> <expose v="true" /> + <mandatory v="true" /> </entityParameter> </children> </entityProvider> @@ -259,6 +261,7 @@ <entityParameter> <name>AnyObjectType_param</name> <expose v="true" /> + <mandatory v="true" /> </entityParameter> </children> </entityProvider> diff --git a/entity/ObjectRelation_entity/documentation.adoc b/entity/ObjectRelation_entity/documentation.adoc index 33b4681ecbdb808113aef428f5cd3792a04af1a7..5fd7202aafa4f91fef344ec57f87cfbb216655e0 100644 --- a/entity/ObjectRelation_entity/documentation.adoc +++ b/entity/ObjectRelation_entity/documentation.adoc @@ -1,7 +1,47 @@ -== Object Relation == +Object Relation +=============== +:toc2: left +:numbered: -This entity is for relation between Objects. It should be used if something can be related to something. -If only special objects should be connected where you always know what it is, it is better to create a custom relation table/entity which is only for this purpose. (e.g. Prod2Prod, Relation, ActitvityLink, ...) +(how it works currently 13.02.2019) -The Object type is the ID of the context. -Use Context_lib for this. +There are two possible ways for Object Relations: + +* With the ObjectRelation_entity +* With separate entities like the ActivityLink_entity + +== Differences == +Relations which use a custom entity are specific for one object. +e.g. in ActivityLink are only relations between "activity" and "something". +In ObjectRelation are relations between "something" and "something". + +The activityLink could also be implemented with ObjectRelation, but as there are many activities with many relations. +So it is better to use an extra db-table. + +== How the ObjectRelation_entity works == +The entity works with the AB_OBJECTRELATION db-table. + +An ObjectRelation always has two Objects which consist of an Object-type and an Object-rowid. +The object-type is the id of the context. Which you can get by ContextUtils.getCurrentContextId of the Context_lib for the current context. +The object-rowid is the id of the Object you want use. Normally it is the UID of the Object. + +It provides the following providers: + +* AnyObject +* BothObjects +* Object1 +* Object2 + +AnyObject is for bidirectional relations and all relations which contain the given AnyObject..._params as Object1 or Object2 will be loaded. +BothObjects is for relations between two specific objects provided by Object(1|2)..._params. +Object1 is for unidirectional relations where the Object1 is provided as parameters. +Object2 is for unidirectional relations where the Object2 is provided as parameters. + +For the lookups there are two Entities: Object_entity for the Object-rowids and Context_entity for the Object-type. +See the documentation for them. + + +The provider use the targetContext-feature to show the preview of the linked objects directly. (see targetContext-docu in the ohers/guide folder) + +== Link-entities == +They work very similar to the ObjectRelation, but only use one Object. The lookups and targetContext-feature work the same. \ No newline at end of file diff --git a/entity/Offer_entity/Offer_entity.aod b/entity/Offer_entity/Offer_entity.aod index 567fd37a4a27084bb0554f5db54c323b18fd6454..046af73d8b1c7196cbd79aa7747490446b214fa4 100644 --- a/entity/Offer_entity/Offer_entity.aod +++ b/entity/Offer_entity/Offer_entity.aod @@ -318,7 +318,7 @@ <fieldType>DEPENDENCY_OUT</fieldType> <dependency> <name>dependency</name> - <entityName>Keyword_entity</entityName> + <entityName>KeywordEntry_entity</entityName> <fieldName>SpecificContainerKeywords</fieldName> </dependency> <children> @@ -333,7 +333,7 @@ <fieldType>DEPENDENCY_OUT</fieldType> <dependency> <name>dependency</name> - <entityName>Keyword_entity</entityName> + <entityName>KeywordEntry_entity</entityName> <fieldName>SpecificContainerKeywords</fieldName> </dependency> <children> diff --git a/entity/Offeritem_entity/Offeritem_entity.aod b/entity/Offeritem_entity/Offeritem_entity.aod index 7978e285ae8184488944ab441653f569df2f4866..691c6b9950b17f8186cbbb24c59b8c26ac9e6e92 100644 --- a/entity/Offeritem_entity/Offeritem_entity.aod +++ b/entity/Offeritem_entity/Offeritem_entity.aod @@ -153,7 +153,7 @@ <fieldType>DEPENDENCY_OUT</fieldType> <dependency> <name>dependency</name> - <entityName>Keyword_entity</entityName> + <entityName>KeywordEntry_entity</entityName> <fieldName>SpecificContainerKeywords</fieldName> </dependency> <children> @@ -168,7 +168,7 @@ <fieldType>DEPENDENCY_OUT</fieldType> <dependency> <name>dependency</name> - <entityName>Keyword_entity</entityName> + <entityName>KeywordEntry_entity</entityName> <fieldName>SpecificContainerKeywords</fieldName> </dependency> <children> diff --git a/entity/Order_entity/Order_entity.aod b/entity/Order_entity/Order_entity.aod index 2d15bd90d6a8c37612d94cb0239ee82bbf2029bf..59ca2428627828bd11255bde193524c56162421c 100644 --- a/entity/Order_entity/Order_entity.aod +++ b/entity/Order_entity/Order_entity.aod @@ -289,7 +289,7 @@ <fieldType>DEPENDENCY_OUT</fieldType> <dependency> <name>dependency</name> - <entityName>Keyword_entity</entityName> + <entityName>KeywordEntry_entity</entityName> <fieldName>SpecificContainerKeywords</fieldName> </dependency> <children> @@ -304,7 +304,7 @@ <fieldType>DEPENDENCY_OUT</fieldType> <dependency> <name>dependency</name> - <entityName>Keyword_entity</entityName> + <entityName>KeywordEntry_entity</entityName> <fieldName>SpecificContainerKeywords</fieldName> </dependency> <children> diff --git a/entity/Order_entity/entityfields/salesordercode/onValidation.js b/entity/Order_entity/entityfields/salesordercode/onValidation.js index 9b98fac0e7b4722b8dcf714669dbf75ca524db7c..7913eec27eac7305ad380c20034691581d7fd08e 100644 --- a/entity/Order_entity/entityfields/salesordercode/onValidation.js +++ b/entity/Order_entity/entityfields/salesordercode/onValidation.js @@ -2,8 +2,6 @@ import("system.vars"); import("system.result"); import("system.neon"); import("Order_lib"); -import("Salesproject_lib"); -import("Util_lib"); import("Entity_lib"); if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW diff --git a/entity/Orderitem_entity/Orderitem_entity.aod b/entity/Orderitem_entity/Orderitem_entity.aod index e88dd43338ba0e9db5a0618bc1056c16de294f03..ae3ec522497d3f7e869e6391c700af597405db11 100644 --- a/entity/Orderitem_entity/Orderitem_entity.aod +++ b/entity/Orderitem_entity/Orderitem_entity.aod @@ -157,7 +157,7 @@ <fieldType>DEPENDENCY_OUT</fieldType> <dependency> <name>dependency</name> - <entityName>Keyword_entity</entityName> + <entityName>KeywordEntry_entity</entityName> <fieldName>SpecificContainerKeywords</fieldName> </dependency> <children> @@ -172,7 +172,7 @@ <fieldType>DEPENDENCY_OUT</fieldType> <dependency> <name>dependency</name> - <entityName>Keyword_entity</entityName> + <entityName>KeywordEntry_entity</entityName> <fieldName>SpecificContainerKeywords</fieldName> </dependency> <children> diff --git a/entity/Organisation_entity/Organisation_entity.aod b/entity/Organisation_entity/Organisation_entity.aod index cc6a517a19b67f7df722159dc98c14ae76f5d005..135db7bd852c1169921b8f123cb02fc1ce1ad6ca 100644 --- a/entity/Organisation_entity/Organisation_entity.aod +++ b/entity/Organisation_entity/Organisation_entity.aod @@ -432,7 +432,7 @@ Usually this is used for filtering COMMUNICATION-entires by a specified contact <fieldType>DEPENDENCY_OUT</fieldType> <dependency> <name>dependency</name> - <entityName>Keyword_entity</entityName> + <entityName>KeywordEntry_entity</entityName> <fieldName>SpecificContainerKeywords</fieldName> </dependency> <children> @@ -447,7 +447,7 @@ Usually this is used for filtering COMMUNICATION-entires by a specified contact <fieldType>DEPENDENCY_OUT</fieldType> <dependency> <name>dependency</name> - <entityName>Keyword_entity</entityName> + <entityName>KeywordEntry_entity</entityName> <fieldName>SpecificContainerKeywords</fieldName> </dependency> <children> diff --git a/entity/Person_entity/Person_entity.aod b/entity/Person_entity/Person_entity.aod index ee2cf9231b3fc17312e126aad4129152e9e42bbc..3e4d6b6bd8d321e965263786a78e6a0b0e596668 100644 --- a/entity/Person_entity/Person_entity.aod +++ b/entity/Person_entity/Person_entity.aod @@ -460,7 +460,7 @@ <fieldType>DEPENDENCY_OUT</fieldType> <dependency> <name>dependency</name> - <entityName>Keyword_entity</entityName> + <entityName>KeywordEntry_entity</entityName> <fieldName>SpecificContainerKeywords</fieldName> </dependency> <children> diff --git a/entity/Product_entity/Product_entity.aod b/entity/Product_entity/Product_entity.aod index 626690b5570dbefb1a86778d1d1d6009733434f3..da0c900b6fbce3e532cffec790482f4c9e257fed 100644 --- a/entity/Product_entity/Product_entity.aod +++ b/entity/Product_entity/Product_entity.aod @@ -237,7 +237,7 @@ <fieldType>DEPENDENCY_OUT</fieldType> <dependency> <name>dependency</name> - <entityName>Keyword_entity</entityName> + <entityName>KeywordEntry_entity</entityName> <fieldName>SpecificContainerKeywords</fieldName> </dependency> <children> @@ -252,7 +252,7 @@ <fieldType>DEPENDENCY_OUT</fieldType> <dependency> <name>dependency</name> - <entityName>Keyword_entity</entityName> + <entityName>KeywordEntry_entity</entityName> <fieldName>SpecificContainerKeywords</fieldName> </dependency> <children> diff --git a/entity/Productprice_entity/Productprice_entity.aod b/entity/Productprice_entity/Productprice_entity.aod index 671068f90c983e6633381d877eab5fc48a1f6009..d2358a563ff0be3769d0ad2bcdcc66516e84d697 100644 --- a/entity/Productprice_entity/Productprice_entity.aod +++ b/entity/Productprice_entity/Productprice_entity.aod @@ -150,7 +150,7 @@ <fieldType>DEPENDENCY_OUT</fieldType> <dependency> <name>dependency</name> - <entityName>Keyword_entity</entityName> + <entityName>KeywordEntry_entity</entityName> <fieldName>SpecificContainerKeywords</fieldName> </dependency> <children> @@ -165,7 +165,7 @@ <fieldType>DEPENDENCY_OUT</fieldType> <dependency> <name>dependency</name> - <entityName>Keyword_entity</entityName> + <entityName>KeywordEntry_entity</entityName> <fieldName>SpecificContainerKeywords</fieldName> </dependency> <children> diff --git a/entity/SalesprojectCompetition_entity/SalesprojectCompetition_entity.aod b/entity/SalesprojectCompetition_entity/SalesprojectCompetition_entity.aod index 4c96838ecec17a5a3a22ba879b5601dc20705c7b..c16a7679c19e2fba50366f05911cf52e3d8109dd 100644 --- a/entity/SalesprojectCompetition_entity/SalesprojectCompetition_entity.aod +++ b/entity/SalesprojectCompetition_entity/SalesprojectCompetition_entity.aod @@ -122,7 +122,7 @@ <fieldType>DEPENDENCY_OUT</fieldType> <dependency> <name>dependency</name> - <entityName>Keyword_entity</entityName> + <entityName>KeywordEntry_entity</entityName> <fieldName>SpecificContainerKeywords</fieldName> </dependency> <children> diff --git a/entity/SalesprojectForecast_entity/SalesprojectForecast_entity.aod b/entity/SalesprojectForecast_entity/SalesprojectForecast_entity.aod index 9ccc4d770d2b87d22d02cad7764e9b5244ef832e..15345f79e2bf15eadcef6b5b17bc78342f039bf8 100644 --- a/entity/SalesprojectForecast_entity/SalesprojectForecast_entity.aod +++ b/entity/SalesprojectForecast_entity/SalesprojectForecast_entity.aod @@ -67,7 +67,7 @@ <fieldType>DEPENDENCY_OUT</fieldType> <dependency> <name>dependency</name> - <entityName>Keyword_entity</entityName> + <entityName>KeywordEntry_entity</entityName> <fieldName>SpecificContainerKeywords</fieldName> </dependency> <children> diff --git a/entity/SalesprojectMember_entity/SalesprojectMember_entity.aod b/entity/SalesprojectMember_entity/SalesprojectMember_entity.aod index 281d55b5ce8339ef63df6acd5e4c019a108f0597..9b412db0ba34ff0ae82a333b0d8ad6961f56c46c 100644 --- a/entity/SalesprojectMember_entity/SalesprojectMember_entity.aod +++ b/entity/SalesprojectMember_entity/SalesprojectMember_entity.aod @@ -135,7 +135,7 @@ TODO: intuitive möglichkeit, auf dend Stand aus Relation zurückzusetzen... akt <fieldType>DEPENDENCY_OUT</fieldType> <dependency> <name>dependency</name> - <entityName>Keyword_entity</entityName> + <entityName>KeywordEntry_entity</entityName> <fieldName>SpecificContainerKeywords</fieldName> </dependency> <children> diff --git a/entity/SalesprojectSource_entity/SalesprojectSource_entity.aod b/entity/SalesprojectSource_entity/SalesprojectSource_entity.aod index 4d23f20ff88c49b3f7dc07e117147caebc9b40f9..7c0cd7d8fd2e0b087ce52070fa5f4a0780156e8b 100644 --- a/entity/SalesprojectSource_entity/SalesprojectSource_entity.aod +++ b/entity/SalesprojectSource_entity/SalesprojectSource_entity.aod @@ -56,7 +56,7 @@ <fieldType>DEPENDENCY_OUT</fieldType> <dependency> <name>dependency</name> - <entityName>Keyword_entity</entityName> + <entityName>KeywordEntry_entity</entityName> <fieldName>SpecificContainerKeywords</fieldName> </dependency> <children> diff --git a/entity/Stock_entity/Stock_entity.aod b/entity/Stock_entity/Stock_entity.aod index baea0e36914ab2a8c54294c1048e36d9eb26a4f7..3affa9efa4a444e24927a2291a68d2d4aa646e6d 100644 --- a/entity/Stock_entity/Stock_entity.aod +++ b/entity/Stock_entity/Stock_entity.aod @@ -90,7 +90,7 @@ <fieldType>DEPENDENCY_OUT</fieldType> <dependency> <name>dependency</name> - <entityName>Keyword_entity</entityName> + <entityName>KeywordEntry_entity</entityName> <fieldName>SpecificContainerKeywords</fieldName> </dependency> <children> diff --git a/entity/Task_entity/Task_entity.aod b/entity/Task_entity/Task_entity.aod index 36cf16b67ba417142c653045ccd53c0c5a00ea2b..94d2fb3ea2fae7233d978d903e574f393b6a8cbd 100644 --- a/entity/Task_entity/Task_entity.aod +++ b/entity/Task_entity/Task_entity.aod @@ -145,7 +145,7 @@ <fieldType>DEPENDENCY_OUT</fieldType> <dependency> <name>dependency</name> - <entityName>Keyword_entity</entityName> + <entityName>KeywordEntry_entity</entityName> <fieldName>SpecificContainerKeywords</fieldName> </dependency> <children> @@ -160,7 +160,7 @@ <fieldType>DEPENDENCY_OUT</fieldType> <dependency> <name>dependency</name> - <entityName>Keyword_entity</entityName> + <entityName>KeywordEntry_entity</entityName> <fieldName>SpecificContainerKeywords</fieldName> </dependency> <children> diff --git a/neonContext/Appointment_context/Appointment_context.aod b/neonContext/Appointment/Appointment.aod similarity index 87% rename from neonContext/Appointment_context/Appointment_context.aod rename to neonContext/Appointment/Appointment.aod index 2699eb3fc31df0b6bbc2ddced8a7315feca7a7f4..d71e9fdc043efb00cb87032922cc820fe6db5604 100644 --- a/neonContext/Appointment_context/Appointment_context.aod +++ b/neonContext/Appointment/Appointment.aod @@ -1,9 +1,9 @@ <?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>Appointment_context</name> + <name>Appointment</name> <title>Termin</title> <majorModelMode>DISTRIBUTED</majorModelMode> - <documentation>%aditoprj%/neonContext/Appointment_context/documentation.adoc</documentation> + <documentation>%aditoprj%/neonContext/Appointment/documentation.adoc</documentation> <icon>VAADIN:CALENDAR</icon> <mainview>AppointmentEdit_view</mainview> <filterview>AppointmentPreview_view</filterview> diff --git a/neonContext/Appointment_context/documentation.adoc b/neonContext/Appointment/documentation.adoc similarity index 100% rename from neonContext/Appointment_context/documentation.adoc rename to neonContext/Appointment/documentation.adoc diff --git a/neonContext/Keyword_context/Keyword_context.aod b/neonContext/Keyword_context/Keyword_context.aod index 916d515832119a1eee55ff2eb24806cbd75187e7..17b405b6d08e222a5c937f9dcf9a81ff30b98413 100644 --- a/neonContext/Keyword_context/Keyword_context.aod +++ b/neonContext/Keyword_context/Keyword_context.aod @@ -7,7 +7,7 @@ <filterview>KeywordFilter_view</filterview> <editview>KeywordEdit_view</editview> <preview>KeywordPreview_view</preview> - <entity>Keyword_entity</entity> + <entity>KeywordEntry_entity</entity> <references> <neonViewReference> <name>75271eb0-8ddf-4b02-a943-01f589df1b20</name> diff --git a/others/db_changes/data_alias/data/example_contract/CONTRACT_42154311.xml b/others/db_changes/data_alias/data/example_contract/CONTRACT_1000.xml similarity index 96% rename from others/db_changes/data_alias/data/example_contract/CONTRACT_42154311.xml rename to others/db_changes/data_alias/data/example_contract/CONTRACT_1000.xml index f0dbcb7fb2fa47acb5117370288541b86cc55fe8..9927a52e97c92ee9841262bf97bc1925ef9c6622 100644 --- a/others/db_changes/data_alias/data/example_contract/CONTRACT_42154311.xml +++ b/others/db_changes/data_alias/data/example_contract/CONTRACT_1000.xml @@ -4,7 +4,7 @@ <insert tableName="CONTRACT"> <column name="CONTRACTID" value="384c9d31-9923-4e6a-8a7f-2d2890470b70"/> <column name="CONTACT_ID" value="b219b58a-f120-42d8-9a64-0b176501eac7"/> - <column name="CONTRACTCODE" value="42154311"/> + <column name="CONTRACTCODE" value="1000"/> <column name="PAYMENT" value="ca4d845b-f299-40c8-ace5-174bcfbb2d12"/> <column name="CONTRACTTYPE" value="612f49d7-66c9-4304-ac3f-0ea19bb50948"/> <column name="CONTRACTSTATUS" value="3579eb0c-d8ca-4b6b-85ee-f1800a9301eb"/> diff --git a/others/db_changes/data_alias/data/example_contract/CONTRACT_42154312.xml b/others/db_changes/data_alias/data/example_contract/CONTRACT_1001.xml similarity index 96% rename from others/db_changes/data_alias/data/example_contract/CONTRACT_42154312.xml rename to others/db_changes/data_alias/data/example_contract/CONTRACT_1001.xml index d097059613e5959da8368d56982d34b9303c41de..b37673fcca6e2de324e470008ce8334a5619e2d0 100644 --- a/others/db_changes/data_alias/data/example_contract/CONTRACT_42154312.xml +++ b/others/db_changes/data_alias/data/example_contract/CONTRACT_1001.xml @@ -4,7 +4,7 @@ <insert tableName="CONTRACT"> <column name="CONTRACTID" value="8b95a074-086e-44c8-bd45-fb8e33803da3"/> <column name="CONTACT_ID" value="b219b58a-f120-42d8-9a64-0b176501eac7"/> - <column name="CONTRACTCODE" value="42154312"/> + <column name="CONTRACTCODE" value="1001"/> <column name="PAYMENT" value="ca4d845b-f299-40c8-ace5-174bcfbb2d12"/> <column name="CONTRACTTYPE" value="612f49d7-66c9-4304-ac3f-0ea19bb50948"/> <column name="CONTRACTSTATUS" value="3579eb0c-d8ca-4b6b-85ee-f1800a9301eb"/> diff --git a/others/db_changes/data_alias/data/example_contract/CONTRACT_42154313.xml b/others/db_changes/data_alias/data/example_contract/CONTRACT_1002.xml similarity index 96% rename from others/db_changes/data_alias/data/example_contract/CONTRACT_42154313.xml rename to others/db_changes/data_alias/data/example_contract/CONTRACT_1002.xml index c4b7c76337ec5d649ce020ce82059e857749de0e..440e9ce6423f53a4c7be2b39e6967de9539623c9 100644 --- a/others/db_changes/data_alias/data/example_contract/CONTRACT_42154313.xml +++ b/others/db_changes/data_alias/data/example_contract/CONTRACT_1002.xml @@ -4,7 +4,7 @@ <insert tableName="CONTRACT"> <column name="CONTRACTID" value="eb182167-1e33-4290-a160-a86d09685cba"/> <column name="CONTACT_ID" value="b219b58a-f120-42d8-9a64-0b176501eac7"/> - <column name="CONTRACTCODE" value="42154313"/> + <column name="CONTRACTCODE" value="1002"/> <column name="PAYMENT" value="ca4d845b-f299-40c8-ace5-174bcfbb2d12"/> <column name="CONTRACTTYPE" value="612f49d7-66c9-4304-ac3f-0ea19bb50948"/> <column name="CONTRACTSTATUS" value="3579eb0c-d8ca-4b6b-85ee-f1800a9301eb"/> diff --git a/others/db_changes/data_alias/data/example_contract/CONTRACT_42154314.xml b/others/db_changes/data_alias/data/example_contract/CONTRACT_1003.xml similarity index 96% rename from others/db_changes/data_alias/data/example_contract/CONTRACT_42154314.xml rename to others/db_changes/data_alias/data/example_contract/CONTRACT_1003.xml index 759d52ba01082a983405bbdf641a7323492872d1..f474cb79b4e5720fbe6b6af141b45e439657f3fb 100644 --- a/others/db_changes/data_alias/data/example_contract/CONTRACT_42154314.xml +++ b/others/db_changes/data_alias/data/example_contract/CONTRACT_1003.xml @@ -4,7 +4,7 @@ <insert tableName="CONTRACT"> <column name="CONTRACTID" value="6fc9483c-fcfc-48fb-b48f-18e6b11f31fc"/> <column name="CONTACT_ID" value="e6da1393-f46b-41a4-826b-2c7d22de2246"/> - <column name="CONTRACTCODE" value="42154314"/> + <column name="CONTRACTCODE" value="1003"/> <column name="PAYMENT" value="ca4d845b-f299-40c8-ace5-174bcfbb2d12"/> <column name="CONTRACTTYPE" value="612f49d7-66c9-4304-ac3f-0ea19bb50948"/> <column name="CONTRACTSTATUS" value="3579eb0c-d8ca-4b6b-85ee-f1800a9301eb"/> diff --git a/others/db_changes/data_alias/data/example_contract/CONTRACT_42154315.xml b/others/db_changes/data_alias/data/example_contract/CONTRACT_1004.xml similarity index 96% rename from others/db_changes/data_alias/data/example_contract/CONTRACT_42154315.xml rename to others/db_changes/data_alias/data/example_contract/CONTRACT_1004.xml index 384a9580f825492f3fe919ea4530f0253851f8d3..8ba106ae449019ea6caaeac2e405a7d6fe2259a4 100644 --- a/others/db_changes/data_alias/data/example_contract/CONTRACT_42154315.xml +++ b/others/db_changes/data_alias/data/example_contract/CONTRACT_1004.xml @@ -4,7 +4,7 @@ <insert tableName="CONTRACT"> <column name="CONTRACTID" value="a944b07c-aaed-4bcf-820c-9e6031bc3d6c"/> <column name="CONTACT_ID" value="e6da1393-f46b-41a4-826b-2c7d22de2246"/> - <column name="CONTRACTCODE" value="42154315"/> + <column name="CONTRACTCODE" value="1004"/> <column name="PAYMENT" value="ca4d845b-f299-40c8-ace5-174bcfbb2d12"/> <column name="CONTRACTTYPE" value="612f49d7-66c9-4304-ac3f-0ea19bb50948"/> <column name="CONTRACTSTATUS" value="3579eb0c-d8ca-4b6b-85ee-f1800a9301eb"/> diff --git a/others/db_changes/data_alias/struct/AditoBasic/create_ab_keyword_attribute.xml b/others/db_changes/data_alias/struct/AditoBasic/create_ab_keyword_attribute.xml new file mode 100644 index 0000000000000000000000000000000000000000..baffb14652f6ea01e9601b911a457f939c0ebbdc --- /dev/null +++ b/others/db_changes/data_alias/struct/AditoBasic/create_ab_keyword_attribute.xml @@ -0,0 +1,20 @@ +<?xml version="1.1" encoding="UTF-8" standalone="no"?> +<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd"> + <changeSet author="j.goderbauer" id="6838de69-9165-45eb-981e-e720c1b3c582"> + <createTable tableName="AB_KEYWORD_ATTRIBUTE"> + <column name="AB_KEYWORD_ATTRIBUTEID" type="CHAR(36)"> + <constraints primaryKey="true" primaryKeyName="PK_AB_KEYWORD_ATTRIBUTEID"/> + </column> + + <column name="NAME" type="CHAR(36)"> + <constraints nullable="false"/> + </column> + <column name="TYPE" type="NVARCHAR(100)"> + <constraints nullable="false"/> + </column> + <column name="CONTAINER" type="VARCHAR(80)"> + <constraints nullable="false"/> + </column> + </createTable> + </changeSet> +</databaseChangeLog> \ No newline at end of file diff --git a/others/db_changes/data_alias/struct/AditoBasic/create_ab_keyword_attributerelation.xml b/others/db_changes/data_alias/struct/AditoBasic/create_ab_keyword_attributerelation.xml new file mode 100644 index 0000000000000000000000000000000000000000..14ca84031b4765ab0a124d88f1fb1d2addc196d1 --- /dev/null +++ b/others/db_changes/data_alias/struct/AditoBasic/create_ab_keyword_attributerelation.xml @@ -0,0 +1,16 @@ +<?xml version="1.1" encoding="UTF-8" standalone="no"?> +<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd"> + <changeSet author="s.listl" id="febc4192-4bfc-4401-837e-514574351ea8"> + <createTable tableName="AB_KEYWORD_ATTRIBUTERELATION"> + <column name="AB_KEYWORD_ATTRIBUTERELATIONID" type="CHAR(36)"> + <constraints primaryKey="true" primaryKeyName="PK_AB_KEYWORD_ATTRIBUTERELATIONID"/> + </column> + <column name="AB_KEYWORD_ENTRY_ID" type="CHAR(36)"> + <constraints nullable="false"/> + </column> + <column name="CHAR_VALUE" type="NVARCHAR(63)"/> + <column name="NUMBER_VALUE" type="NUMERIC(14,2)"/> + <column name="BOOL_VALUE" type="TINYINT"/> + </createTable> + </changeSet> +</databaseChangeLog> \ No newline at end of file diff --git a/others/db_changes/masterChangelog.xml b/others/db_changes/masterChangelog.xml index a6438b08fcb232bcdc80530bce93a69702abebb7..da00a762ef6d8f228aa7e9887c598fda38c4b3dd 100644 --- a/others/db_changes/masterChangelog.xml +++ b/others/db_changes/masterChangelog.xml @@ -5,6 +5,8 @@ <include file="data_alias/struct/AditoBasic/create_ab_attributerelation.xml"/> <include file="data_alias/struct/AditoBasic/create_ab_attributeusage.xml"/> <include file="data_alias/struct/AditoBasic/create_ab_keyword_entry.xml"/> + <include file="data_alias/struct/AditoBasic/create_ab_keyword_attribute.xml"/> + <include file="data_alias/struct/AditoBasic/create_ab_keyword_attributerelation.xml"/> <include file="data_alias/struct/AditoBasic/create_ab_countryinfo.xml"/> <include file="data_alias/struct/AditoBasic/create_ab_language.xml"/> @@ -49,11 +51,11 @@ <include file="data_alias/data/example_person/PERSON_obermeier.xml"/> <include file="data_alias/data/example_person/PERSON_smith.xml"/> <include file="data_alias/data/example_person/PERSON_lustig.xml"/> - <include file="data_alias/data/example_contract/CONTRACT_42154311.xml"/> - <include file="data_alias/data/example_contract/CONTRACT_42154312.xml"/> - <include file="data_alias/data/example_contract/CONTRACT_42154313.xml"/> - <include file="data_alias/data/example_contract/CONTRACT_42154314.xml"/> - <include file="data_alias/data/example_contract/CONTRACT_42154315.xml"/> + <include file="data_alias/data/example_contract/CONTRACT_1000.xml"/> + <include file="data_alias/data/example_contract/CONTRACT_1001.xml"/> + <include file="data_alias/data/example_contract/CONTRACT_1002.xml"/> + <include file="data_alias/data/example_contract/CONTRACT_1003.xml"/> + <include file="data_alias/data/example_contract/CONTRACT_1004.xml"/> <include file="data_alias/data/example_product/PRODUCT_42154311.xml"/> <include file="data_alias/data/example_salesproject/SALESPROJECT_gfk.xml"/> <include file="data_alias/data/example_salesproject/SALESPROJECT_jkl.xml"/> diff --git a/others/guide/ProviderConsumerParameter.adoc b/others/guide/ProviderConsumerParameter.adoc new file mode 100644 index 0000000000000000000000000000000000000000..67b427e998091baebd9d482c2de581b3d20d2dea --- /dev/null +++ b/others/guide/ProviderConsumerParameter.adoc @@ -0,0 +1,92 @@ +Provider - Consumer +=================== +:toc2: left +:numbered: + +=== Provider === +Is the old dfi. + +==== Purpose ==== +The provider provides access to an entity. +You can get data of another entity by connecting a consumer to a provider. + +==== Naming ==== +The names should provide information about *what the provider provides*. + +For example: +Communication_entity has 3 providers: + +- *AllCommunications* +- *EmailCommunications* +- *PhoneCommunications* + +If you connect to *AllCommunications* you get *all* communication types of a contact. +If you connect to *EmailCommunications* you get *only the Email* communication type of a contact. +If you connect to *PhoneCommunications* you get *only the Phone* communication type of a contact. + +*Important:* +*Do not always create a new provider when connecting a new entity. Maybe u can use an already existing provider.* +*Try to reuse providers if you need similar data for two dependencies* + +=== Consumer === +Is the old dfo. + +=== Purpose === +The Consumer *consumes* the data a provider provides. +It can be connected to a provider and fill the parameters of the provider. + +=== Naming === +Most of the time you get a list of "something" so you should call it the plural of what you get. + +Example: +Persons +Organisations + +If you have two Consumer to the same Entity, you should use speaking names. + +Example: +Documents (e.g. for all documents of a person) +MainDocuments (e.g. for only the main documents of a person) + +If you know you get only one row, you can use the singular. + +Example: +Person + +=== Parameter === +Parameters provide a way to tell a provider *what exactly you need*. + +==== Properties ==== +The most important properties are +code, exposed, triggerRecalculation and mandatory + +Parameters work with a fallback mechanism. +This means that if you set the code on the parameter directly then this is executed *only if you did not* provide the code on the parameter at the *provider* and/or *consumer*. +Likewise if you set the code on a parameter at the provider it will only be executed if a *consumer* which connects to this provider *has no code set* at the parameter. + +Here some examples for the *code* property: + +[options="header"] +|======================================================================================================================================================================================================================================================== +| Parameter | Provider | Consumer | Result | Notes +| default | default | default | Nothing executed | +| default | default | code set | Code from consumer executed | This is the mostly used scenario. +| default | code set | default | Code from provider executed | This is used if you need a default value for a parameter which is different on each provider. e.g. used by the Document_entity to determine if it should show main documents or not. +| code set | default | default | Code from parameter executed | +|======================================================================================================================================================================================================================================================== + +The checkbox-parameters can have *three* states: default, checked, unchecked. Default means the property is *gray* and the value from the previous instance is used. Checked and unchecked overwrite always the previous instance. + +The exposed property is a way to decide if a parameter should be visible by the next instance +Here some examples for the *exposed* property: + +[options="header"] +|======================================================================================================================================================== +| Parameter | Provider | Result | Notes +| default | default | NOT Exposed | because the default for exposed is: NOT exposed. -> the parameter won't be visible on the provider and consumer! +| set | set | Exposed | This means that the parameter can be set by the consumer. +| set | UNset | NOT Exposed | This will disable the parameter for one specific provider. +| set | default | Exposed | +|======================================================================================================================================================== + +*Note that there are currently (13.02.2019) some bugs and the handling of parameters with the default #PROVIDER may change.* \ No newline at end of file diff --git a/others/guide/TargetContext.adoc b/others/guide/TargetContext.adoc new file mode 100644 index 0000000000000000000000000000000000000000..89155b20aa2879693555d901cf1f6f5445f002ab --- /dev/null +++ b/others/guide/TargetContext.adoc @@ -0,0 +1,19 @@ +Target Context +============== + +toc2: left +:numbered: + +== What? == +The target context is for forwarding the preview and the klick-action to another context. + +== Why? == +For example the ObjectRelation entity uses this feature to open the linked object directly. + +== Where? == +It is configured by two properties of the providers. + +* targetContextField +* targetIdField + +You can provide an entity-field for each of them which contain the contextId (currently the contextName 13.02.2019) and the rowId (UID) which should be used to open the preview or main view. \ No newline at end of file diff --git a/preferences/_____PREFERENCES_PROJECT/_____PREFERENCES_PROJECT.aod b/preferences/_____PREFERENCES_PROJECT/_____PREFERENCES_PROJECT.aod index 3f9daeb173f0de1d87682e389317618aba75d421..336d6b092bda8ab38166821c8d50c82ace586ceb 100644 --- a/preferences/_____PREFERENCES_PROJECT/_____PREFERENCES_PROJECT.aod +++ b/preferences/_____PREFERENCES_PROJECT/_____PREFERENCES_PROJECT.aod @@ -2,7 +2,7 @@ <preferences xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="3.0.3" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/preferences/3.0.3"> <name>_____PREFERENCES_PROJECT</name> <majorModelMode>DISTRIBUTED</majorModelMode> - <projectName>basic 2019</projectName> + <projectName>xRM-Basic2019</projectName> <jditoMaxContentSize v="57671680" /> <calendarCategoriesEvent> <entry> diff --git a/process/Contract_lib/Contract_lib.aod b/process/Contract_lib/Contract_lib.aod new file mode 100644 index 0000000000000000000000000000000000000000..234bef611cb14e0b410737c12c22ca3cdf8dd3de --- /dev/null +++ b/process/Contract_lib/Contract_lib.aod @@ -0,0 +1,9 @@ +<?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>Contract_lib</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <process>%aditoprj%/process/Contract_lib/process.js</process> + <variants> + <element>LIBRARY</element> + </variants> +</process> diff --git a/process/Contract_lib/process.js b/process/Contract_lib/process.js new file mode 100644 index 0000000000000000000000000000000000000000..292b26d66dff5ea3839086e8448b03b8644dd5b0 --- /dev/null +++ b/process/Contract_lib/process.js @@ -0,0 +1,46 @@ +import("system.vars"); +import("system.util"); +import("system.datetime"); +import("system.text"); +import("system.neon"); +import("system.db"); +import("system.translate"); +import("system.eMath"); +import("Util_lib"); +import("Sql_lib"); +import("Keyword_lib"); +import("Product_lib"); +import("Report_lib"); +import("OfferOrder_lib"); + +/** + * Methods used by Contract. + * Do not create an instance of this! + * + * @class + */ +function ContractUtils() {} + +/** + * Delivers the next valid contract number (has to be unique) + * + * @return {String} next valid contract number + */ +ContractUtils.getNextContractNumber = function() { + return NumberSequencingUtils.getNextUniqueNumber("CONTRACTCODE", "CONTRACT"); +} + +/** + * Checks if the passed order number is valid (has to be unique) + * + * @param {String} pContractNumber order number to check + * + * @return {Boolean} passed number is valid + */ +ContractUtils.validateContractNumber = function(pContractNumber) { + return NumberSequencingUtils.validateUniqueNumber(pContractNumber, "CONTRACTCODE", "CONTRACT"); +} + +ContractUtils.getContractNumberValidationFailString = function() { + return translate.text("The contract number already exists!"); +} \ No newline at end of file