Class CustomElementsUtil
java.lang.Object
com.denodo.common.custom.elements.CustomElementsUtil
This class allows the user to create instances of Custom types and values like
CustomArrayType, CustomArrayValue, CustomRecordType
and CustomRecordValue.- Since:
- 4.6
-
Method Summary
Modifier and TypeMethodDescriptionstatic CustomArrayTypecreateCustomArrayType(CustomRecordType arrayType) Factory method to instantiate aCustomArrayTypewithout name.static CustomArrayTypecreateCustomArrayType(String arrayName, CustomRecordType arrayType) Factory method to instantiate aCustomArrayType.static CustomArrayValuecreateCustomArrayValue(List<CustomRecordValue> values) Factory method to instantiate aCustomArrayValue.static CustomRecordTypecreateCustomRecordType(String recordName, LinkedHashMap<String, Object> properties) Factory method to instantiate aCustomRecordValue.static CustomRecordTypecreateCustomRecordType(LinkedHashMap<String, Object> properties) Factory method to instantiate aCustomRecordValuewithout name.static CustomRecordValuecreateCustomRecordValue(LinkedHashMap<String, Object> properties) Factory method to instantiate aCustomRecordValue.static QueryContextReturns context information about the query executing the function.
-
Method Details
-
createCustomArrayType
Factory method to instantiate aCustomArrayType.- Parameters:
arrayName- Name of the type.arrayType- Type that this array will represent a list of.- Returns:
- The created type.
-
createCustomArrayType
Factory method to instantiate aCustomArrayTypewithout name.- Parameters:
arrayType- Type that this array will represent a list of.- Returns:
- The created type.
-
createCustomArrayValue
Factory method to instantiate aCustomArrayValue.- Parameters:
values- List of records stored in the array.- Returns:
- The created value.
-
createCustomRecordType
public static CustomRecordType createCustomRecordType(String recordName, LinkedHashMap<String, Object> properties) Factory method to instantiate aCustomRecordValue.- Parameters:
recordName- Name of the type.properties- Fields for the new record. The map key stores the field name and the Object is the field type.- Returns:
- The created type.
-
createCustomRecordType
Factory method to instantiate aCustomRecordValuewithout name.- Parameters:
properties- Fields for the new record. The map key stores the field name and the Object is the field type.- Returns:
- The created type.
-
createCustomRecordValue
Factory method to instantiate aCustomRecordValue.- Parameters:
properties- The field values for the new record. The map key stores the field name and the object is the field value.- Returns:
- The created value
-
getQueryContext
Returns context information about the query executing the function. Such object contains: user, roles and database.Note: this method only returns a
QueryContextwhen is invoked from a custom function. It returnsNULLwhen is invoked from a custom stored procedure, a custom wrapper or a custom input filter.- Returns:
- QueryContext containing information about the query executing the function
- Since:
- 6.0 Update 20160429
-