Skip to main content

DBRecordContainer

This page provides generated reference documentation for the DBRecordContainer data model.

A RecordContainer for connecting EntityFields with database columns as data source

Overview

PropertySummary
titleSingular title of the model, e.g. Surname
descriptionShort technical description of the model in plain text.
documentationContains the documentation of the data model in the popular AsciiDoc format (.adoc). The documentation should be set by the developer to explain different…
recordFieldMappingsThe record field mappings in this record container
filterExtensionsThe filter extensions given
aliasThe database alias that is associated with this recordcontainer
linkInformationSpecifies the links to the database. The linkInformation determines which data the core will fetch at a select and which table columns can be linked to…
maximumDbRowsSpecifies the maximum number of items to display during a search. If this number is set to "0", all elements are loaded and a different number is used as the…
isPageableDetermines whether the record container should load the data blockwise or deliver them all at once.
minimizeCountQueriesWhen true, the recordContainer will perform less SELECT COUNT(*)...-queries and determine the count instead based on the loaded data. However, this may…
supportsFilterExtensionGroupingThis will enable filterExtensions even on non-pageable RecordContainers for grouping. Be aware of the consequences of enabling the support of filterExtensions…
isReadOnlyRecords of the record container can only be read. No data can be saved or deleted
isRequireContainerFilteringForces a filtering of the records via the record container. No client-side filtering is possible.
hasDependentRecordsIf your records are interdependent, for example in a parent-child structure for trees, you should use this flag. This has effects when deleting records because…
fromClauseProcess
conditionProcessCondition that is applied to all database queries. It is appended with "and" to the original queries.
orderClauseProcessReturns a map that specifies how the columns are to be ordered. This map is structured as follows:
onDBInsertProcess that runs when an entry is saved to the database.
onDBUpdateProcess that is executed when an entry in the database is updated.
onDBDeleteProcess that is executed when an entry in the database is deleted. As localvar, $local.uid (value of the ID column) and $local.rowdata (entry as JSON) are…
cacheTypeDefines the type for the caching of this record container. If no cacheType is selected, it will default to "NONE" and no cache will be used for this record…
cacheKeyProcessProcess that will return the computed cache key for the given cache request. The cache request is defined through the given local variables. It's expected to…

title

Type: String
Constraints: Verification: TITLE_LENGTH

Singular title of the model, e.g. Surname


description

Type: String

Short technical description of the model in plain text.


documentation

Type: String

Contains the documentation of the data model in the popular AsciiDoc format (.adoc). The documentation should be set by the developer to explain different aspects (like purpose, concept, etc.) of the data model that he designed.
You may want to add the plugin "AsciidoctorJ" to your ADITO Designer in order to modify AsciiDoc files.


recordFieldMappings

Type: Mappings

The record field mappings in this record container


filterExtensions

Type: FilterExtensions

The filter extensions given


alias

Type: String

The database alias that is associated with this recordcontainer


linkInformation

Type: LinkInfo

Specifies the links to the database. The linkInformation determines which data the core will fetch at a select and which table columns can be linked to components on the recordcontainer. Only tables that are in the alias associated with the recordcontainer can be specified here.
In the first place, the link information should be the primary key table of the recordcontainer, a table whose IDs do not appear twice. The linkInformation affects the select and the sorting of the recordcontainer, the index, as well as the automatic addition, modification and deletion of linked data records (e.g., relation record in the company).


maximumDbRows

Type: Integer
Constraints: Verification: NOT_NEGATIVE, Minimum: 0, Maximum: Integer.MAX_VALUE

Specifies the maximum number of items to display during a search. If this number is set to "0", all elements are loaded and a different number is used as the maximum number.


isPageable

Type: Boolean
Default: true

Determines whether the record container should load the data blockwise or deliver them all at once.


minimizeCountQueries

Type: Boolean
Requires: isPageable = false

When true, the recordContainer will perform less SELECT COUNT(*)...-queries and determine the count instead based on the loaded data. However, this may lead to different count results as a SELECT COUNT(*)...-query under certain circumstances.
This is a tradeoff of being faster due to less time-consuming queries, however some display values may not be as accurate. Enabling minimizeCountRequests will also affect the $local.datarowcountfull-variable.
Example when the recordContainer populates data of a ViewTemplate (table):
The RecordContainer is limited to 200 records (see maximumDbRows), while there exist 456 records in the database.
When minimizeCountRequests is true, the display value of the record-amount will be 200 and the $local.datarowcountfull-variable has the value "200".
→ It is impossible for the recordContainer to know the full count when no additional count query is performed.
When minimizeCountRequests is false, the display value of the record-amount will be 456 and the $local.datarowcountfull-variable has the value "456".
→ Thanks to the additional count-query, the recordContainer knows the full count of records and other modules (like the ViewTemplate) can use this information to display the overall full count.


supportsFilterExtensionGrouping

Type: Boolean
Requires: isPageable = false

This will enable filterExtensions even on non-pageable RecordContainers for grouping. Be aware of the consequences of enabling the support of filterExtensions (and filterExtensionSets): This will result in several queries for the recordContainer when grouped by a filterExtension (each group and entry will be an extra query). This will have an impact to the performance of loading the data (all data will be loaded).
In a DB-RecordContainer nothing more has to be done here.


isReadOnly

Type: Boolean
Default: false

Records of the record container can only be read. No data can be saved or deleted


isRequireContainerFiltering

Type: Boolean
Default: false

Forces a filtering of the records via the record container. No client-side filtering is possible.


hasDependentRecords

Type: Boolean
Default: false

If your records are interdependent, for example in a parent-child structure for trees, you should use this flag. This has effects when deleting records because now the data structure is always rebuilt → a refresh is triggered after deletion.


fromClauseProcess

Type: String


conditionProcess

Type: String

Condition that is applied to all database queries. It is appended with "and" to the original queries.


orderClauseProcess

Type: String

Returns a map that specifies how the columns are to be ordered. This map is structured as follows:
Key = column name
Value = Boolean that indicates whether the data should be sorted descending (true = desc, false = asc). If no value is specified, ascending is sorted.


onDBInsert

Type: String

Process that runs when an entry is saved to the database.
As localvar, $local.uid (value of the ID column) and $local.rowdata (entry as JSON) are available here.
It is not possible to return values from this process.

Parameters

$local.uid
  Value of the ID column

$local.rowdata
  Contains all data of the currently processed line as JSON

$local.changed
  Names of the changed fields


onDBUpdate

Type: String

Process that is executed when an entry in the database is updated.
As localvar, $local.uid (value of the ID column) and $local.rowdata (entry as JSON) are available here.
It is not possible to return values from this process.

Parameters

$local.uid
  Value of the ID column

$local.rowdata
  Contains all data of the currently processed line as JSON

$local.changed
  Names of the changed fields


onDBDelete

Type: String

Process that is executed when an entry in the database is deleted. As localvar, $local.uid (value of the ID column) and $local.rowdata (entry as JSON) are available here.
It is not possible to return values from this process.

Parameters

$local.uid
  Value of the ID column

$local.rowdata
  Contains all data of the currently processed line as JSON

$local.changed
  Names of the changed fields


cacheType

Type: ERecordContainerCacheType
Default: NONE
Requires: isPageable = false

Defines the type for the caching of this record container. If no cacheType is selected, it will default to "NONE" and no cache will be used for this record container. "NONE": Caching is disabled for this record container. "GLOBAL": A global cache store for all users on the current server will be used for this record container. "SESSION": A cache store which is scoped to the current user will be used for this record container.


cacheKeyProcess

Type: String
Requires: isPageable = false

Process that will return the computed cache key for the given cache request. The cache request is defined through the given local variables. It's expected to return a string, which acts as a unique key for the cache request. If null is returned, the current cache request will never be cached.

Parameters

$local.idvalues
  One-dimensional array of ID's

$local.filters
  Array of JSON objects with field, operator and value

$local.order
  JSON Object that determines the sort order

$local.grouping
  Array of strings with the grouped fields