Class QDLAggregateUtil


  • public class QDLAggregateUtil
    extends Object
    The QDL utility for processing aggregates (stems and sets). This allows for processing each scalar in an aggregate and handles navigating them in turn. Implement or extends the ProcessScalar interface.

    Processing aggregates.

    You can do them so they follow the standard QDL stem/set contracts when implementing a system function by executing the correct AbstractEvaluator.processN in an evaluator or if you have something specific address each scalar using this utility. This utility in particular is useful when writing Java extensions that implement QDLFunction where the machinery of FunctionEvaluator is not available.

    Usage

    If you have an aggregate and need to process scalars, call this with the right overrides to ProcessScalarImpl. That class simply passes back its arguments unchanged as a default behavior.

    Handling exceptions

    If you use this in an extension (so a Java class that extends QDLFunction) then you don't need to do anything special exception throw Java exceptions. If you are using this outside of that, then throws an UnknownTypeException for an unknown type. Since this does not have the actual QDL statement that triggered the error, it is set to null. You should catch the exception when calling this and fill that in with the right value so the user gets the right information.
    • Constructor Detail

      • QDLAggregateUtil

        public QDLAggregateUtil()
    • Method Detail

      • process

        public static Object process​(Object object,
                                     ProcessScalar processScalar)
        Top-level call for this set of utilities. Create the right scalar processor, then call this on a generic object. A scalar is processed and returned as such, aggregates are processed as aggregates.
        Parameters:
        object -
        processScalar -
        Returns: