public class PivotTableModel extends AbstractPivotObject
Constructor and Description |
---|
PivotTableModel() |
Modifier and Type | Method and Description |
---|---|
PivotTableModel |
addAggregationProperties(java.lang.String... aggregationProperties)
Original property name:
vals . |
PivotTableModel |
addCols(java.lang.String... cols)
Adds an array of attribute names to use as columns.
|
PivotTableModel |
addData(DataItem... dataItems)
Adds a data item to the data provider.
|
PivotTableModel |
addExclusions(java.lang.String property,
java.lang.String... exclusions)
Adds property values to a given property
which denote records to exclude from rendering; used to prepopulate the filter menus
that appear on double-click.
|
PivotTableModel |
addHiddenFromAggregations(java.lang.String... hiddenFromAggregations)
Adds attribute names to omit from the aggregation arguments dropdowns.
|
PivotTableModel |
addHiddenFromDragDrop(java.lang.String... hiddenFromDragDrop)
Adds attribute names to omit from the drag'n'drop portion of the UI.
|
PivotTableModel |
addHiddenProperties(java.lang.String... hiddenProperties)
Adds attribute names to omit from the UI.
|
PivotTableModel |
addInclusions(java.lang.String property,
java.lang.String... inclusions)
Adds property values to a given property
which denote records to include in rendering; used to prepopulate the filter menus
that appear on double-click (overrides
exclusions ). |
PivotTableModel |
addProperties(java.util.Map<java.lang.String,java.lang.String> properties)
Adds data provider properties to serialize.
|
PivotTableModel |
addProperty(java.lang.String property,
java.lang.String value)
Sets data provider property to serialize.
|
PivotTableModel |
addRows(java.lang.String... rows)
Adds an array of attribute names to use as rows.
|
Aggregation |
getAggregation() |
java.util.List<java.lang.String> |
getAggregationProperties() |
Aggregations |
getAggregations() |
java.lang.Boolean |
getAutoSortUnusedProperties() |
java.util.List<java.lang.String> |
getCols() |
ColumnOrder |
getColumnOrder() |
DataProvider |
getDataProvider() |
DerivedProperties |
getDerivedProperties() |
boolean |
getEditable() |
java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
getExclusions() |
JsFunction |
getFilterFunction() |
java.util.List<java.lang.String> |
getHiddenFromAggregations() |
java.util.List<java.lang.String> |
getHiddenFromDragDrop() |
java.util.List<java.lang.String> |
getHiddenProperties() |
java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
getInclusions() |
java.lang.String |
getLocaleCode() |
java.lang.Integer |
getMenuLimit() |
java.util.Map<java.lang.String,java.lang.String> |
getProperties() |
Renderer |
getRenderer() |
RendererOptions |
getRendererOptions() |
Renderers |
getRenderers() |
RowOrder |
getRowOrder() |
java.util.List<java.lang.String> |
getRows() |
JsFunction |
getSortersFunction() |
UnusedPropertiesVertical |
getUnusedPropertiesVertical() |
java.util.List<java.lang.String> |
getWiredFields() |
java.lang.Boolean |
isShowColTotals() |
java.lang.Boolean |
isShowRowTotals() |
java.lang.Boolean |
isShowUI() |
PivotTableModel |
setAggregation(Aggregation aggregation)
Original property name:
aggregator . |
PivotTableModel |
setAggregationProperties(java.util.List<java.lang.String> aggregationProperties)
Original property name:
vals . |
PivotTableModel |
setAggregations(Aggregations aggregations)
Original property name:
aggregators . |
PivotTableModel |
setAutoSortUnusedProperties(java.lang.Boolean autoSortUnusedProperties)
Original property name:
autoSortUnusedAttrs . |
PivotTableModel |
setCols(java.util.List<java.lang.String> cols)
Sets a collection of attribute names to use as columns.
|
PivotTableModel |
setColumnOrder(ColumnOrder columnOrder)
Sets the order in which column data is provided to the renderer.
|
PivotTableModel |
setDataProvider(DataProvider dataProvider)
Sets a data provider for PivotTable.
|
PivotTableModel |
setDerivedProperties(DerivedProperties derivedProperties)
Original property name:
derivedAttributes . |
PivotTableModel |
setEditable(boolean editable) |
PivotTableModel |
setExclusions(java.util.Map<java.lang.String,java.util.List<java.lang.String>> exclusions)
Sets a map whose keys are attribute names and values are arrays of attribute values
which denote records to exclude from rendering; used to prepopulate the filter menus
that appear on double-click.
|
PivotTableModel |
setExclusions(java.lang.String property,
java.util.List<java.lang.String> exclusions)
Sets a list whose values are arrays of attribute values
which denote records to exclude from rendering; used to prepopulate the filter menus
that appear on double-click.
|
PivotTableModel |
setFilterFunction(JsFunction filter)
Original property name:
filter . |
PivotTableModel |
setHiddenFromAggregations(java.util.List<java.lang.String> hiddenFromAggregations)
Sets attribute names to omit from the aggregation arguments dropdowns.
|
PivotTableModel |
setHiddenFromDragDrop(java.util.List<java.lang.String> hiddenFromDragDrop)
Sets attribute names to omit from the drag'n'drop portion of the UI.
|
PivotTableModel |
setHiddenProperties(java.util.List<java.lang.String> hiddenProperties)
Sets attribute names to omit from the UI.
|
PivotTableModel |
setInclusions(java.util.Map<java.lang.String,java.util.List<java.lang.String>> inclusions)
Sets a map whose keys are attribute names and values are arrays of attribute values
which denote records to include in rendering; used to prepopulate the filter menus
that appear on double-click (overrides
exclusions ). |
PivotTableModel |
setInclusions(java.lang.String property,
java.util.List<java.lang.String> inclusions)
Sets a list whose values are arrays of attribute values
which denote records to include in rendering; used to prepopulate the filter menus
that appear on double-click (overrides
exclusions ). |
PivotTableModel |
setLocaleCode(java.lang.String localeCode)
Sets a locale code
|
PivotTableModel |
setMenuLimit(java.lang.Integer menuLimit)
Sets the maximum number of values to list in the double-click menu.
|
PivotTableModel |
setProperties(java.util.Map<java.lang.String,java.lang.String> properties)
Sets data provider properties to serialize.
|
PivotTableModel |
setRenderer(Renderer renderer)
Sets a descriptor of an object which will generate output from pivot data structure
(see documentation).
|
PivotTableModel |
setRendererOptions(RendererOptions rendererOptions)
Sets an object that is passed through to renderer as options.
|
PivotTableModel |
setRenderers(Renderers renderers)
Sets an object that represents a list of rendering functions
(see documentation).
|
PivotTableModel |
setRowOrder(RowOrder rowOrder)
Sets the order in which row data is provided to the renderer.
|
PivotTableModel |
setRows(java.util.List<java.lang.String> rows)
Sets a collection of attribute names to use as rows.
|
void |
setShowColTotals(java.lang.Boolean colTotals)
Shows or hides col totals.
|
void |
setShowRowTotals(java.lang.Boolean rowTotals)
Shows or hides row totals.
|
void |
setShowUI(java.lang.Boolean showUI)
Shows or hides UI.
|
PivotTableModel |
setSortersFunction(JsFunction sorters)
Original property name:
sorters . |
PivotTableModel |
setUnusedPropertiesVertical(UnusedPropertiesVertical unusedPropertiesVertical)
Original property name:
unusedAttrsVertical . |
public boolean getEditable()
false
then pivot()
function will
be called to generate PivotTable, pivotUI()
otherwisepublic PivotTableModel setEditable(boolean editable)
editable
- if false
then pivot()
function will be
called to generate PivotTable, pivotUI()
otherwisepublic java.util.Map<java.lang.String,java.lang.String> getProperties()
public PivotTableModel setProperties(java.util.Map<java.lang.String,java.lang.String> properties)
properties
- data provider properties to serializepublic PivotTableModel addProperties(java.util.Map<java.lang.String,java.lang.String> properties)
properties
- data provider properties to serializepublic PivotTableModel addProperty(java.lang.String property, java.lang.String value)
property
- data provider property to serializevalue
- a property valuepublic java.util.List<java.lang.String> getRows()
public PivotTableModel setRows(java.util.List<java.lang.String> rows)
rows
- a collection of attribute names to use as rowspublic PivotTableModel addRows(java.lang.String... rows)
rows
- an array of attribute names to addpublic java.util.List<java.lang.String> getCols()
public PivotTableModel setCols(java.util.List<java.lang.String> cols)
cols
- a collection of attribute names to use as columnspublic PivotTableModel addCols(java.lang.String... cols)
cols
- an array of attribute names to addpublic Aggregation getAggregation()
public PivotTableModel setAggregation(Aggregation aggregation)
aggregator
.
Sets a descriptor of an object which will aggregate results per cell (see documentation).
Applies only when editable=false
.
aggregation
- an object which will aggregate results per cellpublic Renderer getRenderer()
public PivotTableModel setRenderer(Renderer renderer)
Applies only when editable=false
.
renderer
- an object which will generate output from pivot data structurepublic java.util.List<java.lang.String> getAggregationProperties()
public PivotTableModel setAggregationProperties(java.util.List<java.lang.String> aggregationProperties)
vals
.
Sets attribute names to prepopulate in vals area (gets passed to aggregator generating function).
Applies only when editable=true
.
aggregationProperties
- attribute names to prepopulate in vals areapublic PivotTableModel addAggregationProperties(java.lang.String... aggregationProperties)
vals
.
Adds attribute names to prepopulate in vals area (gets passed to aggregator generating function).
Applies only when editable=true
.
aggregationProperties
- attribute names to prepopulate in vals areapublic Aggregations getAggregations()
public PivotTableModel setAggregations(Aggregations aggregations)
aggregators
.
Sets an object that represents a list of generators for aggregation functions in dropdown (see documentation).
Applies only when editable=true
.
aggregations
- an object that represents a list of generators for aggregation functions in dropdownpublic Renderers getRenderers()
public PivotTableModel setRenderers(Renderers renderers)
Applies only when editable=true
.
renderers
- n object that represents a list of rendering functionspublic java.util.List<java.lang.String> getHiddenProperties()
public PivotTableModel setHiddenProperties(java.util.List<java.lang.String> hiddenProperties)
Applies only when editable=true
.
hiddenProperties
- attribute names to omit from the UIpublic PivotTableModel addHiddenProperties(java.lang.String... hiddenProperties)
Applies only when editable=true
.
hiddenProperties
- attribute names to omit from the UIpublic java.util.List<java.lang.String> getHiddenFromAggregations()
public PivotTableModel setHiddenFromAggregations(java.util.List<java.lang.String> hiddenFromAggregations)
Applies only when editable=true
.
hiddenFromAggregations
- attribute names to omit from the aggregation arguments dropdownspublic PivotTableModel addHiddenFromAggregations(java.lang.String... hiddenFromAggregations)
Applies only when editable=true
.
hiddenFromAggregations
- attribute names to omit from the aggregation arguments dropdownspublic java.util.List<java.lang.String> getHiddenFromDragDrop()
public PivotTableModel setHiddenFromDragDrop(java.util.List<java.lang.String> hiddenFromDragDrop)
Applies only when editable=true
.
hiddenFromDragDrop
- attribute names to omit from the drag'n'drop portion of the UIpublic PivotTableModel addHiddenFromDragDrop(java.lang.String... hiddenFromDragDrop)
Applies only when editable=true
.
hiddenFromDragDrop
- attribute names to omit from the drag'n'drop portion of the UIpublic ColumnOrder getColumnOrder()
public PivotTableModel setColumnOrder(ColumnOrder columnOrder)
Ordering by value orders by column total.
columnOrder
- the order in which column data is provided to the rendererpublic RowOrder getRowOrder()
public PivotTableModel setRowOrder(RowOrder rowOrder)
Ordering by value orders by row total.
rowOrder
- the order in which row data is provided to the rendererpublic java.lang.Integer getMenuLimit()
public PivotTableModel setMenuLimit(java.lang.Integer menuLimit)
Applies only when editable=true
.
menuLimit
- the maximum number of values to list in the double-click menupublic java.lang.Boolean getAutoSortUnusedProperties()
public PivotTableModel setAutoSortUnusedProperties(java.lang.Boolean autoSortUnusedProperties)
autoSortUnusedAttrs
.
Sets whether or not unused attributes are kept sorted in the UI.
Applies only when editable=true
.
autoSortUnusedProperties
- whether or not unused attributes are kept sorted in the UIpublic UnusedPropertiesVertical getUnusedPropertiesVertical()
public PivotTableModel setUnusedPropertiesVertical(UnusedPropertiesVertical unusedPropertiesVertical)
unusedAttrsVertical
.
Sets whether or not unused attributes are shown vertically
instead of the default which is horizontally. true
means
always vertical, false
means always horizontal. If set to
a number (as is the default) then if the attributes' names' combined
length in characters exceeds the number then the attributes will be shown vertically.
Applies only when editable=true
.
unusedPropertiesVertical
- whether or not unused attributes are shown verticallypublic DataProvider getDataProvider()
public PivotTableModel setDataProvider(DataProvider dataProvider)
dataProvider
- a data provider that contains items which will be shown on PivotTablepublic PivotTableModel addData(DataItem... dataItems)
dataItems
- a data item to addpublic JsFunction getFilterFunction()
public PivotTableModel setFilterFunction(JsFunction filter)
filter
.
Sets a filter function that is called on each record, returns false
if the record
is to be excluded from the input before rendering or true
otherwise.
filter
- a filter function that is called on each recordpublic JsFunction getSortersFunction()
public PivotTableModel setSortersFunction(JsFunction sorters)
sorters
.
Sets a sorter function that is called with an attribute name and can return
a function which can be used as an argument to Array.sort
for output
purposes. If no function is returned, the default sorting mechanism is a built-in
"natural sort" implementation. Useful for sorting attributes like month names.
sorters
- a sorter functionpublic RendererOptions getRendererOptions()
public PivotTableModel setRendererOptions(RendererOptions rendererOptions)
rendererOptions
- an object that is passed through to renderer as optionspublic java.util.Map<java.lang.String,java.util.List<java.lang.String>> getInclusions()
getExclusions()
public PivotTableModel setInclusions(java.util.Map<java.lang.String,java.util.List<java.lang.String>> inclusions)
exclusions
).
Applies only when editable=true
.
inclusions
- a map whose keys are attribute names and values are arrays of attribute valuessetExclusions(Map)
public PivotTableModel setInclusions(java.lang.String property, java.util.List<java.lang.String> inclusions)
exclusions
).
Applies only when editable=true
.
property
- a property for which set inclusionsinclusions
- a list of property valuessetExclusions(String, List)
public PivotTableModel addInclusions(java.lang.String property, java.lang.String... inclusions)
exclusions
).
Applies only when editable=true
.
property
- a property for which set inclusionsinclusions
- an array of property valuesaddExclusions(String, String...)
public java.util.Map<java.lang.String,java.util.List<java.lang.String>> getExclusions()
public PivotTableModel setExclusions(java.util.Map<java.lang.String,java.util.List<java.lang.String>> exclusions)
Applies only when editable=true
.
exclusions
- a map whose keys are attribute names and values are arrays of attribute valuessetInclusions(Map)
public PivotTableModel setExclusions(java.lang.String property, java.util.List<java.lang.String> exclusions)
Applies only when editable=true
.
property
- a property for which set exclusionsexclusions
- a map whose keys are attribute names and values are arrays of attribute valuessetInclusions(Map)
public PivotTableModel addExclusions(java.lang.String property, java.lang.String... exclusions)
Applies only when editable=true
.
property
- a property for which set exclusionsexclusions
- a map whose keys are attribute names and values are arrays of attribute valuessetInclusions(Map)
public DerivedProperties getDerivedProperties()
public PivotTableModel setDerivedProperties(DerivedProperties derivedProperties)
derivedAttributes
.
Sets an object that represents derived properties (see documentation).
derivedProperties
- an object that represents derived propertiespublic java.lang.String getLocaleCode()
public void setShowUI(java.lang.Boolean showUI)
true
by default.
editable=true
.showUI
- show UI optionpublic java.lang.Boolean isShowUI()
public void setShowRowTotals(java.lang.Boolean rowTotals)
true
by default.rowTotals
- row totals optionpublic java.lang.Boolean isShowRowTotals()
public void setShowColTotals(java.lang.Boolean colTotals)
true
by default.colTotals
- col total optionspublic java.lang.Boolean isShowColTotals()
public PivotTableModel setLocaleCode(java.lang.String localeCode)
localeCode
- a locale codepublic java.util.List<java.lang.String> getWiredFields()