public class DataSetHandlerImpl extends Object implements DataSetHandler
| Modifier and Type | Class and Description |
|---|---|
protected static class |
DataSetHandlerImpl.GroupOpFilter |
| Modifier and Type | Field and Description |
|---|---|
protected Map<String,List<DataSetHandlerImpl.GroupOpFilter>> |
_groupOpsAdded |
protected Map<String,List<DataSetHandlerImpl.GroupOpFilter>> |
_groupOpsSelected |
protected DataSetClientServices |
clientServices |
protected org.dashbuilder.dataset.DataSet |
lastLookedUpDataSet |
protected org.dashbuilder.dataset.DataSetLookup |
lookupBase |
protected org.dashbuilder.dataset.DataSetLookup |
lookupCurrent |
| Constructor and Description |
|---|
DataSetHandlerImpl(DataSetClientServices clientServices,
org.dashbuilder.dataset.DataSetLookup lookup) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
_filter(int index,
org.dashbuilder.dataset.group.DataSetGroup op,
boolean drillDown) |
protected String |
_getSourceColumnId(String columnId) |
protected void |
_select(org.dashbuilder.dataset.group.DataSetGroup op,
List<org.dashbuilder.dataset.group.Interval> intervalList) |
protected boolean |
_unfilter(org.dashbuilder.dataset.group.DataSetGroup op,
boolean drillDown) |
boolean |
drillDown(org.dashbuilder.dataset.group.DataSetGroup op)
Applies the specified group interval selection operation over the existing group op.
|
boolean |
drillUp(org.dashbuilder.dataset.group.DataSetGroup op)
Reverts the changes applied by a previous drillDown operation.
|
void |
exportCurrentDataSetLookup(ExportFormat format,
int maxRows,
ExportCallback callback,
Map<String,String> columnNameMap)
Export the current data set to a file in the specified output format.
|
boolean |
filter(org.dashbuilder.dataset.filter.DataSetFilter op)
Forces the underlying data set to be updated according the specified filter.
|
boolean |
filter(org.dashbuilder.dataset.group.DataSetGroup op)
Forces the underlying data set to be updated according the group interval selection filter.
|
org.dashbuilder.dataset.DataSetLookup |
getCurrentDataSetLookup()
Get the current data set lookup (if any)
|
org.dashbuilder.dataset.group.DataSetGroup |
getGroupOperation(String columnId)
Retrieves any group operation present in the current data set lookup for the target column specified.
|
org.dashbuilder.dataset.group.Interval |
getInterval(String columnId,
int row)
Get the interval at the given row for the column specified.
|
org.dashbuilder.dataset.DataSet |
getLastDataSet()
Get the data set get on the last lookup call (if any)
|
void |
limitDataSetRows(int offset,
int rows)
Forces the next data set lookup request to retrieve only the specified row sub set.
|
void |
lookupDataSet(DataSetReadyCallback callback)
Executes the current data set lookup request configured within this handler.
|
void |
resetAllOperations()
Restore the current data set lookup instance to its base status.
|
void |
sort(String columnId,
org.dashbuilder.dataset.sort.SortOrder sortOrder)
Set the sort order operation to apply to the data set.
|
boolean |
unfilter(org.dashbuilder.dataset.filter.DataSetFilter op)
Reverts the changes applied by a previous filter operation.
|
boolean |
unfilter(org.dashbuilder.dataset.group.DataSetGroup op)
Reverts the changes applied by a previous filter operation.
|
boolean |
unsort() |
protected DataSetClientServices clientServices
protected org.dashbuilder.dataset.DataSetLookup lookupBase
protected org.dashbuilder.dataset.DataSetLookup lookupCurrent
protected org.dashbuilder.dataset.DataSet lastLookedUpDataSet
protected Map<String,List<DataSetHandlerImpl.GroupOpFilter>> _groupOpsAdded
protected Map<String,List<DataSetHandlerImpl.GroupOpFilter>> _groupOpsSelected
public DataSetHandlerImpl(DataSetClientServices clientServices, org.dashbuilder.dataset.DataSetLookup lookup)
public org.dashbuilder.dataset.DataSet getLastDataSet()
DataSetHandlergetLastDataSet in interface DataSetHandlerpublic org.dashbuilder.dataset.DataSetLookup getCurrentDataSetLookup()
DataSetHandlergetCurrentDataSetLookup in interface DataSetHandlerpublic void resetAllOperations()
DataSetHandlerresetAllOperations in interface DataSetHandlerpublic void limitDataSetRows(int offset,
int rows)
DataSetHandlerlimitDataSetRows in interface DataSetHandleroffset - The position where the row sub set starts.rows - The number of rows to get.public org.dashbuilder.dataset.group.DataSetGroup getGroupOperation(String columnId)
DataSetHandlergetGroupOperation in interface DataSetHandlercolumnId - The column id. to look for.public boolean filter(org.dashbuilder.dataset.group.DataSetGroup op)
DataSetHandlerfilter in interface DataSetHandlerop - The group interval selection operation to apply op.getSelectedIntervalNames() MUST NOT BE EMPTY.public boolean filter(org.dashbuilder.dataset.filter.DataSetFilter op)
DataSetHandlerfilter in interface DataSetHandlerop - The filter operation to apply.public boolean drillDown(org.dashbuilder.dataset.group.DataSetGroup op)
DataSetHandlerdrillDown in interface DataSetHandlerop - The group interval selection operation to apply op.getSelectedIntervalNames() MUST NOT BE EMPTY.public boolean unfilter(org.dashbuilder.dataset.group.DataSetGroup op)
DataSetHandlerunfilter in interface DataSetHandlerop - The operation to remove.public boolean unfilter(org.dashbuilder.dataset.filter.DataSetFilter op)
DataSetHandlerunfilter in interface DataSetHandlerop - The operation to remove.public boolean drillUp(org.dashbuilder.dataset.group.DataSetGroup op)
DataSetHandlerdrillUp in interface DataSetHandlerop - The operation to remove.public void sort(String columnId, org.dashbuilder.dataset.sort.SortOrder sortOrder)
DataSetHandlersort in interface DataSetHandlercolumnId - The name of the column to sort.sortOrder - The sort order.public boolean unsort()
public void lookupDataSet(DataSetReadyCallback callback) throws Exception
DataSetHandlerlookupDataSet in interface DataSetHandlercallback - The callback interface that is invoked right after the data is available.Exceptionpublic org.dashbuilder.dataset.group.Interval getInterval(String columnId, int row)
DataSetHandlerIn case of grouped data sets, the interval may contain information related to the group operation. For instance, for a data set grouped by month, will return an interval containing the min/max dates of such month.
For non-grouped or grouped by label data sets, will return only an interval with the value of the row/column selected.
The interval information is useful for filtering purposes as the data provider needs all the information related to the selected interval.getInterval in interface DataSetHandlercolumnId - The column id.row - The row which interval we want to retrieve.public void exportCurrentDataSetLookup(ExportFormat format, int maxRows, ExportCallback callback, Map<String,String> columnNameMap)
DataSetHandlerexportCurrentDataSetLookup in interface DataSetHandlerformat - The output formatmaxRows - Max rows to be exported.callback - The callback instance to be notifiedcolumnNameMap - A map containing the column header names for every column in the data set lookupprotected void _filter(int index,
org.dashbuilder.dataset.group.DataSetGroup op,
boolean drillDown)
protected void _select(org.dashbuilder.dataset.group.DataSetGroup op,
List<org.dashbuilder.dataset.group.Interval> intervalList)
protected boolean _unfilter(org.dashbuilder.dataset.group.DataSetGroup op,
boolean drillDown)
Copyright © 2012–2017 JBoss by Red Hat. All rights reserved.