Skip to content
Snippets Groups Projects
Commit 06b06bdf authored by Mohamed Mansour's avatar Mohamed Mansour
Browse files

merged origin/master into ActivityThemes

parents c9564014 2c66b3a1
No related branches found
No related tags found
No related merge requests found
Showing
with 1120 additions and 1077 deletions
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
<majorModelMode>DISTRIBUTED</majorModelMode> <majorModelMode>DISTRIBUTED</majorModelMode>
<documentation>%aditoprj%/entity/Activity_entity/documentation.adoc</documentation> <documentation>%aditoprj%/entity/Activity_entity/documentation.adoc</documentation>
<title>Activity</title> <title>Activity</title>
<grantDeleteProcess>%aditoprj%/entity/Activity_entity/grantDeleteProcess.js</grantDeleteProcess>
<contentTitleProcess>%aditoprj%/entity/Activity_entity/contentTitleProcess.js</contentTitleProcess> <contentTitleProcess>%aditoprj%/entity/Activity_entity/contentTitleProcess.js</contentTitleProcess>
<afterUiInit>%aditoprj%/entity/Activity_entity/afterUiInit.js</afterUiInit> <afterUiInit>%aditoprj%/entity/Activity_entity/afterUiInit.js</afterUiInit>
<iconId>VAADIN:HOURGLASS_END</iconId> <iconId>VAADIN:HOURGLASS_END</iconId>
...@@ -114,6 +115,10 @@ ...@@ -114,6 +115,10 @@
<name>AssignmentTable_param</name> <name>AssignmentTable_param</name>
<valueProcess>%aditoprj%/entity/Activity_entity/entityfields/documents/children/assignmenttable_param/valueProcess.js</valueProcess> <valueProcess>%aditoprj%/entity/Activity_entity/entityfields/documents/children/assignmenttable_param/valueProcess.js</valueProcess>
</entityParameter> </entityParameter>
<entityParameter>
<name>AssignmentName_param</name>
<valueProcess>%aditoprj%/entity/Activity_entity/entityfields/documents/children/assignmentname_param/valueProcess.js</valueProcess>
</entityParameter>
</children> </children>
</entityConsumer> </entityConsumer>
<entityConsumer> <entityConsumer>
......
import("Document_lib");
import("system.vars");
import("system.result");
result.string(!DocumentUtil.hasDocuments("ACTIVITY", null, vars.get("$field.ACTIVITYID")));
\ No newline at end of file
import("system.translate"); import("system.translate");
import("Context_lib"); import("Context_lib");
import("system.vars"); import("system.vars");
import("system.result"); import("system.result");
import("Keyword_lib"); import("Keyword_lib");
import("Attribute_lib"); import("Attribute_lib");
var res = []; var res = [];
var type = vars.get("$field.ATTRIBUTE_TYPE").trim(); var type = vars.get("$field.ATTRIBUTE_TYPE").trim();
var getDropDownFn = type && $AttributeTypes[type] && $AttributeTypes[type].getDropDownDefinitions; var getDropDownFn = type && $AttributeTypes[type] && $AttributeTypes[type].getDropDownDefinitions;
if (getDropDownFn instanceof Function) if (getDropDownFn instanceof Function)
res = getDropDownFn.call(); res = getDropDownFn.call();
result.object(res); result.object(res);
import("system.translate"); import("system.translate");
import("system.neon"); import("system.neon");
import("system.vars"); import("system.vars");
import("system.result"); import("system.result");
import("Attribute_lib"); import("Attribute_lib");
var type = vars.get("$field.ATTRIBUTE_TYPE").trim(); var type = vars.get("$field.ATTRIBUTE_TYPE").trim();
if (type == $AttributeTypes.KEYWORD) if (type == $AttributeTypes.KEYWORD)
result.string(translate.text("Keyword")); result.string(translate.text("Keyword"));
else if (type == $AttributeTypes.OBJECTSELECTION) else if (type == $AttributeTypes.OBJECTSELECTION)
result.string(translate.text("Module")); result.string(translate.text("Module"));
import("system.translate"); import("system.translate");
import("system.neon"); import("system.neon");
import("system.vars"); import("system.vars");
import("system.result"); import("system.result");
import("Attribute_lib"); import("Attribute_lib");
var type = vars.get("$field.ATTRIBUTE_TYPE").trim(); var type = vars.get("$field.ATTRIBUTE_TYPE").trim();
if (type == $AttributeTypes.KEYWORD) if (type == $AttributeTypes.KEYWORD)
result.string(translate.text("Keyword")); result.string(translate.text("Keyword"));
else if (type == $AttributeTypes.OBJECTSELECTION) else if (type == $AttributeTypes.OBJECTSELECTION)
result.string(translate.text("Module")); result.string(translate.text("Module"));
import("system.translate"); import("system.translate");
import("Util_lib"); import("Util_lib");
import("JditoFilter_lib"); import("JditoFilter_lib");
import("KeywordRegistry_basic"); import("KeywordRegistry_basic");
import("Keyword_lib"); import("Keyword_lib");
import("system.db"); import("system.db");
import("system.vars"); import("system.vars");
import("system.result"); import("system.result");
import("Sql_lib"); import("Sql_lib");
import("Attribute_lib"); import("Attribute_lib");
var getGroups = vars.exists("$param.GetGroups_param") && vars.get("$param.GetGroups_param"); var getGroups = vars.exists("$param.GetGroups_param") && vars.get("$param.GetGroups_param");
var objectType = vars.exists("$param.ObjectType_param") && vars.get("$param.ObjectType_param"); var objectType = vars.exists("$param.ObjectType_param") && vars.get("$param.ObjectType_param");
var parentType = vars.exists("$param.AttrParentType_param") && vars.get("$param.AttrParentType_param"); var parentType = vars.exists("$param.AttrParentType_param") && vars.get("$param.AttrParentType_param");
var fetchUsages = true; var fetchUsages = true;
var translateName = false; var translateName = false;
var sqlSelect = "select AB_ATTRIBUTEID, ATTRIBUTE_PARENT_ID, ATTRIBUTE_NAME, ATTRIBUTE_ACTIVE, DROPDOWNDEFINITION, DROPDOWNFILTER, SORTING, ATTRIBUTE_TYPE, " var sqlSelect = "select AB_ATTRIBUTEID, ATTRIBUTE_PARENT_ID, ATTRIBUTE_NAME, ATTRIBUTE_ACTIVE, DROPDOWNDEFINITION, DROPDOWNFILTER, SORTING, ATTRIBUTE_TYPE, "
+ KeywordUtils.getResolvedTitleSqlPart($KeywordRegistry.attributeType(), "ATTRIBUTE_TYPE") //3 + KeywordUtils.getResolvedTitleSqlPart($KeywordRegistry.attributeType(), "ATTRIBUTE_TYPE") //3
+ ", '', '', '' from AB_ATTRIBUTE"; + ", '', '', '' from AB_ATTRIBUTE";
var sqlOrder = " order by ATTRIBUTE_PARENT_ID asc, SORTING asc"; var sqlOrder = " order by ATTRIBUTE_PARENT_ID asc, SORTING asc";
var condition = SqlCondition.begin(); var condition = SqlCondition.begin();
if (vars.exists("$local.idvalues") && vars.get("$local.idvalues")) if (vars.exists("$local.idvalues") && vars.get("$local.idvalues"))
{ {
condition.andIn("AB_ATTRIBUTE.AB_ATTRIBUTEID", vars.get("$local.idvalues")); condition.andIn("AB_ATTRIBUTE.AB_ATTRIBUTEID", vars.get("$local.idvalues"));
} }
else if (getGroups) //if getGroups == true, it is the lookup for selecting the superordinate attribute else if (getGroups) //if getGroups == true, it is the lookup for selecting the superordinate attribute
{ {
//this condition filters out the own id and the children to prevent loops //this condition filters out the own id and the children to prevent loops
var isGroupCondition = SqlCondition.begin(); var isGroupCondition = SqlCondition.begin();
for (let type in $AttributeTypes) for (let type in $AttributeTypes)
if ($AttributeTypes[type].isGroup) if ($AttributeTypes[type].isGroup)
{ {
isGroupCondition.orPrepare("AB_ATTRIBUTE.ATTRIBUTE_TYPE", $AttributeTypes[type]); isGroupCondition.orPrepare("AB_ATTRIBUTE.ATTRIBUTE_TYPE", $AttributeTypes[type]);
} }
condition.andSqlCondition(SqlCondition.begin() condition.andSqlCondition(SqlCondition.begin()
.andSqlCondition(isGroupCondition) .andSqlCondition(isGroupCondition)
.andPrepareVars("AB_ATTRIBUTE.AB_ATTRIBUTEID", "$param.AttrParentId_param", "# != ?") .andPrepareVars("AB_ATTRIBUTE.AB_ATTRIBUTEID", "$param.AttrParentId_param", "# != ?")
.andIn("AB_ATTRIBUTE.AB_ATTRIBUTEID", AttributeUtil.getAllChildren(vars.getString("$param.AttrParentId_param")), null, true) .andIn("AB_ATTRIBUTE.AB_ATTRIBUTEID", AttributeUtil.getAllChildren(vars.getString("$param.AttrParentId_param")), null, true)
); );
} }
else if (objectType) //if there's an objectType, it comes from the AttributeRelation entity (lookup for the attribute selection) else if (objectType) //if there's an objectType, it comes from the AttributeRelation entity (lookup for the attribute selection)
{ {
var filteredAttributes = null; var filteredAttributes = null;
if (vars.exists("$param.AttributeTypes_param") && vars.getString("$param.AttributeTypes_param")) if (vars.exists("$param.AttributeTypes_param") && vars.getString("$param.AttributeTypes_param"))
condition.andIn("AB_ATTRIBUTE.ATTRIBUTE_TYPE", JSON.parse(vars.getString("$param.AttributeTypes_param"))); condition.andIn("AB_ATTRIBUTE.ATTRIBUTE_TYPE", JSON.parse(vars.getString("$param.AttributeTypes_param")));
if (vars.exists("$param.FilteredAttributeIds_param") && vars.getString("$param.FilteredAttributeIds_param")) if (vars.exists("$param.FilteredAttributeIds_param") && vars.getString("$param.FilteredAttributeIds_param"))
filteredAttributes = JSON.parse(vars.getString("$param.FilteredAttributeIds_param")); filteredAttributes = JSON.parse(vars.getString("$param.FilteredAttributeIds_param"));
var attributeCount; var attributeCount;
if (vars.exists("$param.AttributeCount_param") && vars.get("$param.AttributeCount_param")) if (vars.exists("$param.AttributeCount_param") && vars.get("$param.AttributeCount_param"))
attributeCount = JSON.parse(vars.getString("$param.AttributeCount_param")); attributeCount = JSON.parse(vars.getString("$param.AttributeCount_param"));
var ids = AttributeUtil.getPossibleAttributes(objectType, false, filteredAttributes, attributeCount); var ids = AttributeUtil.getPossibleAttributes(objectType, false, filteredAttributes, attributeCount);
if (ids.length > 0) if (ids.length > 0)
condition.andIn("AB_ATTRIBUTE.AB_ATTRIBUTEID", ids); condition.andIn("AB_ATTRIBUTE.AB_ATTRIBUTEID", ids);
else // do not return anything, if parameter is there but an empty array else // do not return anything, if parameter is there but an empty array
condition.and("1=2"); condition.and("1=2");
fetchUsages = false; fetchUsages = false;
translateName = true; translateName = true;
} }
else if (parentType) //condition for all subordinate attributes of an attribute (for the tree of subordinate attributes in an attribute) else if (parentType) //condition for all subordinate attributes of an attribute (for the tree of subordinate attributes in an attribute)
{ {
if (AttributeTypeUtil.isGroupType(parentType)) if (AttributeTypeUtil.isGroupType(parentType))
{ {
var parentId = vars.exists("$param.AttrParentId_param") && vars.get("$param.AttrParentId_param"); var parentId = vars.exists("$param.AttrParentId_param") && vars.get("$param.AttrParentId_param");
if (parentId) if (parentId)
condition.andIn("AB_ATTRIBUTE.AB_ATTRIBUTEID", AttributeUtil.getAllChildren(vars.getString("$param.AttrParentId_param"))); condition.andIn("AB_ATTRIBUTE.AB_ATTRIBUTEID", AttributeUtil.getAllChildren(vars.getString("$param.AttrParentId_param")));
} }
else else
condition.and("1=2"); condition.and("1=2");
translateName = true; translateName = true;
} }
//when there are filters selected, add them to the conditon //when there are filters selected, add them to the conditon
if (vars.exists("$local.filter") && vars.get("$local.filter")) if (vars.exists("$local.filter") && vars.get("$local.filter"))
{ {
var filter = vars.get("$local.filter"); var filter = vars.get("$local.filter");
if (filter.filter) if (filter.filter)
condition.andSqlCondition(JditoFilterUtils.getSqlCondition(filter.filter, "AB_ATTRIBUTE")); condition.andSqlCondition(JditoFilterUtils.getSqlCondition(filter.filter, "AB_ATTRIBUTE"));
} }
var usages; var usages;
if (fetchUsages) //this query is only necessary in Attribute, not in AttributeRelation if (fetchUsages) //this query is only necessary in Attribute, not in AttributeRelation
{ {
var usagesSelect = "select AB_ATTRIBUTE_ID, OBJECT_TYPE from AB_ATTRIBUTEUSAGE \n\ var usagesSelect = "select AB_ATTRIBUTE_ID, OBJECT_TYPE from AB_ATTRIBUTEUSAGE \n\
join AB_ATTRIBUTE on AB_ATTRIBUTEUSAGE.AB_ATTRIBUTE_ID = AB_ATTRIBUTE.AB_ATTRIBUTEID"; join AB_ATTRIBUTE on AB_ATTRIBUTEUSAGE.AB_ATTRIBUTE_ID = AB_ATTRIBUTE.AB_ATTRIBUTEID";
var usageTbl = db.table(condition.buildSql(usagesSelect, "1=1")); var usageTbl = db.table(condition.buildSql(usagesSelect, "1=1"));
usages = {}; usages = {};
for (let i = 0, l = usageTbl.length; i < l; i++) for (let i = 0, l = usageTbl.length; i < l; i++)
{ {
let attrId = usageTbl[i][0]; let attrId = usageTbl[i][0];
if (attrId in usages) if (attrId in usages)
usages[attrId].push(usageTbl[i][1]); usages[attrId].push(usageTbl[i][1]);
else else
usages[attrId] = [usageTbl[i][1]]; usages[attrId] = [usageTbl[i][1]];
} }
} }
var attributes = db.table(condition.buildSql(sqlSelect, "1=1", sqlOrder)); var attributes = db.table(condition.buildSql(sqlSelect, "1=1", sqlOrder));
var allNames = db.table("select AB_ATTRIBUTEID, ATTRIBUTE_PARENT_ID, ATTRIBUTE_NAME from AB_ATTRIBUTE"); var allNames = db.table("select AB_ATTRIBUTEID, ATTRIBUTE_PARENT_ID, ATTRIBUTE_NAME from AB_ATTRIBUTE");
var attrNameData = {}; var attrNameData = {};
for (let i = 0, l = allNames.length; i < l; i++) for (let i = 0, l = allNames.length; i < l; i++)
{ {
attrNameData[allNames[i][0]] = [ attrNameData[allNames[i][0]] = [
allNames[i][1], allNames[i][1],
translateName translateName
? translate.text(allNames[i][2]) ? translate.text(allNames[i][2])
: allNames[i][2] : allNames[i][2]
]; ];
} }
var nameCache = {}; var nameCache = {};
result.object(_buildAttributeTable(attributes, usages)); result.object(_buildAttributeTable(attributes, usages));
//sorts the records in a way that a tree can be built and adds values //sorts the records in a way that a tree can be built and adds values
function _buildAttributeTable (pAttributes, pUsages) function _buildAttributeTable (pAttributes, pUsages)
{ {
var rows = {}; var rows = {};
var allIds = {}; var allIds = {};
//fills the allIds object, the object is used for checking if a parent exists in the array //fills the allIds object, the object is used for checking if a parent exists in the array
for (let i = 0, l = pAttributes.length; i < l; i++) for (let i = 0, l = pAttributes.length; i < l; i++)
allIds[pAttributes[i][0]] = true; allIds[pAttributes[i][0]] = true;
var arrayIndex = 0; var arrayIndex = 0;
do { do {
var oldIndex = arrayIndex; var oldIndex = arrayIndex;
pAttributes.forEach(function (row) pAttributes.forEach(function (row)
{ {
//item will be added if the id is not already in the object and //item will be added if the id is not already in the object and
//the parent is already added (or the parent is not in the array) //the parent is already added (or the parent is not in the array)
if (!(row[0] in this) && (row[1] in this || !allIds[row[1]])) if (!(row[0] in this) && (row[1] in this || !allIds[row[1]]))
this[row[0]] = { this[row[0]] = {
data : row, data : row,
index : arrayIndex++ index : arrayIndex++
}; };
}, rows); }, rows);
} while (oldIndex != arrayIndex); //stops the loop when no new items were added so that recursive relations between attributes don't cause an infinite loop } while (oldIndex != arrayIndex); //stops the loop when no new items were added so that recursive relations between attributes don't cause an infinite loop
var displaySimpleName = vars.exists("$param.DisplaySimpleName_param") && vars.get("$param.DisplaySimpleName_param"); var displaySimpleName = vars.exists("$param.DisplaySimpleName_param") && vars.get("$param.DisplaySimpleName_param");
var sortedArray = new Array(Object.keys(rows).length); var sortedArray = new Array(Object.keys(rows).length);
for (let i in rows) for (let i in rows)
{ {
let rowData = rows[i].data; let rowData = rows[i].data;
if (pUsages && rowData[7].trim() != $AttributeTypes.COMBOVALUE && i in pUsages) if (pUsages && rowData[7].trim() != $AttributeTypes.COMBOVALUE && i in pUsages)
{ {
rowData[9] = pUsages[i].map(function (usage) rowData[9] = pUsages[i].map(function (usage)
{ {
return translate.text(usage); return translate.text(usage);
}).join(", "); }).join(", ");
} }
rowData[10] = _getFullName(rowData[1]); //parent full name rowData[10] = _getFullName(rowData[1]); //parent full name
rowData[11] = _getFullName(rowData[0], displaySimpleName); rowData[11] = _getFullName(rowData[0], displaySimpleName);
sortedArray[rows[i].index] = rowData; sortedArray[rows[i].index] = rowData;
} }
return sortedArray; return sortedArray;
/** /**
* builds the full attribute name from the pre-loaded parent names and adds all parent names * builds the full attribute name from the pre-loaded parent names and adds all parent names
* if required * if required
*/ */
function _getFullName (pAttributeId, pSimpleName) function _getFullName (pAttributeId, pSimpleName)
{ {
if (!pAttributeId) if (!pAttributeId)
return ""; return "";
var attrId = pAttributeId; var attrId = pAttributeId;
var fullName = []; var fullName = [];
while (attrId) while (attrId)
{ {
let name = null; let name = null;
if (attrId in nameCache) if (attrId in nameCache)
{ {
name = nameCache[attrId]; name = nameCache[attrId];
attrId = null; attrId = null;
} }
else if (attrId in attrNameData) else if (attrId in attrNameData)
{ {
name = attrNameData[attrId][1]; name = attrNameData[attrId][1];
attrId = attrNameData[attrId][0]; //next parent attrId = attrNameData[attrId][0]; //next parent
} }
else else
attrId = null; attrId = null;
if (name) if (name)
fullName.unshift(name); fullName.unshift(name);
if (pSimpleName) if (pSimpleName)
break; break;
} }
fullName = fullName.join(" / "); fullName = fullName.join(" / ");
nameCache[pAttributeId] = fullName; nameCache[pAttributeId] = fullName;
return fullName; return fullName;
} }
} }
import("Sql_lib"); import("system.logging");
import("system.db"); import("Sql_lib");
import("system.vars"); import("system.db");
import("system.vars");
var rowdata = vars.get("$local.rowdata");
var columns = [ var rowdata = vars.get("$local.rowdata");
"ATTRIBUTE_ACTIVE", var columns = [
"ATTRIBUTE_NAME", "ATTRIBUTE_ACTIVE",
"ATTRIBUTE_PARENT_ID", "ATTRIBUTE_NAME",
"ATTRIBUTE_TYPE", "ATTRIBUTE_PARENT_ID",
"DROPDOWNDEFINITION", "ATTRIBUTE_TYPE",
"DROPDOWNFILTER", "DROPDOWNDEFINITION",
"SORTING" "DROPDOWNFILTER",
]; "SORTING"
var values = [ ];
rowdata["ATTRIBUTE_ACTIVE.value"] || "", var values = [
rowdata["ATTRIBUTE_NAME.value"] || "", rowdata["ATTRIBUTE_ACTIVE.value"] || "",
rowdata["ATTRIBUTE_PARENT_ID.value"] || "", rowdata["ATTRIBUTE_NAME.value"] || "",
rowdata["ATTRIBUTE_TYPE.value"] || "", rowdata["ATTRIBUTE_PARENT_ID.value"] || "",
rowdata["DROPDOWNDEFINITION.value"] || "", rowdata["ATTRIBUTE_TYPE.value"] || "",
rowdata["DROPDOWNFILTER.value"] || "", rowdata["DROPDOWNDEFINITION.value"] || "",
rowdata["SORTING.value"] || "" rowdata["DROPDOWNFILTER.value"] || "",
]; rowdata["SORTING.value"] || ""
];
db.updateData("AB_ATTRIBUTE", columns, null, values, logging.log(JSON.stringify(values, null, "\t"))
db.updateData("AB_ATTRIBUTE", columns, null, values,
SqlCondition.equals("AB_ATTRIBUTE.AB_ATTRIBUTEID", vars.get("$field.UID"), "1=2")); SqlCondition.equals("AB_ATTRIBUTE.AB_ATTRIBUTEID", vars.get("$field.UID"), "1=2"));
\ No newline at end of file
import("system.neon");
import("Sql_lib"); import("Sql_lib");
import("system.vars"); import("system.vars");
import("system.db"); import("system.db");
...@@ -31,7 +32,8 @@ else ...@@ -31,7 +32,8 @@ else
_handleCondition(campaignId, conditionSourceTableName, participantCondition); _handleCondition(campaignId, conditionSourceTableName, participantCondition);
} }
if (!vars.exists("$param.currentCampaignId_param") || !vars.get("$param.currentCampaignId_param"))
neon.openContext("Campaign", "CampaignMain_view", [campaignId], neon.OPERATINGSTATE_VIEW, null);
function _handleCondition(pCampaignId, pTargetTableName, pCondition) function _handleCondition(pCampaignId, pTargetTableName, pCondition)
{ {
......
This diff is collapsed.
import("Context_lib");
import("system.vars");
import("ActivityTask_lib");
import("system.result");
result.string(!TaskUtils.hasTasks(vars.get("$field.CAMPAIGNSTEPID"), ContextUtils.getCurrentContextId())
&& !ActivityUtils.hasActivities(vars.get("$field.CAMPAIGNSTEPID"), ContextUtils.getCurrentContextId()));
\ No newline at end of file
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
<element>CampaignCostChart_entity</element> <element>CampaignCostChart_entity</element>
<element>CampaignStep_entity</element> <element>CampaignStep_entity</element>
</siblings> </siblings>
<grantDeleteProcess>%aditoprj%/entity/Campaign_entity/grantDeleteProcess.js</grantDeleteProcess>
<contentTitleProcess>%aditoprj%/entity/Campaign_entity/contentTitleProcess.js</contentTitleProcess> <contentTitleProcess>%aditoprj%/entity/Campaign_entity/contentTitleProcess.js</contentTitleProcess>
<afterUiInit>%aditoprj%/entity/Campaign_entity/afterUiInit.js</afterUiInit> <afterUiInit>%aditoprj%/entity/Campaign_entity/afterUiInit.js</afterUiInit>
<iconId>VAADIN:GROUP</iconId> <iconId>VAADIN:GROUP</iconId>
......
import("Context_lib");
import("ActivityTask_lib");
import("Document_lib");
import("system.vars");
import("system.result");
result.string(!DocumentUtil.hasDocuments("CAMPAIGN", null, vars.get("$field.CAMPAIGNID"))
&& !TaskUtils.hasTasks(vars.get("$field.CAMPAIGNID"), ContextUtils.getCurrentContextId())
&& !ActivityUtils.hasActivities(vars.get("$field.CAMPAIGNID"), ContextUtils.getCurrentContextId()));
\ No newline at end of file
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
<majorModelMode>DISTRIBUTED</majorModelMode> <majorModelMode>DISTRIBUTED</majorModelMode>
<documentation>%aditoprj%/entity/Contract_entity/documentation.adoc</documentation> <documentation>%aditoprj%/entity/Contract_entity/documentation.adoc</documentation>
<title>Contract</title> <title>Contract</title>
<grantDeleteProcess>%aditoprj%/entity/Contract_entity/grantDeleteProcess.js</grantDeleteProcess>
<contentTitleProcess>%aditoprj%/entity/Contract_entity/contentTitleProcess.js</contentTitleProcess> <contentTitleProcess>%aditoprj%/entity/Contract_entity/contentTitleProcess.js</contentTitleProcess>
<afterUiInit>%aditoprj%/entity/Contract_entity/afterUiInit.js</afterUiInit> <afterUiInit>%aditoprj%/entity/Contract_entity/afterUiInit.js</afterUiInit>
<onValidation>%aditoprj%/entity/Contract_entity/onValidation.js</onValidation> <onValidation>%aditoprj%/entity/Contract_entity/onValidation.js</onValidation>
......
import("Context_lib");
import("ActivityTask_lib");
import("Document_lib");
import("system.vars");
import("system.result");
result.string(!DocumentUtil.hasDocuments("CONTRACT", null, vars.get("$field.CONTRACTID"))
&& !TaskUtils.hasTasks(vars.get("$field.CONTRACTID"), ContextUtils.getCurrentContextId())
&& !ActivityUtils.hasActivities(vars.get("$field.CONTRACTID"), ContextUtils.getCurrentContextId()));
\ No newline at end of file
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
<name>Employee_entity</name> <name>Employee_entity</name>
<majorModelMode>DISTRIBUTED</majorModelMode> <majorModelMode>DISTRIBUTED</majorModelMode>
<title>Employee</title> <title>Employee</title>
<grantDeleteProcess>%aditoprj%/entity/Employee_entity/grantDeleteProcess.js</grantDeleteProcess>
<contentTitleProcess>%aditoprj%/entity/Employee_entity/contentTitleProcess.js</contentTitleProcess> <contentTitleProcess>%aditoprj%/entity/Employee_entity/contentTitleProcess.js</contentTitleProcess>
<afterUiInit>%aditoprj%/entity/Employee_entity/afterUiInit.js</afterUiInit> <afterUiInit>%aditoprj%/entity/Employee_entity/afterUiInit.js</afterUiInit>
<onValidation>%aditoprj%/entity/Employee_entity/onValidation.js</onValidation> <onValidation>%aditoprj%/entity/Employee_entity/onValidation.js</onValidation>
......
import("Employee_lib");
import("Document_lib");
import("system.vars");
import("system.result");
result.string(!DocumentUtil.hasDocuments("EMPLOYEE", null, EmployeeUtils.sliceUserId(vars.get("$field.UID"))));
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?> <?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.3.11" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.3.11"> <entity xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.3.11" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.3.11">
<name>KeywordAttributeRelation_entity</name> <name>KeywordAttributeRelation_entity</name>
<majorModelMode>DISTRIBUTED</majorModelMode> <majorModelMode>DISTRIBUTED</majorModelMode>
<documentation>%aditoprj%/entity/KeywordAttributeRelation_entity/documentation.adoc</documentation> <documentation>%aditoprj%/entity/KeywordAttributeRelation_entity/documentation.adoc</documentation>
<title>Keyword Attribute Values</title> <title>Keyword Attribute Values</title>
<titlePlural>Keyword Attribute Values</titlePlural> <titlePlural>Keyword Attribute Values</titlePlural>
<recordContainer>db</recordContainer> <recordContainer>db</recordContainer>
<entityFields> <entityFields>
<entityProvider> <entityProvider>
<name>#PROVIDER</name> <name>#PROVIDER</name>
</entityProvider> </entityProvider>
<entityField> <entityField>
<name>AB_KEYWORD_ATTRIBUTERELATIONID</name> <name>AB_KEYWORD_ATTRIBUTERELATIONID</name>
<mandatory v="true" /> <mandatory v="true" />
<valueProcess>%aditoprj%/entity/KeywordAttributeRelation_entity/entityfields/ab_keyword_attributerelationid/valueProcess.js</valueProcess> <valueProcess>%aditoprj%/entity/KeywordAttributeRelation_entity/entityfields/ab_keyword_attributerelationid/valueProcess.js</valueProcess>
</entityField> </entityField>
<entityField> <entityField>
<name>CHAR_VALUE</name> <name>CHAR_VALUE</name>
<title>CHAR_VALUE</title> <title>CHAR_VALUE</title>
</entityField> </entityField>
<entityField> <entityField>
<name>NUMBER_VALUE</name> <name>NUMBER_VALUE</name>
<contentType>NUMBER</contentType> <contentType>NUMBER</contentType>
</entityField> </entityField>
<entityField> <entityField>
<name>BOOL_VALUE</name> <name>BOOL_VALUE</name>
<contentType>BOOLEAN</contentType> <contentType>BOOLEAN</contentType>
</entityField> </entityField>
<entityField> <entityField>
<name>AB_KEYWORD_ATTRIBUTE_ID</name> <name>AB_KEYWORD_ATTRIBUTE_ID</name>
<title>Keyword Attribute</title> <title>Keyword Attribute</title>
<consumer>KeywordAttributes</consumer> <consumer>KeywordAttributes</consumer>
<mandatory v="true" /> <mandatory v="true" />
<displayValueProcess>%aditoprj%/entity/KeywordAttributeRelation_entity/entityfields/ab_keyword_attribute_id/displayValueProcess.js</displayValueProcess> <displayValueProcess>%aditoprj%/entity/KeywordAttributeRelation_entity/entityfields/ab_keyword_attribute_id/displayValueProcess.js</displayValueProcess>
<onValueChange>%aditoprj%/entity/KeywordAttributeRelation_entity/entityfields/ab_keyword_attribute_id/onValueChange.js</onValueChange> <onValueChange>%aditoprj%/entity/KeywordAttributeRelation_entity/entityfields/ab_keyword_attribute_id/onValueChange.js</onValueChange>
<onValueChangeTypes> <onValueChangeTypes>
<element>MASK</element> <element>MASK</element>
<element>PROCESS_SETVALUE</element> <element>PROCESS_SETVALUE</element>
</onValueChangeTypes> </onValueChangeTypes>
</entityField> </entityField>
<entityField> <entityField>
<name>AB_KEYWORD_ENTRY_ID</name> <name>AB_KEYWORD_ENTRY_ID</name>
<mandatory v="true" /> <mandatory v="true" />
<valueProcess>%aditoprj%/entity/KeywordAttributeRelation_entity/entityfields/ab_keyword_entry_id/valueProcess.js</valueProcess> <valueProcess>%aditoprj%/entity/KeywordAttributeRelation_entity/entityfields/ab_keyword_entry_id/valueProcess.js</valueProcess>
</entityField> </entityField>
<entityProvider> <entityProvider>
<name>AttributesForKeywordEntry</name> <name>AttributesForKeywordEntry</name>
<titlePlural></titlePlural> <titlePlural></titlePlural>
<recordContainer>db</recordContainer> <recordContainer>db</recordContainer>
<dependencies> <dependencies>
<entityDependency> <entityDependency>
<name>490d12c0-6ace-42e5-89e1-d40b25322161</name> <name>490d12c0-6ace-42e5-89e1-d40b25322161</name>
<entityName>KeywordEntry_entity</entityName> <entityName>KeywordEntry_entity</entityName>
<fieldName>KeywordAttributeRelations</fieldName> <fieldName>KeywordAttributeRelations</fieldName>
<isConsumer v="false" /> <isConsumer v="false" />
</entityDependency> </entityDependency>
<entityDependency> </dependencies>
<name>53b35858-7c81-429c-9e06-0362f567ad42</name> <children>
<entityName>KeywordEntry_entity</entityName> <entityParameter>
<fieldName>KeywordAttributeRelationsReadOnly</fieldName> <name>KeywordEntryId_param</name>
<isConsumer v="false" /> <expose v="true" />
</entityDependency> <mandatory v="false" />
</dependencies> </entityParameter>
<children> </children>
<entityParameter> </entityProvider>
<name>KeywordEntryId_param</name> <entityParameter>
<expose v="true" /> <name>ContainerName_param</name>
<mandatory v="false" /> <valueProcess>%aditoprj%/entity/KeywordAttributeRelation_entity/entityfields/containername_param/valueProcess.js</valueProcess>
</entityParameter> <mandatory v="false" />
</children> <description>PARAMETER</description>
</entityProvider> </entityParameter>
<entityParameter> <entityConsumer>
<name>ContainerName_param</name> <name>KeywordAttributes</name>
<valueProcess>%aditoprj%/entity/KeywordAttributeRelation_entity/entityfields/containername_param/valueProcess.js</valueProcess> <dependency>
<mandatory v="false" /> <name>dependency</name>
<description>PARAMETER</description> <entityName>KeywordAttribute_entity</entityName>
</entityParameter> <fieldName>SpecificContainerKeyword</fieldName>
<entityConsumer> </dependency>
<name>KeywordAttributes</name> <children>
<dependency> <entityParameter>
<name>dependency</name> <name>ContainerName_param</name>
<entityName>KeywordAttribute_entity</entityName> <valueProcess>%aditoprj%/entity/KeywordAttributeRelation_entity/entityfields/keywordattributes/children/containername_param/valueProcess.js</valueProcess>
<fieldName>SpecificContainerKeyword</fieldName> <expose v="false" />
</dependency> </entityParameter>
<children> <entityParameter>
<entityParameter> <name>FilterAlreadyUsedByEntryId_param</name>
<name>ContainerName_param</name> <valueProcess>%aditoprj%/entity/KeywordAttributeRelation_entity/entityfields/keywordattributes/children/filteralreadyusedbyentryid_param/valueProcess.js</valueProcess>
<valueProcess>%aditoprj%/entity/KeywordAttributeRelation_entity/entityfields/keywordattributes/children/containername_param/valueProcess.js</valueProcess> <expose v="false" />
<expose v="false" /> <documentation>%aditoprj%/entity/KeywordAttributeRelation_entity/entityfields/keywordattributes/children/filteralreadyusedbyentryid_param/documentation.adoc</documentation>
</entityParameter> </entityParameter>
<entityParameter> </children>
<name>FilterAlreadyUsedByEntryId_param</name> </entityConsumer>
<valueProcess>%aditoprj%/entity/KeywordAttributeRelation_entity/entityfields/keywordattributes/children/filteralreadyusedbyentryid_param/valueProcess.js</valueProcess> <entityParameter>
<expose v="false" /> <name>KeywordEntryId_param</name>
</entityParameter> <expose v="true" />
</children> <mandatory v="true" />
</entityConsumer> <description>PARAMETER</description>
<entityParameter> </entityParameter>
<name>KeywordEntryId_param</name> <entityField>
<expose v="true" /> <name>valueProxy</name>
<mandatory v="true" /> <documentation>%aditoprj%/entity/KeywordAttributeRelation_entity/entityfields/valueproxy/documentation.adoc</documentation>
<description>PARAMETER</description> <title>Value</title>
</entityParameter> <contentTypeProcess>%aditoprj%/entity/KeywordAttributeRelation_entity/entityfields/valueproxy/contentTypeProcess.js</contentTypeProcess>
<entityField> <mandatory v="true" />
<name>valueProxy</name> <valueProcess>%aditoprj%/entity/KeywordAttributeRelation_entity/entityfields/valueproxy/valueProcess.js</valueProcess>
<documentation>%aditoprj%/entity/KeywordAttributeRelation_entity/entityfields/valueproxy/documentation.adoc</documentation> <onValueChange>%aditoprj%/entity/KeywordAttributeRelation_entity/entityfields/valueproxy/onValueChange.js</onValueChange>
<title>Value</title> </entityField>
<contentTypeProcess>%aditoprj%/entity/KeywordAttributeRelation_entity/entityfields/valueproxy/contentTypeProcess.js</contentTypeProcess> <entityField>
<mandatory v="true" /> <name>attributeType</name>
<valueProcess>%aditoprj%/entity/KeywordAttributeRelation_entity/entityfields/valueproxy/valueProcess.js</valueProcess> <valueProcess>%aditoprj%/entity/KeywordAttributeRelation_entity/entityfields/attributetype/valueProcess.js</valueProcess>
<onValueChange>%aditoprj%/entity/KeywordAttributeRelation_entity/entityfields/valueproxy/onValueChange.js</onValueChange> </entityField>
</entityField> <entityField>
<entityField> <name>LONG_CHAR_VALUE</name>
<name>attributeType</name> </entityField>
<valueProcess>%aditoprj%/entity/KeywordAttributeRelation_entity/entityfields/attributetype/valueProcess.js</valueProcess> </entityFields>
</entityField> <recordContainers>
<entityField> <dbRecordContainer>
<name>LONG_CHAR_VALUE</name> <name>db</name>
</entityField> <alias>Data_alias</alias>
</entityFields> <isPageable v="false" />
<recordContainers> <isRequireContainerFiltering v="false" />
<dbRecordContainer> <conditionProcess>%aditoprj%/entity/KeywordAttributeRelation_entity/recordcontainers/db/conditionProcess.js</conditionProcess>
<name>db</name> <linkInformation>
<alias>Data_alias</alias> <linkInformation>
<isPageable v="false" /> <name>8e2938d2-e14b-403b-8ae5-875f70bc3f85</name>
<isRequireContainerFiltering v="false" /> <tableName>AB_KEYWORD_ATTRIBUTERELATION</tableName>
<conditionProcess>%aditoprj%/entity/KeywordAttributeRelation_entity/recordcontainers/db/conditionProcess.js</conditionProcess> <primaryKey>AB_KEYWORD_ATTRIBUTERELATIONID</primaryKey>
<linkInformation> <isUIDTable v="true" />
<linkInformation> <readonly v="false" />
<name>8e2938d2-e14b-403b-8ae5-875f70bc3f85</name> </linkInformation>
<tableName>AB_KEYWORD_ATTRIBUTERELATION</tableName> </linkInformation>
<primaryKey>AB_KEYWORD_ATTRIBUTERELATIONID</primaryKey> <recordFieldMappings>
<isUIDTable v="true" /> <dbRecordFieldMapping>
<readonly v="false" /> <name>AB_KEYWORD_ATTRIBUTERELATIONID.value</name>
</linkInformation> <recordfield>AB_KEYWORD_ATTRIBUTERELATION.AB_KEYWORD_ATTRIBUTERELATIONID</recordfield>
</linkInformation> </dbRecordFieldMapping>
<recordFieldMappings> <dbRecordFieldMapping>
<dbRecordFieldMapping> <name>BOOL_VALUE.value</name>
<name>AB_KEYWORD_ATTRIBUTERELATIONID.value</name> <recordfield>AB_KEYWORD_ATTRIBUTERELATION.BOOL_VALUE</recordfield>
<recordfield>AB_KEYWORD_ATTRIBUTERELATION.AB_KEYWORD_ATTRIBUTERELATIONID</recordfield> </dbRecordFieldMapping>
</dbRecordFieldMapping> <dbRecordFieldMapping>
<dbRecordFieldMapping> <name>CHAR_VALUE.value</name>
<name>BOOL_VALUE.value</name> <recordfield>AB_KEYWORD_ATTRIBUTERELATION.CHAR_VALUE</recordfield>
<recordfield>AB_KEYWORD_ATTRIBUTERELATION.BOOL_VALUE</recordfield> </dbRecordFieldMapping>
</dbRecordFieldMapping> <dbRecordFieldMapping>
<dbRecordFieldMapping> <name>NUMBER_VALUE.value</name>
<name>CHAR_VALUE.value</name> <recordfield>AB_KEYWORD_ATTRIBUTERELATION.NUMBER_VALUE</recordfield>
<recordfield>AB_KEYWORD_ATTRIBUTERELATION.CHAR_VALUE</recordfield> </dbRecordFieldMapping>
</dbRecordFieldMapping> <dbRecordFieldMapping>
<dbRecordFieldMapping> <name>AB_KEYWORD_ATTRIBUTE_ID.value</name>
<name>NUMBER_VALUE.value</name> <recordfield>AB_KEYWORD_ATTRIBUTERELATION.AB_KEYWORD_ATTRIBUTE_ID</recordfield>
<recordfield>AB_KEYWORD_ATTRIBUTERELATION.NUMBER_VALUE</recordfield> </dbRecordFieldMapping>
</dbRecordFieldMapping> <dbRecordFieldMapping>
<dbRecordFieldMapping> <name>AB_KEYWORD_ENTRY_ID.value</name>
<name>AB_KEYWORD_ATTRIBUTE_ID.value</name> <recordfield>AB_KEYWORD_ATTRIBUTERELATION.AB_KEYWORD_ENTRY_ID</recordfield>
<recordfield>AB_KEYWORD_ATTRIBUTERELATION.AB_KEYWORD_ATTRIBUTE_ID</recordfield> </dbRecordFieldMapping>
</dbRecordFieldMapping> <dbRecordFieldMapping>
<dbRecordFieldMapping> <name>AB_KEYWORD_ATTRIBUTE_ID.displayValue</name>
<name>AB_KEYWORD_ENTRY_ID.value</name> <expression>%aditoprj%/entity/KeywordAttributeRelation_entity/recordcontainers/db/recordfieldmappings/ab_keyword_attribute_id.displayvalue/expression.js</expression>
<recordfield>AB_KEYWORD_ATTRIBUTERELATION.AB_KEYWORD_ENTRY_ID</recordfield> </dbRecordFieldMapping>
</dbRecordFieldMapping> <dbRecordFieldMapping>
<dbRecordFieldMapping> <name>LONG_CHAR_VALUE.value</name>
<name>AB_KEYWORD_ATTRIBUTE_ID.displayValue</name> <recordfield>AB_KEYWORD_ATTRIBUTERELATION.LONG_CHAR_VALUE</recordfield>
<expression>%aditoprj%/entity/KeywordAttributeRelation_entity/recordcontainers/db/recordfieldmappings/ab_keyword_attribute_id.displayvalue/expression.js</expression> </dbRecordFieldMapping>
</dbRecordFieldMapping> </recordFieldMappings>
<dbRecordFieldMapping> </dbRecordContainer>
<name>LONG_CHAR_VALUE.value</name> </recordContainers>
<recordfield>AB_KEYWORD_ATTRIBUTERELATION.LONG_CHAR_VALUE</recordfield> </entity>
</dbRecordFieldMapping>
</recordFieldMappings>
</dbRecordContainer>
</recordContainers>
</entity>
<?xml version="1.0" encoding="UTF-8"?> <?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.3.11" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.3.11"> <entity xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.3.11" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.3.11">
<name>KeywordAttribute_entity</name> <name>KeywordAttribute_entity</name>
<majorModelMode>DISTRIBUTED</majorModelMode> <majorModelMode>DISTRIBUTED</majorModelMode>
<documentation>%aditoprj%/entity/KeywordAttribute_entity/documentation.adoc</documentation> <documentation>%aditoprj%/entity/KeywordAttribute_entity/documentation.adoc</documentation>
<title>Keyword Attribute</title> <title>Keyword Attribute</title>
<contentTitleProcess>%aditoprj%/entity/KeywordAttribute_entity/contentTitleProcess.js</contentTitleProcess> <contentTitleProcess>%aditoprj%/entity/KeywordAttribute_entity/contentTitleProcess.js</contentTitleProcess>
<iconId>VAADIN:KEY_O</iconId> <iconId>VAADIN:KEY_O</iconId>
<iconIdProcess>%aditoprj%/entity/KeywordAttribute_entity/iconIdProcess.js</iconIdProcess> <iconIdProcess>%aditoprj%/entity/KeywordAttribute_entity/iconIdProcess.js</iconIdProcess>
<titlePlural>Keyword Attributes</titlePlural> <titlePlural>Keyword Attributes</titlePlural>
<recordContainer>db</recordContainer> <recordContainer>db</recordContainer>
<entityFields> <entityFields>
<entityProvider> <entityProvider>
<name>#PROVIDER</name> <name>#PROVIDER</name>
</entityProvider> </entityProvider>
<entityField> <entityField>
<name>AB_KEYWORD_ATTRIBUTEID</name> <name>AB_KEYWORD_ATTRIBUTEID</name>
<valueProcess>%aditoprj%/entity/KeywordAttribute_entity/entityfields/ab_keyword_attributeid/valueProcess.js</valueProcess> <valueProcess>%aditoprj%/entity/KeywordAttribute_entity/entityfields/ab_keyword_attributeid/valueProcess.js</valueProcess>
</entityField> </entityField>
<entityField> <entityField>
<name>CONTAINER</name> <name>CONTAINER</name>
<title>Container</title> <title>Container</title>
<mandatory v="true" /> <mandatory v="true" />
<dropDownProcess>%aditoprj%/entity/KeywordAttribute_entity/entityfields/container/dropDownProcess.js</dropDownProcess> <dropDownProcess>%aditoprj%/entity/KeywordAttribute_entity/entityfields/container/dropDownProcess.js</dropDownProcess>
</entityField> </entityField>
<entityField> <entityField>
<name>NAME</name> <name>NAME</name>
<title>Name</title> <title>Name</title>
<mandatory v="true" /> <mandatory v="true" />
<onValidation>%aditoprj%/entity/KeywordAttribute_entity/entityfields/name/onValidation.js</onValidation> <onValidation>%aditoprj%/entity/KeywordAttribute_entity/entityfields/name/onValidation.js</onValidation>
</entityField> </entityField>
<entityField> <entityField>
<name>TYPE</name> <name>TYPE</name>
<title>Type</title> <title>Type</title>
<consumer>KeywordAttributeTypes</consumer> <consumer>KeywordAttributeTypes</consumer>
<mandatory v="true" /> <mandatory v="true" />
<displayValueProcess>%aditoprj%/entity/KeywordAttribute_entity/entityfields/type/displayValueProcess.js</displayValueProcess> <displayValueProcess>%aditoprj%/entity/KeywordAttribute_entity/entityfields/type/displayValueProcess.js</displayValueProcess>
</entityField> </entityField>
<entityProvider> <entityProvider>
<name>SpecificContainerKeyword</name> <name>SpecificContainerKeyword</name>
<documentation>%aditoprj%/entity/KeywordAttribute_entity/entityfields/specificcontainerkeyword/documentation.adoc</documentation> <documentation>%aditoprj%/entity/KeywordAttribute_entity/entityfields/specificcontainerkeyword/documentation.adoc</documentation>
<dependencies> <dependencies>
<entityDependency> <entityDependency>
<name>1d11c064-1cf2-4f08-b842-9fa941ad3157</name> <name>1d11c064-1cf2-4f08-b842-9fa941ad3157</name>
<entityName>KeywordAttributeRelation_entity</entityName> <entityName>KeywordAttributeRelation_entity</entityName>
<fieldName>KeywordAttributes</fieldName> <fieldName>KeywordAttributes</fieldName>
<isConsumer v="false" /> <isConsumer v="false" />
</entityDependency> </entityDependency>
<entityDependency> <entityDependency>
<name>684a3e60-00ad-4d46-8c98-6559e485a729</name> <name>684a3e60-00ad-4d46-8c98-6559e485a729</name>
<entityName>CommRestriction_Entity</entityName> <entityName>CommRestriction_Entity</entityName>
<fieldName>MediumKeywordAttribute</fieldName> <fieldName>MediumKeywordAttribute</fieldName>
<isConsumer v="false" /> <isConsumer v="false" />
</entityDependency> </entityDependency>
</dependencies> </dependencies>
</entityProvider> </entityProvider>
<entityParameter> <entityParameter>
<name>ContainerName_param</name> <name>ContainerName_param</name>
<expose v="true" /> <expose v="true" />
<description>PARAMETER</description> <description>PARAMETER</description>
</entityParameter> </entityParameter>
<entityParameter> <entityParameter>
<name>FilterAlreadyUsedByEntryId_param</name> <name>FilterAlreadyUsedByEntryId_param</name>
<expose v="true" /> <expose v="true" />
<mandatory v="false" /> <mandatory v="false" />
<documentation>%aditoprj%/entity/KeywordAttribute_entity/entityfields/filteralreadyusedbyentryid_param/documentation.adoc</documentation> <documentation>%aditoprj%/entity/KeywordAttribute_entity/entityfields/filteralreadyusedbyentryid_param/documentation.adoc</documentation>
<description>PARAMETER</description> <description>PARAMETER</description>
</entityParameter> </entityParameter>
<entityConsumer> <entityConsumer>
<name>KeywordAttributeTypes</name> <name>KeywordAttributeTypes</name>
<dependency> <dependency>
<name>dependency</name> <name>dependency</name>
<entityName>KeywordEntry_entity</entityName> <entityName>KeywordEntry_entity</entityName>
<fieldName>SpecificContainerKeywords</fieldName> <fieldName>SpecificContainerKeywords</fieldName>
</dependency> </dependency>
<children> <children>
<entityParameter> <entityParameter>
<name>ContainerName_param</name> <name>ContainerName_param</name>
<valueProcess>%aditoprj%/entity/KeywordAttribute_entity/entityfields/keywordattributetypes/children/containername_param/valueProcess.js</valueProcess> <valueProcess>%aditoprj%/entity/KeywordAttribute_entity/entityfields/keywordattributetypes/children/containername_param/valueProcess.js</valueProcess>
<expose v="false" /> <expose v="false" />
</entityParameter> </entityParameter>
</children> </children>
</entityConsumer> </entityConsumer>
</entityFields> </entityFields>
<recordContainers> <recordContainers>
<dbRecordContainer> <dbRecordContainer>
<name>db</name> <name>db</name>
<alias>Data_alias</alias> <alias>Data_alias</alias>
<isPageable v="false" /> <isPageable v="false" />
<conditionProcess>%aditoprj%/entity/KeywordAttribute_entity/recordcontainers/db/conditionProcess.js</conditionProcess> <conditionProcess>%aditoprj%/entity/KeywordAttribute_entity/recordcontainers/db/conditionProcess.js</conditionProcess>
<onDBDelete>%aditoprj%/entity/KeywordAttribute_entity/recordcontainers/db/onDBDelete.js</onDBDelete> <onDBDelete>%aditoprj%/entity/KeywordAttribute_entity/recordcontainers/db/onDBDelete.js</onDBDelete>
<linkInformation> <linkInformation>
<linkInformation> <linkInformation>
<name>bd113d67-34ab-4708-b0e5-60a44332e6b8</name> <name>bd113d67-34ab-4708-b0e5-60a44332e6b8</name>
<tableName>AB_KEYWORD_ATTRIBUTE</tableName> <tableName>AB_KEYWORD_ATTRIBUTE</tableName>
<primaryKey>AB_KEYWORD_ATTRIBUTEID</primaryKey> <primaryKey>AB_KEYWORD_ATTRIBUTEID</primaryKey>
<isUIDTable v="true" /> <isUIDTable v="true" />
<readonly v="false" /> <readonly v="false" />
</linkInformation> </linkInformation>
</linkInformation> </linkInformation>
<recordFieldMappings> <recordFieldMappings>
<dbRecordFieldMapping> <dbRecordFieldMapping>
<name>AB_KEYWORD_ATTRIBUTEID.value</name> <name>AB_KEYWORD_ATTRIBUTEID.value</name>
<recordfield>AB_KEYWORD_ATTRIBUTE.AB_KEYWORD_ATTRIBUTEID</recordfield> <recordfield>AB_KEYWORD_ATTRIBUTE.AB_KEYWORD_ATTRIBUTEID</recordfield>
</dbRecordFieldMapping> </dbRecordFieldMapping>
<dbRecordFieldMapping> <dbRecordFieldMapping>
<name>CONTAINER.value</name> <name>CONTAINER.value</name>
<recordfield>AB_KEYWORD_ATTRIBUTE.CONTAINER</recordfield> <recordfield>AB_KEYWORD_ATTRIBUTE.CONTAINER</recordfield>
<isFilterable v="true" /> <isFilterable v="true" />
</dbRecordFieldMapping> </dbRecordFieldMapping>
<dbRecordFieldMapping> <dbRecordFieldMapping>
<name>NAME.value</name> <name>NAME.value</name>
<recordfield>AB_KEYWORD_ATTRIBUTE.NAME</recordfield> <recordfield>AB_KEYWORD_ATTRIBUTE.NAME</recordfield>
<isFilterable v="true" /> <isFilterable v="true" />
</dbRecordFieldMapping> </dbRecordFieldMapping>
<dbRecordFieldMapping> <dbRecordFieldMapping>
<name>TYPE.value</name> <name>TYPE.value</name>
<recordfield>AB_KEYWORD_ATTRIBUTE.KIND</recordfield> <recordfield>AB_KEYWORD_ATTRIBUTE.KIND</recordfield>
<isFilterable v="true" /> <isFilterable v="true" />
</dbRecordFieldMapping> </dbRecordFieldMapping>
<dbRecordFieldMapping> <dbRecordFieldMapping>
<name>TYPE.displayValue</name> <name>TYPE.displayValue</name>
<expression>%aditoprj%/entity/KeywordAttribute_entity/recordcontainers/db/recordfieldmappings/type.displayvalue/expression.js</expression> <expression>%aditoprj%/entity/KeywordAttribute_entity/recordcontainers/db/recordfieldmappings/type.displayvalue/expression.js</expression>
</dbRecordFieldMapping> </dbRecordFieldMapping>
</recordFieldMappings> </recordFieldMappings>
</dbRecordContainer> </dbRecordContainer>
</recordContainers> </recordContainers>
</entity> </entity>
import("system.vars"); import("system.vars");
import("system.db"); import("system.db");
import("system.result"); import("system.result");
import("Sql_lib"); import("Sql_lib");
var cond = SqlCondition.begin().andPrepareVars("AB_KEYWORD_ATTRIBUTE.CONTAINER", "$param.ContainerName_param"); var cond = SqlCondition.begin().andPrepareVars("AB_KEYWORD_ATTRIBUTE.CONTAINER", "$param.ContainerName_param");
//filter for entries that are already used by entry_id //filter for entries that are already used by entry_id
var entryIdForFilter = vars.get("$param.FilterAlreadyUsedByEntryId_param"); var entryIdForFilter = vars.get("$param.FilterAlreadyUsedByEntryId_param");
if (entryIdForFilter) if (entryIdForFilter)
{ {
var exclusiveFilterCondition = SqlCondition.begin() var exclusiveFilterCondition = SqlCondition.begin()
.andPrepare("AB_KEYWORD_ATTRIBUTERELATION.AB_KEYWORD_ENTRY_ID", entryIdForFilter) .andPrepare("AB_KEYWORD_ATTRIBUTERELATION.AB_KEYWORD_ENTRY_ID", entryIdForFilter)
.buildSql("AB_KEYWORD_ATTRIBUTE.AB_KEYWORD_ATTRIBUTEID not in (\n\ .buildSql("AB_KEYWORD_ATTRIBUTE.AB_KEYWORD_ATTRIBUTEID not in (\n\
select AB_KEYWORD_ATTRIBUTERELATION.AB_KEYWORD_ATTRIBUTE_ID \n\ select AB_KEYWORD_ATTRIBUTERELATION.AB_KEYWORD_ATTRIBUTE_ID \n\
from AB_KEYWORD_ATTRIBUTERELATION ", null, ")"); from AB_KEYWORD_ATTRIBUTERELATION ", null, ")");
cond.andAttachPrepared(exclusiveFilterCondition); cond.andAttachPrepared(exclusiveFilterCondition);
} }
var condStr = db.translateCondition(cond.build("1 = 1")); var condStr = db.translateCondition(cond.build("1 = 1"));
result.string(condStr); result.string(condStr);
\ No newline at end of file
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