Documentation for class generic :


Properties:

name type default params representant foreign foreign_prop position
id CO_INTEGER SEQUENCE READONLY=1;HIDDEN=1 0 0
version CO_INTEGER 0 READONLY=1;HIDDEN=1 0 0
deleted CO_INTEGER 0 READONLY=1;HIDDEN=1 0 0

Methods:


method get
description: this method retrieves data for given object. Object is identified using par_area, par_class and par_id
parameters:

par_area
type CO_STRING

par_class
type CO_STRING

par_id
type CO_INTEGER

callback
type CO_STRING


method getProp
description: This method retrieves value (CO_STRING) of given property for given object. Object is identified using par_area, par_class and par_id; property using prop_name.
parameters:

par_area
type CO_STRING

par_class
type CO_STRING

par_id
type CO_INTEGER

callback
type CO_STRING

prop_name
description: Name of prop to retrieve
type CO_STRING


method getChildrenCount
description: This method retrieves number (CO_INTEGER) of (non-deleted) children given property for given object. Object is identified using child_class, child_prop and foreign_prop.
parameters:

par_area
type CO_STRING

par_class
type CO_STRING

par_id
type CO_INTEGER

callback
type CO_STRING

child_class
description: this is the name of the class of children counted
type CO_STRING

child_prop
description: this is the property name in child class that holds id of parent
type CO_STRING

foreign_prop
description: this is the prop in container (this:) class that holds id to copy to child class
type CO_STRING


method getByProp
description: This method retrieves data for object which has prop_name == prop_val. When many objects satysfy this conditions all are returned
parameters:

par_area
type CO_STRING

par_class
type CO_STRING

par_id
type CO_INTEGER

callback
type CO_STRING

prop_name
description: Name of prop used to find the object
type CO_STRING

prop_val
description: Value used to find the object
type CO_STRING


method selectByProp
description: This method retrieves data for objects which has prop_name LIKE prop_val
parameters:

par_area
type CO_STRING

par_class
type CO_STRING

par_id
type CO_INTEGER

callback
type CO_STRING

prop_name
description: Name of prop used to select objects
type CO_STRING

prop_val
description: Value used to select the object
type CO_STRING


method increaseVersion
description: Increases version number and sends action with the new version number. Checks whether object is deleted (updates only not deleted; returns -1 otherwise).
parameters:

par_area
type CO_STRING

par_class
type CO_STRING

par_id
type CO_INTEGER


method update
description: This method updates one prop of one object. Sends action CO_OP_UPDATE
parameters:

par_area
type CO_STRING

par_class
type CO_STRING

par_id
type CO_INTEGER

version
description: Version of object to be changed this must be current version in database. If version = -1 than it is not used. Default value is -1.
type CO_INTEGER

par_prop
description: Name of the prop to be updated
type CO_STRING

new_value
description: New value for prop. All values are passed as CO_STRING type!
type CO_STRING


method delete
description: Sets deleted prop to 1. Sends action CO_OP_DELETE.
parameters:

par_area
type CO_STRING

par_class
type CO_STRING

par_id
type CO_INTEGER

version
description: Version of object to be changed this must be current version in database. If version = -1 than it is not used. Default value is -1.
type CO_INTEGER


method undelete
description: Sets deleted prop to 0. Sends action CO_OP_UNDELETE.
parameters:

par_area
type CO_STRING

par_class
type CO_STRING

par_id
type CO_INTEGER

version
description: Version of object to be changed this must be current version in database. If version = -1 than it is not used. Default value is -1.
type CO_INTEGER


method insertChild
description: this is method for inserting object into container. You can specify class_name of child element
parameters:

par_area
type CO_STRING

par_class
type CO_STRING

par_id
type CO_INTEGER

child_class
description: this is the name of class tu insert record in
type CO_STRING

child_prop
description: this is the property name in child class that holds id of parent
type CO_STRING

foreign_prop
description: this is the prop in container (this:) class that holds id to copy to child class
type CO_STRING


method selectX
description: Gets recordset of objects on given filter rule
parameters:

par_area
type CO_STRING

par_class
type CO_STRING

par_id
type CO_INTEGER

callback
type CO_STRING

get_class_names
description: In this param we pass names of classes from wich we are reading data
type CO_ARRAY_OF_STRINGS

get_prop_names
description: In this param we pass names of fields wich we want to get. You can use "outer join" notation: field_name>related_field_name>class_name>field_name For example: id_role>id>role>name -- gets the name of role linked by relation class_name.id_role = role.id This works like outerjoin, so if there is no match you get empty value. Number of fields must be equal to number of class_names
type CO_ARRAY_OF_STRINGS

get_prop_aggregates
description: In this param we pass names of aggregation function to be used to get results (like SUM, MIN, MAX, COUT, AVG or other defined) In selects with aggregates you can not use order, limit nor offset (are ignored)
type CO_ARRAY_OF_STRINGS

filter_class_names
description: This is list of class names that we use to filter data
type CO_ARRAY_OF_STRINGS

filter_prop_names
description: This is list of field names that we use to filter data. Length of this list must be equal to length of filter_class_names
type CO_ARRAY_OF_STRINGS

filter_operators
description: This is list of operators (LIKE, =, <, >, etc) that we use to filter data. Length of this list must be equal to length of filter_class_names.IMPORTANT: LIKE is case-insensitive here
type CO_ARRAY_OF_STRINGS

filter_values
description: This is list of values that we use to filter data. Length of this list must be equal to length of filter_class_names
type CO_ARRAY_OF_STRINGS

filter_r_class_names
description: This param is used to compare value of one field with another field (not constant). In this param you pass class_names of fields to be used in comparasion
type CO_ARRAY_OF_STRINGS

filter_r_prop_names
description: This param is used to compare value of one field with another field (not constant). In this param you pass prop_namea of fields to be used in comparasion
type CO_ARRAY_OF_STRINGS

filter_compare
description: When this param is == "1" then we compare values of one field with another field (not constant)
type CO_ARRAY_OF_STRINGS

order_by_class_names
description: This are names of classes from which we take sort columns
type CO_ARRAY_OF_STRINGS

order_by_prop_names
description: This are names of sort columns
type CO_ARRAY_OF_STRINGS

order_by_desc
description: If this param == "1", then we sort values on this position descending. You can provide less values then order_by_class_names, default order is ascending
type CO_ARRAY_OF_STRINGS

limit
description: In this param we set limit number of records that we want in return. If == -1 (default) then there is no limit
type CO_INTEGER

offset
description: In this param we set offset number of records that we want in return.
type CO_INTEGER

group_by_class_names
description: This is the list of class names to group-by return values
type CO_ARRAY_OF_STRINGS

group_by_prop_names
description: This is the list of props to group-by return values
type CO_ARRAY_OF_STRINGS


method getRelatedClasses
description: retrieves names of related classes, foreign column names and relation names for given class
parameters:

par_area
type CO_STRING

par_class
type CO_STRING

par_id
type CO_INTEGER

callback
type CO_STRING


method getRelatedData
description: retrieves data of related class
parameters:

par_area
type CO_STRING

par_class
type CO_STRING

par_id
type CO_INTEGER

callback
type CO_STRING

related_class
description: Name of the class to retrieve related data from. Current class (par_class) should be container for related_class
type CO_STRING

related_prop
description: Name of prop in the related class used to form relation
type CO_STRING

dynamic_prop
description: If not null is name of prop where is stored dynamic name of container class
type CO_STRING


method getSchema
description: Retrieves schema for given class
parameters:

par_area
type CO_STRING

par_class
type CO_STRING

par_id
type CO_INTEGER

callback
type CO_STRING

representant_level
description: We are taking only these props that have representant > representat_level
type CO_INTEGER


method getSchemaX
description: Retrieves schema for given class
parameters:

par_area
type CO_STRING

par_class
type CO_STRING

par_id
type CO_INTEGER

callback
type CO_STRING

deep_level
description: This is max number of levels to go up to container
type CO_INTEGER


method getWithSchema
description: Retrieves schema for given class
parameters:

par_area
type CO_STRING

par_class
type CO_STRING

par_id
type CO_INTEGER

callbacks
type CO_ARRAY_OF_STRINGS


method test
parameters:

par_area
type CO_STRING

par_class
type CO_STRING

par_id
type CO_INTEGER

callback
type CO_STRING


method getSchemaRelatedAndData
description: Retrieves schema related tables and data for given class element
parameters:

par_area
type CO_STRING

par_class
type CO_STRING

par_id
type CO_INTEGER

callbacks
type CO_ARRAY_OF_STRINGS


method getWithSchemaX
description: Retrieves schema for given class
parameters:

par_area
type CO_STRING

par_class
type CO_STRING

par_id
type CO_INTEGER

callbacks
type CO_ARRAY_OF_STRINGS


method getSchemaXRelatedAndData
description: Retrieves schema related tables and data for given class element
parameters:

par_area
type CO_STRING

par_class
type CO_STRING

par_id
type CO_INTEGER

callbacks
type CO_ARRAY_OF_STRINGS

deep_level
type CO_INTEGER


method getForRelatedSchemaAndData
description: Retrieves schema related tables and data for given class element
parameters:

par_area
type CO_STRING

par_class
type CO_STRING

par_id
type CO_INTEGER

related_class
type CO_STRING

related_prop
type CO_STRING

dynamic_prop
description: If not null is name of prop where is stored dynamic name of container class
type CO_STRING

callbacks
type CO_ARRAY_OF_STRINGS


method showForm
parameters:

par_area
type CO_STRING

par_class
type CO_STRING

par_id
type CO_INTEGER

deep_level
type CO_INTEGER

context_name
description: Name of context in which we execute this form. Now this is the name of additionall menu
type CO_STRING

context1
description: Additionall parameter passed to menu
type CO_STRING

context2
description: Additionall parameter passed to menu
type CO_STRING

context3
description: Additionall parameter passed to menu
type CO_STRING


method showFormFind
parameters:

par_area
type CO_STRING

par_class
type CO_STRING

par_id
type CO_INTEGER

id_report
description: If this param is set we read seetings for the report, if not we create default report for current class
type CO_INTEGER

report_name
description: If this param is set we read seetings for the report looking for it by name, if not we create default report for current class
description: When name and id is given we use id
type CO_STRING

context_name
description: Name of context in which we execute this form. Now this is the name of additionall menu
type CO_STRING

context1
description: Additionall parameter passed to menu
type CO_STRING

context2
description: Additionall parameter passed to menu
type CO_STRING

context3
description: Additionall parameter passed to menu
type CO_STRING

default_open_class_name
description: Name of the class to be used to open element
type CO_STRING

default_open_id_prop_name
description: Name of the prop with id value to be used to open element
type CO_STRING

filter_variables
description: Array of filter variables in form [name, value]
type CO_ARRAY_OF_STRINGS