Group of categorized attributes
inherits from
LMWrapName
namespace:
lm.prepro
Constructor
AttributeGroup()
-
Creates a new object of this class
Parameters
-
luaTable
- to store named parameters
Obligatory named parameters
-
name
: string
- unique name for the new group of attributes
-
pParentGroup
: AttributeGroup
- parent group of attributes
Properties List
AttributeCount |
Number of attributes in this group |
ID |
Unique identifier (primary key) of the object |
Name |
Unique name of this object. Cannot be empty. |
NameHierarchy |
Fully qualified name of the group (including names of all of its parent groups in the hierarchy |
Note |
Text comment to this object (up to 255 characters) |
SubAttributeGroupCount |
Number of sub attribute groups in this group |
Methods List
Properties
AttributeCount
(read-only) : integer
-
Number of attributes in this group
ID
(read-only) : integer
-
Unique identifier (primary key) of the object
Intherited from: LMWrap
Name
: string
-
Unique name of this object. Cannot be empty.
Intherited from: LMWrapName
NameHierarchy
(read-only) : string
-
Fully qualified name of the group (including names of all of its parent groups in the hierarchy
Note
: string
-
Text comment to this object (up to 255 characters)
Intherited from: LMWrapName
SubAttributeGroupCount
(read-only) : integer
-
Number of sub attribute groups in this group
Methods
calcCategoryFrequencies()
-
Pre-calculates frequencies for all categories of all attributes in this group. Frequencies are otherwise calculated ad-hod in a function requesting frequency of a category as its input.
Returns
-
boolean
- true, if successfull for all attributes
canDel() : boolean
-
Returns true if the object could be deleted (is not used)
Intherited from: LMWrap
Returns
findAttribute() : Attribute
-
Tries to look-up a Attribute with a unique property given as parameter. Just one parameter has to be specified. Returns
nil
if Attribute with this property doesn't exists.
Parameters
-
luaTable
- to store named parameters
Optional named parameters
-
nID
: integer
- an ID of the attribute to look-up
-
pDataTable
: DataTable
- database table with column the attribute should be based upon. Should be specified if there are two or more database tables
-
name
: string
- a name of the attribute to look-up
Returns
findSubAttributeGroup() : AttributeGroup
-
Tries to look-up a AttributeGroup with a unique property given as parameter. Just one parameter has to be specified. Returns
nil
if AttributeGroup with this property doesn't exists.
Parameters
-
luaTable
- to store named parameters
Optional named parameters
-
nID
: integer
- an ID of the group of attributes to look-up
-
name
: string
- a name of the group of attributes to look-up
Returns
getAttributeCount() : integer
-
Returns the value of AttributeCount property
Returns
getID() : integer
-
Returns unique identifier (primary key) of the object
Intherited from: LMWrap
Returns
getName() : string
-
Returns the value of Name property, name of this object
Intherited from: LMWrapName
Returns
getNameHierarchy() : integer
-
Returns the value of NameHierarchy property
Returns
getNote() : string
-
Returns the value of Note property
Intherited from: LMWrapName
Returns
getSubAttributeCount() : integer
-
Returns the value of SubAttributeCount property
Returns
onAdd()
-
Store the newly created object into metabase
Intherited from: LMWrap
onDel()
-
Delete the object from metabase (fails if canDel returns false)
Intherited from: LMWrap
onUpdate()
-
Save changes made to the object into metabase
Intherited from: LMWrap
prepareAttributeArray() : luaTable
-
Returns array of Attributes in this group of attributes
Parameters
-
luaTable
- to store named parameters
Optional named parameters
-
pDataTable
: DataTable
- database table the attributes should be based upon
-
pDataColumn
: DataColumn
- database table column the attributes should be based upon
Returns
prepareSubAttributeGroupArray() : luaTable
-
Returns array of AttributeGroups in this group of attributes
Returns
setName( string )
-
Sets the value of Name property, name of this object (must be unique)
Intherited from: LMWrapName
Parameters
setNote( string )
-
Sets the value of Note property
Intherited from: LMWrapName
Parameters