Package org.dashbuilder.dataset.group

Examples of org.dashbuilder.dataset.group.ColumnGroup


            _groupSelect.setSelectedIntervalNames(values);

        } else {
            _groupSelect = new DataSetGroup();
            _groupSelect.setSelectedIntervalNames(values);
            _groupSelect.setColumnGroup(new ColumnGroup(columnId, columnId, GroupStrategy.DYNAMIC));
        }
        // Notify to those interested parties the selection event.
        if (displayerSettings.isFilterNotificationEnabled()) {
            for (DisplayerListener listener : listenerList) {
                listener.onGroupIntervalsSelected(this, _groupSelect);
View Full Code Here


        columnSelectionMap.remove(columnId);
        DataSetGroup groupOp = dataSetHandler.getGroupOperation(columnId);
        if (groupOp == null || groupOp.getColumnGroup() == null) {
            groupOp = new DataSetGroup();
            groupOp.setColumnGroup(new ColumnGroup(columnId, columnId, GroupStrategy.DYNAMIC));
        }
        // Notify to those interested parties the reset event.
        if (displayerSettings.isFilterNotificationEnabled()) {
            for (DisplayerListener listener : listenerList) {
                listener.onGroupIntervalsReset(this, Arrays.asList(groupOp));
View Full Code Here

        List<DataSetGroup> groupOpList = new ArrayList<DataSetGroup>();
        for (String columnId : columnSelectionMap.keySet()) {
            DataSetGroup groupOp = dataSetHandler.getGroupOperation(columnId);
            if (groupOp == null || groupOp.getColumnGroup() == null) {
                groupOp = new DataSetGroup();
                groupOp.setColumnGroup(new ColumnGroup(columnId, columnId, GroupStrategy.DYNAMIC));
            }
            groupOpList.add(groupOp);

        }
        columnSelectionMap.clear();
View Full Code Here

        for (int i = fromIndex; i < operationList.size(); i++) {
            DataSetOp op = operationList.get(i);
            if (DataSetOpType.GROUP.equals(op.getType())) {
                DataSetGroup groupOp = (DataSetGroup) op;

                ColumnGroup cg = groupOp.getColumnGroup();
                if (cg != null && columnId != null && !cg.getColumnId().equals(columnId)) {
                    continue;
                }
                if (onlySelections && groupOp.getSelectedIntervalNames().isEmpty()) {
                    continue;
                }
View Full Code Here

        return group(columnId, newColumnId, strategy, maxIntervals, intervalSize.toString());
    }

    public T group(String columnId, String newColumnId, GroupStrategy strategy, int maxIntervals, String intervalSize) {
        DataSetGroup gOp = new DataSetGroup();
        gOp.setColumnGroup(new ColumnGroup(columnId, newColumnId, strategy, maxIntervals, intervalSize));
        dataSetLookup.addOperation(gOp);
        return (T) this;
    }
View Full Code Here

        DataSetGroup gOp = (DataSetGroup) getCurrentOp();
        if (gOp == null || gOp.getColumnGroup() == null) {
            throw new RuntimeException("group() must be called first.");
        }

        ColumnGroup columnGroup = gOp.getColumnGroup();
        columnGroup.setStrategy( GroupStrategy.FIXED );
        columnGroup.setIntervalSize( type.toString() );
        return (T) this;
    }
View Full Code Here

        DataSetGroup gOp = (DataSetGroup) getCurrentOp();
        if (gOp == null || gOp.getColumnGroup() == null) {
            throw new RuntimeException("group() must be called first.");
        }

        ColumnGroup columnGroup = gOp.getColumnGroup();
        columnGroup.setAscendingOrder( true );
        return (T) this;
    }
View Full Code Here

        DataSetGroup gOp = (DataSetGroup) getCurrentOp();
        if (gOp == null || gOp.getColumnGroup() == null) {
            throw new RuntimeException("group() must be called first.");
        }

        ColumnGroup columnGroup = gOp.getColumnGroup();
        columnGroup.setAscendingOrder( false );
        return (T) this;
    }
View Full Code Here

        DataSetGroup gOp = (DataSetGroup) getCurrentOp();
        if (gOp == null || gOp.getColumnGroup() == null) {
            throw new RuntimeException("group() must be called first.");
        }

        ColumnGroup columnGroup = gOp.getColumnGroup();
        if (!GroupStrategy.FIXED.equals(columnGroup.getStrategy())) {
            throw new RuntimeException("A fixed group is required.");
        }
        if (!DateIntervalType.DAY_OF_WEEK.equals(DateIntervalType.getByName(columnGroup.getIntervalSize()))) {
            throw new RuntimeException("A fixed DAY_OF_WEEK date group is required.");
        }
        columnGroup.setFirstDayOfWeek(dayOfWeek);
        return (T) this;
    }
View Full Code Here

        DataSetGroup gOp = (DataSetGroup) getCurrentOp();
        if (gOp == null || gOp.getColumnGroup() == null) {
            throw new RuntimeException("group() must be called first.");
        }

        ColumnGroup columnGroup = gOp.getColumnGroup();
        if (!GroupStrategy.FIXED.equals(columnGroup.getStrategy())) {
            throw new RuntimeException("A fixed group is required.");
        }
        if (!DateIntervalType.MONTH.equals(DateIntervalType.getByName(columnGroup.getIntervalSize()))) {
            throw new RuntimeException("A fixed MONTH date group is required.");
        }
        columnGroup.setFirstMonthOfYear(month);
        return (T) this;
    }
View Full Code Here

TOP

Related Classes of org.dashbuilder.dataset.group.ColumnGroup

Copyright © 2018 www.massapicom. 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.