Compound Types¶
In custom functions, compound types and compound values are represented with the following Java classes:
Registers:
com.denodo.common.custom.elements.CustomRecordTyperepresents the type of a register field (not a value of the register).Its method
getProperties()returns a collection of name-type pairs. Each element of the collection holds the type of one of the fields of the register. The class of theObjectreturned by the methodgetType()of the interfaceCustomRecordType.Propertydepends on the type of the field:If the type of the field is basic, the method returns a
java.lang.Class:Long.class,Integer.class,String.class, etc.If the type of the field is a register, the method returns a
CustomRecordTypeobject.If the type of the field is an array, the method returns a
CustomArrayTypeobject.
com.denodo.common.custom.elements.CustomRecordValuerepresents the value of register field.Its method
getProperties()returns a collection of name-value pairs of the register. Each element of the collection holds the value of one of the fields of the register. The class of theObjectreturned by the methodgetValue()of the interfaceCustomRecordValue.Propertydepends on the type of the field:If the type of the value is basic, the method returns a basic Java object:
java.lang.String,java.lang.Integer,java.lang.String, etc.If the type of the field is a register, the method returns a
CustomRecordValueobject.If the type of the field is an array, the method returns a
CustomArrayValueobject.
Arrays:
com.denodo.common.custom.elements.CustomArrayTyperepresents the data type of an array field (not a value of the array). It holds the name of the type and an instance ofCustomRecordTypewith the type of the elements of the array (an array is always an array of registers)com.denodo.common.custom.elements.CustomArrayValuerepresents the values of an array. It holds a list ofCustomRecordValueobjects.com.denodo.common.custom.elements.CustomGroupValuerepresents the list of values coming from a non-aggregation field in an aggregation function.
The class CustomElementsUtil provides methods to create array and
register types and values.
