Skip to content
Snippets Groups Projects
Commit 0bd36e2a authored by Maximilian Hofmann's avatar Maximilian Hofmann
Browse files

Merge master into #1034075-renaming

parents 6d0483fd 523d8107
No related branches found
No related tags found
No related merge requests found
Showing
with 247 additions and 22 deletions
<?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>AppointmentLink_entity</name>
<majorModelMode>DISTRIBUTED</majorModelMode>
<recordContainer>db</recordContainer>
<entityFields>
<entityProvider>
<name>#PROVIDER</name>
<recordContainer>db</recordContainer>
</entityProvider>
<entityField>
<name>APPOINTMENTLINKID</name>
</entityField>
<entityField>
<name>APPOINTMENT_ID</name>
</entityField>
<entityField>
<name>OBJECTID</name>
</entityField>
<entityField>
<name>OBJECTTYPE</name>
</entityField>
<entityParameter>
<name>AppointmentId_param</name>
<expose v="true" />
<mandatory v="false" />
<description>PARAMETER</description>
</entityParameter>
<entityProvider>
<name>Link</name>
<fieldType>DEPENDENCY_IN</fieldType>
<targetContextField>OBJECTTYPE</targetContextField>
<targetIdField>OBJECTID</targetIdField>
<recordContainer>db</recordContainer>
<dependencies>
<entityDependency>
<name>3dde1745-18a1-4499-83d0-61e414086997</name>
<entityName>Appointment_entity</entityName>
<fieldName>AppointmentLinks</fieldName>
<isConsumer v="false" />
</entityDependency>
</dependencies>
</entityProvider>
</entityFields>
<recordContainers>
<dbRecordContainer>
<name>db</name>
<alias>Data_alias</alias>
<conditionProcess>%aditoprj%/entity/AppointmentLink_entity/recordcontainers/db/conditionProcess.js</conditionProcess>
<linkInformation>
<linkInformation>
<name>4b8f04a4-9d0f-4ff1-90f3-e173930788cc</name>
<tableName>APPOINTMENTLINK</tableName>
<primaryKey>APPOINTMENTLINK_ID</primaryKey>
<isUIDTable v="true" />
<readonly v="false" />
</linkInformation>
</linkInformation>
<recordFieldMappings>
<dbRecordFieldMapping>
<name>APPOINTMENT_ID.value</name>
<recordfield>APPOINTMENTLINK.APPOINTMENT_ID</recordfield>
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>APPOINTMENTLINKID.value</name>
<recordfield>APPOINTMENTLINK.APPOINTMENTLINK_ID</recordfield>
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>OBJECTID.value</name>
<recordfield>APPOINTMENTLINK.OBJECT_ROWID</recordfield>
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>OBJECTTYPE.value</name>
<recordfield>APPOINTMENTLINK.OBJECT_TYPE</recordfield>
</dbRecordFieldMapping>
</recordFieldMappings>
</dbRecordContainer>
</recordContainers>
</entity>
import("system.db");
import("system.result");
import("Sql_lib");
var cond = SqlCondition.begin()
.andPrepareVars("APPOINTMENTLINK.APPOINTMENT_ID", "$param.AppointmentId_param")
//TODO: use a preparedCondition when available
result.string(db.translateCondition(cond.build("1 = 1")));
\ No newline at end of file
......@@ -32,6 +32,7 @@
<name>ATTRIBUTERELATION_VALUE</name>
<title>Value</title>
<contentTypeProcess>%aditoprj%/entity/AttributeRelation_entity/entityfields/attributerelation_value/contentTypeProcess.js</contentTypeProcess>
<resolution>DAY</resolution>
<valueProcess>%aditoprj%/entity/AttributeRelation_entity/entityfields/attributerelation_value/valueProcess.js</valueProcess>
<onValueChange>%aditoprj%/entity/AttributeRelation_entity/entityfields/attributerelation_value/onValueChange.js</onValueChange>
</entityField>
......
import("system.logging");
import("system.vars");
import("system.result");
import("Attribute_lib");
var attrType = AttributeHandler.begin(vars.get("$field.AB_ATTRIBUTE_ID")).getAttributeContentType();
logging.log("type is " + attrType)
result.string(attrType);
\ No newline at end of file
......@@ -18,8 +18,8 @@
<entityField>
<name>ATTRIBUTE_TYPE</name>
<title>Type</title>
<consumer>KeywordAttributeType</consumer>
<mandatory v="true" />
<possibleItemsProcess>%aditoprj%/entity/Attribute_entity/entityfields/attribute_type/possibleItemsProcess.js</possibleItemsProcess>
</entityField>
<entityField>
<name>AB_ATTRIBUTEID</name>
......@@ -73,6 +73,21 @@
<possibleItemsProcess>%aditoprj%/entity/Attribute_entity/entityfields/attribute_active/possibleItemsProcess.js</possibleItemsProcess>
<valueProcess>%aditoprj%/entity/Attribute_entity/entityfields/attribute_active/valueProcess.js</valueProcess>
</entityField>
<entityConsumer>
<name>KeywordAttributeType</name>
<fieldType>DEPENDENCY_OUT</fieldType>
<dependency>
<name>dependency</name>
<entityName>KeywordEntry_entity</entityName>
<fieldName>SpecificContainerKeywords</fieldName>
</dependency>
<children>
<entityParameter>
<name>containerName_param</name>
<code>%aditoprj%/entity/Attribute_entity/entityfields/keywordattributetype/children/containername_param/code.js</code>
</entityParameter>
</children>
</entityConsumer>
</entityFields>
<recordContainers>
<dbRecordContainer>
......@@ -109,6 +124,10 @@
<name>ATTRIBUTE_ACTIVE.value</name>
<recordfield>AB_ATTRIBUTE.ATTRIBUTE_ACTIVE</recordfield>
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>ATTRIBUTE_TYPE.displayValue</name>
<expression>%aditoprj%/entity/Attribute_entity/recordcontainers/db/recordfieldmappings/attribute_type.displayvalue/expression.js</expression>
</dbRecordFieldMapping>
</recordFieldMappings>
</dbRecordContainer>
</recordContainers>
......
import("system.result");
import("Attribute_lib");
result.object(AttributeTypes.getTypeList());
\ No newline at end of file
import("system.result");
import("Keyword_lib");
result.string($KeywordRegistry.get.AttributeType);
\ No newline at end of file
import("system.result");
import("Keyword_lib");
var sql = KeywordUtils.getResolvedTitleSqlPart($KeywordRegistry.get.AttributeType, "AB_ATTRIBUTE.ATTRIBUTE_TYPE");
result.string(sql);
\ No newline at end of file
......@@ -15,18 +15,22 @@
</entityField>
<entityField>
<name>CHAR_VALUE</name>
<title>CHAR_VALUE</title>
</entityField>
<entityField>
<name>NUMBER_VALUE</name>
<contentType>NUMBER</contentType>
</entityField>
<entityField>
<name>BOOL_VALUE</name>
<contentType>BOOLEAN</contentType>
</entityField>
<entityField>
<name>AB_KEYWORD_ATTRIBUTE_ID</name>
<title>Keyword Attribute</title>
<consumer>KeywordAttributes</consumer>
<mandatory v="true" />
<onValueChange>%aditoprj%/entity/KeywordAttributeRelation_entity/entityfields/ab_keyword_attribute_id/onValueChange.js</onValueChange>
</entityField>
<entityField>
<name>AB_KEYWORD_ENTRY_ID</name>
......@@ -34,7 +38,7 @@
<valueProcess>%aditoprj%/entity/KeywordAttributeRelation_entity/entityfields/ab_keyword_entry_id/valueProcess.js</valueProcess>
</entityField>
<entityProvider>
<name>SpecificContainer</name>
<name>AttributesForKeywordEntry</name>
<fieldType>DEPENDENCY_IN</fieldType>
<title></title>
<recordContainer>db</recordContainer>
......@@ -49,8 +53,9 @@
</entityProvider>
<entityParameter>
<name>containerName_param</name>
<expose v="true" />
<code>%aditoprj%/entity/KeywordAttributeRelation_entity/entityfields/containername_param/code.js</code>
<triggerRecalculation v="true" />
<mandatory v="false" />
<description>PARAMETER</description>
</entityParameter>
<entityConsumer>
......@@ -73,25 +78,33 @@
</children>
</entityConsumer>
<entityParameter>
<name>keywordEntry_param</name>
<name>keywordEntryId_param</name>
<expose v="true" />
<triggerRecalculation v="true" />
<mandatory v="true" />
<description>PARAMETER</description>
</entityParameter>
<entityField>
<name>VALUE_PROXY</name>
<documentation>%aditoprj%/entity/KeywordAttributeRelation_entity/entityfields/value_proxy/documentation.adoc</documentation>
<valueProcess>%aditoprj%/entity/KeywordAttributeRelation_entity/entityfields/value_proxy/valueProcess.js</valueProcess>
<name>valueProxy</name>
<documentation>%aditoprj%/entity/KeywordAttributeRelation_entity/entityfields/valueproxy/documentation.adoc</documentation>
<title>Value</title>
<contentTypeProcess>%aditoprj%/entity/KeywordAttributeRelation_entity/entityfields/valueproxy/contentTypeProcess.js</contentTypeProcess>
<valueProcess>%aditoprj%/entity/KeywordAttributeRelation_entity/entityfields/valueproxy/valueProcess.js</valueProcess>
<onValueChange>%aditoprj%/entity/KeywordAttributeRelation_entity/entityfields/valueproxy/onValueChange.js</onValueChange>
</entityField>
<entityField>
<name>attributeType</name>
<valueProcess>%aditoprj%/entity/KeywordAttributeRelation_entity/entityfields/attributetype/valueProcess.js</valueProcess>
</entityField>
</entityFields>
<recordContainers>
<dbRecordContainer>
<name>db</name>
<alias>Data_alias</alias>
<conditionProcess>%aditoprj%/entity/KeywordAttributeRelation_entity/recordcontainers/db/conditionProcess.js</conditionProcess>
<linkInformation>
<linkInformation>
<name>a52883ee-630c-4373-a4ad-9b1e8c3e8188</name>
<name>8e2938d2-e14b-403b-8ae5-875f70bc3f85</name>
<tableName>AB_KEYWORD_ATTRIBUTERELATION</tableName>
<primaryKey>AB_KEYWORD_ATTRIBUTERELATIONID</primaryKey>
<isUIDTable v="true" />
......
import("system.vars");
vars.set("$field.CHAR_VALUE", "");
vars.set("$field.BOOL_VALUE", "");
vars.set("$field.NUMBER_VALUE", "");
\ No newline at end of file
......@@ -3,6 +3,6 @@ import("system.result");
import("system.neon");
import("system.vars");
var keywordEntryId = vars.get("$param.keywordEntry_param");
var keywordEntryId = vars.get("$param.keywordEntryId_param");
if(keywordEntryId && vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW)
result.string(keywordEntryId);
\ No newline at end of file
import("system.db");
import("system.result");
import("system.vars");
import("Sql_lib");
var id = vars.get("$field.AB_KEYWORD_ATTRIBUTE_ID");
var type = null;
if (id)
{
type = db.cell(SqlCondition.begin()
.andPrepare("AB_KEYWORD_ATTRIBUTE.AB_KEYWORD_ATTRIBUTEID", id)
.buildSql("select AB_KEYWORD_ATTRIBUTE.TYPE from AB_KEYWORD_ATTRIBUTE"));
type = type.trim();
}
result.string(type);
\ No newline at end of file
import("system.db");
import("system.result");
import("system.vars");
import("Sql_lib");
var entryId = vars.get("$param.keywordEntryId_param");
var containerName = db.cell(SqlCondition.begin().andPrepare("AB_KEYWORD_ENTRY.AB_KEYWORD_ENTRYID", entryId)
.buildSql("select AB_KEYWORD_ENTRY.CONTAINER from AB_KEYWORD_ENTRY"));
result.string(containerName);
\ No newline at end of file
import("system.result");
import("system.vars");
var type = vars.get("$field.attributeType");
switch(type)
{
case "BOOL_VALUE":
contentType = "BOOLEAN";
break;
case "NUMBER_VALUE":
contentType = "NUMBER";
break;
case "CHAR_VALUE":
contentType = "TEXT";
break;
default:
contentType = "UNKNOWN";
break;
}
result.string(contentType);
\ No newline at end of file
import("system.result");
import("system.vars");
import("Entity_lib");
var type = vars.get("$field.attributeType");
var value = ProcessHandlingUtils.getOnValidationValue(vars.get("$field.valueProxy"));
switch (type)
{
case "BOOL_VALUE":
vars.set("$field.BOOL_VALUE", value);
break;
case "NUMBER_VALUE":
vars.set("$field.NUMBER_VALUE", value);
break;
case "CHAR_VALUE":
vars.set("$field.CHAR_VALUE", value);
break;
}
import("system.result");
import("system.vars");
var type = vars.get("$field.attributeType");
var value;
switch (type)
{
case "BOOL_VALUE":
value = vars.get("$field.BOOL_VALUE");
break;
case "NUMBER_VALUE":
value = vars.get("$field.NUMBER_VALUE");
break;
case "CHAR_VALUE":
value = vars.get("$field.CHAR_VALUE");
break;
default:
value = null;
break;
}
result.string(value);
\ No newline at end of file
import("system.db");
import("system.vars");
import("system.vars");
import("system.result");
import("Sql_lib");
var cond = SqlCondition.begin().andPrepareVars("AB_KEYWORD_ATTRIBUTERELATION.AB_KEYWORD_ENTRY_ID", "$param.keywordEntryId_param");
var condStr = db.translateCondition(cond.build("1 = 2"));
result.string(condStr);
\ No newline at end of file
......@@ -232,6 +232,12 @@
<fieldName>KeywordKeywordAttributeTypes</fieldName>
<isConsumer v="false" />
</entityDependency>
<entityDependency>
<name>078bbd52-87fa-44cc-9902-04af935b5fbc</name>
<entityName>Attribute_entity</entityName>
<fieldName>KeywordAttributeType</fieldName>
<isConsumer v="false" />
</entityDependency>
</dependencies>
<children>
<entityParameter>
......@@ -259,16 +265,12 @@
<dependency>
<name>dependency</name>
<entityName>KeywordAttributeRelation_entity</entityName>
<fieldName>SpecificContainer</fieldName>
<fieldName>AttributesForKeywordEntry</fieldName>
</dependency>
<children>
<entityParameter>
<name>containerName_param</name>
<code>%aditoprj%/entity/KeywordEntry_entity/entityfields/keywordattributerelations/children/containername_param/code.js</code>
</entityParameter>
<entityParameter>
<name>keywordEntry_param</name>
<code>%aditoprj%/entity/KeywordEntry_entity/entityfields/keywordattributerelations/children/keywordentry_param/code.js</code>
<name>keywordEntryId_param</name>
<code>%aditoprj%/entity/KeywordEntry_entity/entityfields/keywordattributerelations/children/keywordentryid_param/code.js</code>
</entityParameter>
</children>
</entityConsumer>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment