Members
code: String
readonly
modelName
readonly
Entity model name
name: String
readonly
Entity name
sqlAlias: String
readonly
Internal short alias
connectionName: String
readonly
Data source connection name
isFTSDataTable: boolean
This is a Full Text Search entity
connectionConfig: DBConnectionConfig
readonly
Reference to connection definition (for extended domain only)
mapping: UBEntityMapping
readonly
Optional mapping of entity to physical data (for extended domain info only).
Calculated from a entity mapping collection in accordance with application connection configuration
dbKeys: Object
Optional dbKeys (for extended domain info)
dbExtensions: Object
Optional dbExtensions (for extended domain info)
attributes: Object.<string, UBEntityAttribute>
Entity attributes collection
mixins: Object.<String, UBEntityMixin>
Collection of entity mixins
entityMethods: Object.<String, Number>
readonly
Entity methods, allowed for current logged-in user in format {method1: 1, method2: 1}. 1 mean method is allowed
caption: string
Entity caption
description: string
Entity description
documentation: string
Documentation
descriptionAttribute: string
Name of attribute witch used as a display value in lookup
cacheType: UBDomain.EntityCacheTypes
readonly
Indicate how entity content is cached on the client side.
dsType: UBDomain.EntityDataSourceType
Methods
getEntityCaption() → string
Return an entity caption to display on UI
attr(attributeCode, simpleopt) → UBEntityAttribute
Get entity attribute by code. Return undefined if attribute does not found
Arguments:
getAttribute(attributeCode) → UBEntityAttribute
Get entity attribute by code. Throw error if attribute does not found.
Arguments:
-
attributeCode
eachAttribute(callBack)
Call callBack function for each attribute.
Arguments:
-
callBack
(function)
mixin(mixinCode) → UBEntityMixin
Get entity mixin by code. Returns "undefined" if the mixin is not found
Arguments:
-
mixinCode
(String)
hasMixin(mixinCode) → Boolean
Check the entity has mixin. Returns true
if the mixin is exist and enabled
Arguments:
-
mixinCode
(String)
checkMixin(mixinCode)
Check the entity has mixin. Throw error if mixin dose not exist or not enabled
Arguments:
-
mixinCode
(String)
haveAccessToMethod(methodCode) → Boolean
Check current user have access to specified entity method
Arguments:
-
methodCode
(String)
filterAttribute(config) → Array
Filter attributes by properties
Arguments:
haveAccessToAnyMethods(methods) → boolean
Check current user have access to AT LAST one of specified methods
Arguments:
-
methods
(Array)
haveAccessToMethods(methods) → Boolean
Check current user have access to ALL of specified methods
Arguments:
-
methods
(Array.<String>)
 Method names
getConvertRules(fieldList) → Array.<{index: number, convertFn: function()}>
Return array of conversion rules for raw server response data
Arguments:
-
fieldList
(Array.<String>)
getDescriptionAttribute() → String
Return description attribute name (descriptionAttribute
metadata property)
This property may be empty or valid(validation performed by server)
If case property is empty - try to get attribute with code caption
getEntityAttributeInfo(attributeName, deepopt) → Object
Return information about attribute and attribute entity. Understand complex attributes like firmID.firmType.code
Arguments:
getEntityAttribute(attributeName, deepopt) → UBEntityAttribute
Return Entity attribute. Understand complex attributes like firmID.firmType.code
Arguments:
getAttributeNames(filteropt)
return attributes code list
Arguments:
getEntityRequirements(fieldListopt) → Array.<String>
Return requirements entity code list for field list
Arguments:
-
[fieldList]
(Array.<String>)
 (optional)
checkAttributeExist(attributeName, contextMessage)
Check the entity contains attribute(s) and throw error if not contains
Arguments:
getEntityDescription() → string
Return entity description.
getEntityCaption() → string
Return an entity caption to display on UI
attr(attributeCode, simpleopt) → UBEntityAttribute
Get entity attribute by code. Return undefined if attribute does not found
Arguments:
getAttribute(attributeCode) → UBEntityAttribute
Get entity attribute by code. Throw error if attribute does not found.
Arguments:
-
attributeCode
eachAttribute(callBack)
Call callBack function for each attribute.
Arguments:
-
callBack
(function)
mixin(mixinCode) → UBEntityMixin
Get entity mixin by code. Returns "undefined" if the mixin is not found
Arguments:
-
mixinCode
(String)
hasMixin(mixinCode) → Boolean
Check the entity has mixin. Returns
true
if the mixin is exist and enabled
Arguments:
-
mixinCode
(String)
checkMixin(mixinCode)
Check the entity has mixin. Throw error if mixin dose not exist or not enabled
Arguments:
-
mixinCode
(String)
haveAccessToMethod(methodCode) → Boolean
Check current user have access to specified entity method
Arguments:
-
methodCode
(String)
filterAttribute(config) → Array
Filter attributes by properties
Arguments:
haveAccessToAnyMethods(methods) → boolean
Check current user have access to AT LAST one of specified methods
Arguments:
-
methods
(Array)
haveAccessToMethods(methods) → Boolean
Check current user have access to ALL of specified methods
Arguments:
-
methods
(Array.<String>)
 Method names
getConvertRules(fieldList) → Array.<{index: number, convertFn: function()}>
Return array of conversion rules for raw server response data
Arguments:
-
fieldList
(Array.<String>)
getDescriptionAttribute() → String
Return description attribute name (
descriptionAttribute
metadata property)
This property may be empty or valid(validation performed by server)
If case property is empty - try to get attribute with code caption
getEntityAttributeInfo(attributeName, deepopt) → Object
Return information about attribute and attribute entity. Understand complex attributes like firmID.firmType.code
Arguments:
getEntityAttribute(attributeName, deepopt) → UBEntityAttribute
Return Entity attribute. Understand complex attributes like firmID.firmType.code
Arguments:
getAttributeNames(filteropt)
return attributes code list
Arguments:
getEntityRequirements(fieldListopt) → Array.<String>
Return requirements entity code list for field list
Arguments:
-
[fieldList]
(Array.<String>)
 (optional)
checkAttributeExist(attributeName, contextMessage)
Check the entity contains attribute(s) and throw error if not contains
Arguments:
getEntityDescription() → string
Return entity description.