The "Analytic" class is the entry point for a developer attempting to present a view of analytic data in an application. It defines a static nested class "Builder" that follows the Builder Pattern. This Builder class builds an Analytic object that can be used to perform analytic operations.
The "Builder" class builds Analytic objects. It has some methods that can be used to control how the resultant Analytic object behaves.
AnalyticAggregator agg1 = new AnalyticAggregator.Builder() .setAnalyticFunction(new LeadAnalytic("qty") .setPartition(new PartitionClause(Arrays.asList("year", "quarter")))) .build();
AnalyticAggregator agg2 = AnaltyicAggregator.getAnalytic("Lead(qty) partitionBy(year, quarter)");
The "setAnalytics" method returns the same Builder object, so that calls may be chained, e.g.
Analytic ana = new Analytic.Builder().setAnalytics(anaList).build();
The "Analytic" object is responsible for performing all analytic operations. It has the method that performs the actual analytics operations.
This method returns a List of AnalyticValues, which contain the completed analytic results.