From 2fd08cce87efb731e29cad4831620e30c43b6b97 Mon Sep 17 00:00:00 2001 From: Sebastian Listl <s.listl@adito.de> Date: Tue, 23 Mar 2021 09:56:07 +0100 Subject: [PATCH] Attribute_lib comments improved --- process/Attribute_lib/process.js | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/process/Attribute_lib/process.js b/process/Attribute_lib/process.js index 65920bb205d..92c097bcac9 100644 --- a/process/Attribute_lib/process.js +++ b/process/Attribute_lib/process.js @@ -1227,8 +1227,8 @@ AttributeTypeUtil.getDatabaseField = function (pAttributeType) * The attribute type (use the values <br> * of the AttributeTypes object, e. g.<br> * AttributeTypes.TEXT)<br> - * @return {String[]} <p> - * The possible children types.<br> + * @return {String[]|null} <p> + * The possible children types, can be null.<br> */ AttributeTypeUtil.getPossibleChildren = function (pAttributeType) { @@ -1244,8 +1244,8 @@ AttributeTypeUtil.getPossibleChildren = function (pAttributeType) * The attribute type (use the values<br> * of the AttributeTypes object, e. g.<br> * AttributeTypes.TEXT)<br> - * @return {String[]} <p> - * .<br> + * @return {Boolean} <p> + * if the attribute can only be used once<br> */ AttributeTypeUtil.isSingleSelection = function (pAttributeType) { @@ -1269,6 +1269,16 @@ AttributeTypeUtil.getDropDownDefinitionTitle = function (pAttributeType) return type ? type.dropDownDefinitionTitle : ""; } +/** + * Returns a function to resolve the displayValue depending on the attribute type. + * + * @param {String} pAttributeType <p> + * The attribute type (use the values<br> + * of the AttributeTypes object, e. g.<br> + * AttributeTypes.TEXT)<br> + * @return {Function} <p> + * A function that resolves the displayValue or null if the type is invalid<br> + */ AttributeTypeUtil.getDisplayValueSqlFn = function (pAttributeType) { var attributeType = AttributeTypes.get(pAttributeType); @@ -1283,7 +1293,7 @@ AttributeTypeUtil.getDisplayValueSqlFn = function (pAttributeType) * * @param {String} pAttributeType <p> * The attribute type which shall be comapred. - * @return {String} <p> + * @return {Boolean} <p> * Returns true, if the given attribute type is equal<br> * with the attribute string "OBJECTSELECTION" and <br> * false, if not.<br> -- GitLab