Package com.google.visualization.datasource.query

Examples of com.google.visualization.datasource.query.QueryPivot.addColumn()


    Query q = new Query();
    QueryGroup group = new QueryGroup();
    group.addColumn(new SimpleColumn("Year"));
    q.setGroup(group);
    QueryPivot pivot = new QueryPivot();
    pivot.addColumn(new SimpleColumn("Band"));
    pivot.addColumn(new SimpleColumn("Songs"));
    q.setPivot(pivot);
    QuerySelection selection = new QuerySelection();
    selection.addColumn(new AggregationColumn(new SimpleColumn("Sales"),
        AggregationType.MAX));
View Full Code Here


    QueryGroup group = new QueryGroup();
    group.addColumn(new SimpleColumn("Year"));
    q.setGroup(group);
    QueryPivot pivot = new QueryPivot();
    pivot.addColumn(new SimpleColumn("Band"));
    pivot.addColumn(new SimpleColumn("Songs"));
    q.setPivot(pivot);
    QuerySelection selection = new QuerySelection();
    selection.addColumn(new AggregationColumn(new SimpleColumn("Sales"),
        AggregationType.MAX));
    selection.addColumn(new SimpleColumn("Year"));
View Full Code Here

        AggregationType.COUNT));
    q.setSelection(selection);

    // Add pivot.
    QueryPivot pivot = new QueryPivot();
    pivot.addColumn(new ScalarFunctionColumn(
        Lists.newArrayList((AbstractColumn) new SimpleColumn("lunchTime")),
        TimeComponentExtractor.getInstance(
            TimeComponentExtractor.TimeComponent.HOUR)));
    q.setPivot(pivot);
View Full Code Here

        AggregationType.COUNT));
    q1.setSelection(selection1);

    // Add pivot.
    QueryPivot pivot1 = new QueryPivot();
    pivot1.addColumn(new ScalarFunctionColumn(
        Lists.newArrayList((AbstractColumn) new SimpleColumn("lunchTime")),
        TimeComponentExtractor.getInstance(
            TimeComponentExtractor.TimeComponent.HOUR)));
    pivot1.addColumn(new ScalarFunctionColumn(
        Lists.<AbstractColumn>newArrayList(
View Full Code Here

    QueryPivot pivot1 = new QueryPivot();
    pivot1.addColumn(new ScalarFunctionColumn(
        Lists.newArrayList((AbstractColumn) new SimpleColumn("lunchTime")),
        TimeComponentExtractor.getInstance(
            TimeComponentExtractor.TimeComponent.HOUR)));
    pivot1.addColumn(new ScalarFunctionColumn(
        Lists.<AbstractColumn>newArrayList(
            new SimpleColumn("seniorityStartTime"),
            new SimpleColumn("hireDate")), DateDiff.getInstance()));
    q1.setPivot(pivot1);
View Full Code Here

            TimeComponentExtractor.TimeComponent.HOUR)));
    q.setGroup(group);

    // Add pivot.
    QueryPivot pivot = new QueryPivot();
    pivot.addColumn(new SimpleColumn("isSenior"));
    q.setPivot(pivot);

    q.validate();

    DataTable result = QueryEngine.executeQuery(q, res, ULocale.US);
View Full Code Here

            new SimpleColumn("hireDate")), DateDiff.getInstance()));
    q.setGroup(group);

    // Add pivot.
    pivot = new QueryPivot();
    pivot.addColumn(new SimpleColumn("isSenior"));
    q.setPivot(pivot);

    q.validate();

    result = QueryEngine.executeQuery(q, res, ULocale.US);
View Full Code Here

    group.addColumn(new SimpleColumn("isSenior"));
    q.setGroup(group);

    // Add pivot.
    QueryPivot pivot = new QueryPivot();
    pivot.addColumn(new ScalarFunctionColumn(
        Lists.newArrayList((AbstractColumn) new SimpleColumn("lunchTime")),
        TimeComponentExtractor.getInstance(
            TimeComponentExtractor.TimeComponent.HOUR)));
    q.setPivot(pivot);
View Full Code Here

    group.addColumn(new SimpleColumn("isSenior"));
    q.setGroup(group);

    // Add pivot.
    pivot = new QueryPivot();
    pivot.addColumn(new ScalarFunctionColumn(
        Lists.<AbstractColumn>newArrayList(
            new SimpleColumn("seniorityStartTime"),
            new SimpleColumn("hireDate")), DateDiff.getInstance()));
    q.setPivot(pivot);
View Full Code Here

        getInstance(TimeComponentExtractor.TimeComponent.YEAR)));
    q.setGroup(group);

    // Add pivot.
    QueryPivot pivot = new QueryPivot();
    pivot.addColumn(new ScalarFunctionColumn(Lists.newArrayList(
        (AbstractColumn) new SimpleColumn("lunchTime")),
        TimeComponentExtractor.getInstance(
            TimeComponentExtractor.TimeComponent.HOUR)));
    q.setPivot(pivot);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.