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 CustomArrayType
createCustomArrayType
(CustomRecordType arrayType) Factory method to instantiate aCustomArrayType
without name.static CustomArrayType
createCustomArrayType
(String arrayName, CustomRecordType arrayType) Factory method to instantiate aCustomArrayType
.static CustomArrayValue
createCustomArrayValue
(List<CustomRecordValue> values) Factory method to instantiate aCustomArrayValue
.static CustomRecordType
createCustomRecordType
(String recordName, LinkedHashMap<String, Object> properties) Factory method to instantiate aCustomRecordValue
.static CustomRecordType
createCustomRecordType
(LinkedHashMap<String, Object> properties) Factory method to instantiate aCustomRecordValue
without name.static CustomRecordValue
createCustomRecordValue
(LinkedHashMap<String, Object> properties) Factory method to instantiate aCustomRecordValue
.static QueryContext
Returns 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 aCustomArrayType
without 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 aCustomRecordValue
without 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
QueryContext
when is invoked from a custom function. It returnsNULL
when 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
-