EntityRecordsRecipeBuilder
Builder object for creating a EntityRecordsRecipe.
Methods
entity
entity(
pEntity):EntityRecordsRecipeBuilder
Sets the name of the entity to load the data from
Parameters
string | number | booleanname of entity*
Returns
EntityRecordsRecipeBuilderfilter
filter(
pFilter):EntityRecordsRecipeBuilder
Sets a filter when loading the entity
Parameters
anythe filter, JSON - format as defined for entity-filters
Returns
EntityRecordsRecipeBuilderThrows
AditoIllegalArgumentException
getEntity
getEntity():
string
Returns the name of the entity in the EntityRecordsRecipe
Returns
stringname of entity
getFilter
getFilter():
string
Returns the filter of the EntityRecordsRecipe as json
Returns
stringthe filter, JSON - format as defined for entity-filters
getGrouping
getGrouping():
string
Returns the grouping fields of the EntityRecordsRecipe as JSON-Array.
Returns
stringFields as JSON-array of strings, for example:
"["STATUS","CATEGORY"]"
getOrder
getOrder():
string
Returns the order of the EntityRecordsRecipe as JSON-Array.
Returns
stringorder definition as a string of an JSON-array containing objects where each object is a key-value-pair where the key is the name of the field that is ordered and value is the sorting direction
valid values are: "asc" and "desc" (case insensitive)
Example:
[{"NAME": "asc"}, {"CUSTOMERCODE": "desc"}]
getParameters
getParameters():
any
Returns the parameters of the EntityRecordsRecipe as key-value-pairs.
Returns
anyparameters as key-value-pairs
getProvider
getProvider():
string
Returns the name of the provider in the EntityRecordsRecipe
Returns
stringname of the provider that is used for loading the data
getUidsExcludelist
getUidsExcludelist():
string[]
Returns the excluded ids of the EntityRecordsRecipe as array.
Returns
string[]Array of IDs that represents records that are not affected
getUidsIncludeList
getUidsIncludeList():
string[]
Returns the included ids of the EntityRecordsRecipe as array.
Returns
string[]Array of IDs that represents the affected records
grouping
grouping(
pGrouping):EntityRecordsRecipeBuilder
Sets fields for grouping the records in the recordContainer. Given fields need to be group able. Records are grouped in the given array order, so the first field in the array, is the first field that is grouped by.
Parameters
string | number | booleanFields as JSON-array of strings, for example: "["STATUS","CATEGORY"]"
Returns
EntityRecordsRecipeBuilderorder
order(
pOrder):EntityRecordsRecipeBuilder
Sets an order for sorting the records.
Parameters
string | number | booleanorder definition as a string of an JSON-array containing objects where each object is a key-value-pair where the key is the name of the field that is ordered and value is the sorting direction valid values are: "asc" and "desc" (case insensitive) Example: [{"NAME": "asc"}, {"CUSTOMERCODE": "desc"}]
Returns
EntityRecordsRecipeBuilderparameters
parameters(
pParameters):EntityRecordsRecipeBuilder
Sets a several parameters at once.
Parameters
anyparameters as key-value-pairs (JavaScript object, not the Javascript Map)
Returns
EntityRecordsRecipeBuilderThrows
AditoIllegalArgumentException
Example
<br/>
var myRecordsRecipeBuilder = neonFilter.createEntityRecordsRecipeBuilder();
<br/>
var myParams = { <br/>
"$param.forceSave": "false", <br/>
"$param.presetLinks": JSON.stringify([["Organisation", organisationContactId]])//only strings are allowed parameter values in the UEM <br/>
} <br/>
myRecordsRecipeBuilder.parameters(myParams);
provider
provider(
pProvider):EntityRecordsRecipeBuilder
Sets the name of the provider für loading the entity data
Parameters
string | number | booleanname of the provider that is used for loading the data
Returns
EntityRecordsRecipeBuildertoString
toString():
string
Returns
stringReturns a JSON-string of the EntityRecordsRecipe
uidsExcludelist
uidsExcludelist(
pUids):EntityRecordsRecipeBuilder
Sets a list of IDs that is used as an additional filter. Only records that have not the given IDs are affected. Use this with caution. Depending on what the use of the EntityRecordsRecipe it this may cause problems when a lot of elements are set here.
For example loading data from an entity where the source is a index recordContainer. In an index recordContainer the amount of terms is limited. Every UID needs to be excluded separately and results in a term.
Another example is that for opening a context with a recipe every passed UID is part of the URL. Because Contexts may be opened in a new tab or duplicated by the user all the information about a view need to be part of the URL.
tl;dr; Don't pass thousands of Uids here if you have no control what is done with the EntityRecordsRecipe.
The excluded UID list can be combined with a filter and the uidsIncludelist.
Parameters
string[]Array of IDs that represents records that are not affected
Returns
EntityRecordsRecipeBuilderuidsIncludelist
uidsIncludelist(
pUids):EntityRecordsRecipeBuilder
Sets a list of IDs that is used as an additional filter. Only records with the given IDs are affected. This can be combined with a filter and the uidsExcludelist.
Use this with caution. Depending on what the use of the EntityRecordsRecipe it this may cause problems when a lot of elements are set here.
For example loading data from an entity where the source is a index recordContainer. In an index recordContainer the amount of terms is limited. Every UID needs to be included separately and results in a term.
Another example is that for opening a context with a recipe every passed UID is part of the URL. Because Contexts may be opened in a new tab or duplicated by the user all the information about a view need to be part of the URL.
tl;dr; Don't pass thousands of Uids here if you have no control what is done with the EntityRecordsRecipe.
The included UID list can be combined with a filter and the uidsExcludelist.
Parameters
string[]Array of IDs that represents the affected records
Returns
EntityRecordsRecipeBuilder