Breadcrumbs

loads (provided FTL library)

loads

This ftl library contains utility functions to do generic operations with load model.


findAttributes (FUNCTION)

Finds attributes with given search criterias

Parameters:

  • attributes REQUIRED - list of target attributes

  • excludedAttributesList OPTIONAL - the attribute names to be excluded (defaults [] not used for filtring)

  • includedAttributesList OPTIONAL - the attribute names to be included (defaults [] not used for filtring)

  • includedAttributePrefixList OPTIONAL - the list of attribute prefixes to be included (defaults [] not used for filtring)

  • includedAttributeTypeList OPTIONAL - the list of attribute types to be included (defaults [] not used for filtring)

Returns:

list of all the attributes matching the search criterias


getLoadOptionOrDefault (FUNCTION)

Gets load option or given default value

Parameters:

  • loadOption REQUIRED - the load option written as in UI

  • defaultValue REQUIRED - the value to be used in case no value has been set

Returns:

the value of the wanted load option or the given default value


getLoadOptionOrDefaultAsArray (FUNCTION)

Gets load option or given default value as an array item

Parameters:

  • loadOption REQUIRED - the load option written as in UI

  • defaultValue REQUIRED - the value to be used in case no value has been set

Returns:

the value of the wanted load option or the given default value as an array item


useBatchLoading (FUNCTION)

Function to check whether batch loading is active

Returns:

boolean whether batch loading is being used


useTimeslotLogic (FUNCTION)

Function to check whether timeslot logic is active

Returns:

boolean whether batch loading is being used


getAttributeForType (FUNCTION)

Gets an attribute with specified attribute type or throws an error

Parameters:

  • attributes REQUIRED - the list of attributes

  • type REQUIRED - the searched attribute type

Returns:

the attribute matching the attribute type or throws an error


findAttributeForType (FUNCTION)

Finds an attribute with specified attribute type or an empty string

Parameters:

  • attributes REQUIRED - the list of attributes

  • type REQUIRED - the searched attribute type

Returns:

the attribute matching the attribute type or empty string


findSourceAttributesForAttribute (FUNCTION)

Finds source attributes for specified target entity attribute

Parameters:

  • attribute REQUIRED - the target attribute

Returns:

the source attributes mapped to this target attribute


getSourceEntity (FUNCTION)

Gets source entity in given position or throws an error

Parameters:

  • mappingPosition OPTIONAL - the source position wanted, position is 1-based (defaults to 1)

Returns:

the entity on the given position or throws an error


findSourceEntity (FUNCTION)

Finds a source entity on given position or gives an empty string

Parameters:

  • mappingPosition OPTIONAL - the source position wanted, position is 1-based (defaults to 1)

Returns:

the entity on the given position or empty string


getSingleAttributeTransformation (FUNCTION)

This function is to generate the transformation for specific target attribute

Parameters:

  • attribute REQUIRED - the target entity attribute involved

  • prefix OPTIONAL - prefix to be used with source attributes (defaults to "")

  • overrideAttributeTransformationMap OPTIONAL - overriding transformation type for specific attributes

Returns:

target attribute specific transformation


getTransformationForAttributes (FUNCTION)

This function is to generate a transformation for specific attribute list

Parameters:

  • transformationFormulaType REQUIRED - the transformation formula type wanted

  • attributes REQUIRED - the attributes involved

  • prefix OPTIONAL - prefix to be used with source attributes (defaults to "")

  • sourceEntity OPTIONAL - source entity

  • targetAttributeName OPTIONAL - target attribute name

  • physicalDatatype OPTIONAL - physical datatype (defaults to "")

Returns:

transformation formula executed for given list of attributes


getCurrentViewName (FUNCTION)

This function provides the current view entity name

Parameters:

  • targetEntity REQUIRED - the entity for which the current view needs to be resolved

Returns:

Current view name


getAttributeFullName (FUNCTION)

Attribute full name provider. Adds prefix and postfix and encapsulates the name if needed

Parameters:

  • attribute REQUIRED - the wanted attribute

  • prefix OPTIONAL - the wanted prefix

  • encapsulate OPTIONAL - boolean whether the value is to be encapsulated (defaults to false)

  • postfix OPTIONAL - the wanted postfix

Returns:

Combination of <prefix>.<attributeName> <postfix>


isEncapsulationRequired (FUNCTION)

Function for identifying whether encapsulation is needed for DBMS product

Returns:

Boolean whether encapsulation is required