flexygo.obj.Entity Class
Library to access entity objects and collections from JS.
Constructor
flexygo.obj.Entity
(
Object
-
objectName
-
[objectWhere]
Parameters:
-
objectName
String- The object name.
-
[objectWhere]
String optional- Where condition (only if object isn't new).
Returns:
Object:
- Entity object.
Item Index
Methods
delete
()
Boolean
Delete current object.
Returns:
Boolean:
- Success or fail.
getConfig
()
Object
Get the system configuration related to current object.
Returns:
Object:
- System configuration
getTemplateByType
(
flexygo.api.Template
-
templateType
-
[cllback]
Get object template by type
Parameters:
-
templateType
String- Desired template type.
-
[cllback]
Function optional- function to get the results, if null, get view will be syncronous and results will be returned on return param.
Returns:
flexygo.api.Template:
- if no cllback param, results object
getTemplateByType
(
flexygo.api.Template
-
getTemplateById
-
[cllback]
-
[filter]
Get object template by id
Parameters:
-
getTemplateById
String- Desired template id.
-
[cllback]
Function optional- function to get the results, if null, get view will be syncronous and results will be returned on return param.
-
[filter]
String optional- Additional where to filter the template.
Returns:
flexygo.api.Template:
- if no cllback param, results object
getView
(
Object
-
viewName
-
[page=0]
-
[pageSize=5000]
-
[filter]
-
[orderBy]
-
[cllback]
Get the system configuration related to current object.
Parameters:
-
viewName
String- Desired view name.
-
[page=0]
Number optional- Page number.
-
[pageSize=5000]
Number optional- Number of page elements.
-
[filter]
String optional- Additional sql where.
-
[orderBy]
String optional- Order by condition.
-
[cllback]
Function optional- function to get the results, if null, get view will be syncronous and results will be returned on return param.
Returns:
Object:
- if no cllback param, results object
getViewColumnsNames
(
Object
-
viewName
-
[cllback]
Get view columns names.
Parameters:
-
viewName
String- Desired view name.
-
[cllback]
Function optional- function to get the results, if null, get view will be syncronous and results will be returned on return param.
Returns:
Object:
- results object
getViewCount
(
Number
-
viewName
-
[filter]
-
[orderBy]
-
[cllback]
Get number of rows.
Parameters:
-
viewName
String- Desired view name.
-
[filter]
String optional- Additional sql where.
-
[orderBy]
String optional- Order by condition.
-
[cllback]
Function optional- function to get the results, if null, get view will be syncronous and results will be returned on return param.
Returns:
Number:
- if no cllback param, results object
insert
()
Boolean
Save a new item in the database.
Returns:
Boolean:
- Success or fail.
processes
(
flexygo.api.entity.GetProcessesResponse
-
options
Get the processes related to current object.
Parameters:
-
options
String- leave empty for all processes. reports for only reports, processes for only processes and relations only for relations
Returns:
flexygo.api.entity.GetProcessesResponse:
- Related processes
read
()
Boolean
Init entity and recive the values.
Returns:
Boolean:
- Success or fail.
toValuesArray
()
String
Converts Data properties in KeyValuePair array.
Returns:
String:
- Data array
update
()
Boolean
Save changes in the database.
Returns:
Boolean:
- Success or fail.