Class PivotTableViewBuilder
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprotected AccessManager
protected FetchPlanRepository
protected Messages
protected MessageTools
protected Metadata
protected MetadataTools
protected PivotTableOptions
protected ListDataComponent<?>
protected ViewNavigators
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected FetchPlan
getBaseFetchPlan
(MetaClass metaClass) protected MetaClass
getEmbeddedIdMetaClass
(MetaClass metaClass) getEmbeddedIdProperties
(MetaClass metaClass) protected PivotTableOptions
getPropertiesFromView
(MetaClass metaClass, FetchPlan fetchPlan) protected MetaClass
getPropertyMetaClass
(MetaProperty metaProperty) protected boolean
hasEmbeddedId
(MetaClass metaClass) protected boolean
isByteArray
(MetaProperty metaProperty) protected boolean
isEmbeddedIdProperty
(String property, MetaClass metaClass) protected boolean
isIdProperty
(String property, MetaClass metaClass) Checks if current MetaClass contains given id property.protected boolean
isManagedProperty
(MetaProperty metaProperty, MetaClass metaClass) protected boolean
isPermitted
(MetaClass metaClass, MetaProperty metaProperty) protected boolean
isUuid
(MetaProperty metaProperty) removeNonExistingProperties
(List<String> properties, MetaClass metaClass, FetchPlan fetchPlan) void
setAccessManager
(AccessManager accessManager) void
setFetchPlanRepository
(FetchPlanRepository fetchPlanRepository) void
setMessages
(Messages messages) void
setMessageTools
(MessageTools messageTools) void
setMetadata
(Metadata metadata) void
setMetadataTools
(MetadataTools metadataTools) void
setViewNavigators
(ViewNavigators viewNavigators) void
show()
Navigate toPivotTableView
and showPivotTable
component with the set parameterswithAdditionalProperties
(List<String> additionalProperties) Set properties which should be additionally included.withAggregation
(Aggregation aggregation) Original property name:aggregator
.withAggregationProperties
(List<String> aggregationProperties) Original property name:vals
.withAggregations
(Aggregations aggregations) Original property name:aggregators
.withAutoSortUnusedProperties
(Boolean autoSortUnusedProperties) Original property name:autoSortUnusedAttrs
.withColumnOrder
(Order columnOrder) Sets the order in which column data is provided to the renderer.withColumns
(List<String> columns) Sets a collection of attribute names to use as columns.withDerivedProperties
(DerivedProperties derivedProperties) Original property name:derivedAttributes
.withEmptyDataMessage
(String emptyDataMessage) If component doesn't have data to aggregate, the message will be displayedwithExcludedProperties
(List<String> excludedProperties) Set excluded properties list using fluent API method.withExclusions
(Map<String, List<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.withFilterFunction
(JsFunction filter) Original property name:filter
.withHiddenFromAggregations
(List<String> hiddenFromAggregations) Sets attribute names to omit from the aggregation arguments dropdowns.withHiddenFromDragDrop
(List<String> hiddenFromDragDrop) Sets attribute names to omit from the drag'n'drop portion of the UI.withHiddenProperties
(List<String> hiddenProperties) Sets attribute names to omit from the UI.withIncludedProperties
(List<String> includedProperties) Set included properties list using fluent API method.withInclusions
(Map<String, List<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 (overrideswithExclusions(Map)
).withItems
(Collection<?> items) Sets items that should be shown in PivotTable.withMenuLimit
(Integer menuLimit) Sets the maximum number of values to list in the double click menu.withRenderer
(Renderer renderer) Sets a descriptor of an object which will generate output from pivot data structure (see documentation).withRendererOptions
(RendererOptions rendererOptions) Sets an object that is passed through to renderer as options.withRenderers
(Renderers renderers) Sets an object that represents a list of rendering functions (see documentation).withRowOrder
(Order rowOrder) Sets the order in which row data is provided to the renderer.Sets a collection of attribute names to use as rows.withShowColumnTotals
(Boolean showColumnTotals) Shows or hides col totals.withShowRowTotals
(Boolean showRowTotals) Shows or hides row totals.withShowUI
(Boolean showUI) Shows or hides UI.withSortersFunction
(JsFunction sorters) Original property name:sorters
.withUnusedPropertiesVertical
(UnusedPropertiesVertical unusedPropertiesVertical) Original property name:unusedAttrsVertical
.
-
Field Details
-
metadata
-
metadataTools
-
fetchPlanRepository
-
messages
-
messageTools
-
accessManager
-
includedProperties
-
excludedProperties
-
additionalProperties
-
items
-
options
-
target
-
Constructor Details
-
PivotTableViewBuilder
-
-
Method Details
-
setMetadata
-
setFetchPlanRepository
-
setMessages
-
setAccessManager
-
setMetadataTools
-
setMessageTools
-
getIncludedProperties
- Returns:
- list of included properties
-
withIncludedProperties
Set included properties list using fluent API method. If included properties aren't set, all properties in the fetch plan will be shown, otherwise only included properties will be shown in the pivot table unlessShowPivotTableAction.setExcludedProperties(String)
is not set.- Parameters:
includedProperties
- list of included properties- Returns:
- current instance of action
-
getExcludedProperties
- Returns:
- list of excluded properties
-
withExcludedProperties
Set excluded properties list using fluent API method.
Note, if it is used withoutShowPivotTableAction.setExcludedProperties(String)
, excluded properties will be applied for all properties in the fetch plan.- Parameters:
excludedProperties
- list of excluded properties- Returns:
- current instance
-
withAdditionalProperties
Set properties which should be additionally included. Additional property doesn't applied if excluded properties list contains it.- Parameters:
additionalProperties
- list of additional properties- Returns:
- current instance of action
-
getAdditionalProperties
- Returns:
- list of additionally included properties
-
withItems
Sets items that should be shown in PivotTable.- Parameters:
items
- collection of entities- Returns:
- current instance
-
withRows
Sets a collection of attribute names to use as rows.- Parameters:
rows
- a collection of attribute names to use as rows
-
withColumns
Sets a collection of attribute names to use as columns.- Parameters:
columns
- a collection of attribute names to use as columns
-
withAggregation
Original property name:aggregator
.Sets a descriptor of an object which will aggregate results per cell (see documentation).
Applies only when
showUI=false
.- Parameters:
aggregation
- an object which will aggregate results per cell
-
withRenderer
Sets a descriptor of an object which will generate output from pivot data structure (see documentation).Applies only when
showUI=false
.- Parameters:
renderer
- an object which will generate output from pivot data structure
-
withAggregationProperties
Original property name:vals
.Sets attribute names to prepopulate in vals area (gets passed to aggregator generating function).
Applies only when
showUI=true
.- Parameters:
aggregationProperties
- attribute names to prepopulate in vals area
-
withAggregations
Original property name:aggregators
.Sets an object that represents a list of generators for aggregation functions in dropdown (see documentation).
Applies only when
showUI=true
.- Parameters:
aggregations
- an object that represents a list of generators for aggregation functions in dropdown
-
withRenderers
Sets an object that represents a list of rendering functions (see documentation).Applies only when
showUI=true
.- Parameters:
renderers
- n object that represents a list of rendering functions
-
withHiddenProperties
Sets attribute names to omit from the UI.Applies only when
showUI=true
.- Parameters:
hiddenProperties
- attribute names to omit from the UI
-
withHiddenFromAggregations
Sets attribute names to omit from the aggregation arguments dropdowns.Applies only when
showUI=true
.- Parameters:
hiddenFromAggregations
- attribute names to omit from the aggregation arguments dropdowns
-
withHiddenFromDragDrop
Sets attribute names to omit from the drag'n'drop portion of the UI.Applies only when
showUI=true
.- Parameters:
hiddenFromDragDrop
- attribute names to omit from the drag'n'drop portion of the UI
-
withColumnOrder
Sets the order in which column data is provided to the renderer.Ordering by value orders by column total.
- Parameters:
columnOrder
- the order in which column data is provided to the renderer
-
withRowOrder
Sets the order in which row data is provided to the renderer.Ordering by value orders by row total.
- Parameters:
rowOrder
- the order in which row data is provided to the renderer
-
withMenuLimit
Sets the maximum number of values to list in the double click menu.Applies only when
showUI=true
.- Parameters:
menuLimit
- the maximum number of values to list in the double click menu
-
withAutoSortUnusedProperties
Original property name:autoSortUnusedAttrs
.Sets whether unused attributes are kept sorted in the UI.
Applies only when
showUI=true
.- Parameters:
autoSortUnusedProperties
- whether unused attributes are kept sorted in the UI
-
withUnusedPropertiesVertical
public PivotTableViewBuilder withUnusedPropertiesVertical(UnusedPropertiesVertical unusedPropertiesVertical) Original property name:unusedAttrsVertical
.Sets whether 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
showUI=true
.- Parameters:
unusedPropertiesVertical
- whether unused attributes are shown vertically
-
withFilterFunction
Original property name: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 ortrue
otherwise.- Parameters:
filter
- a filter function that is called on each record
-
withSortersFunction
Original property name: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.- Parameters:
sorters
- a sorter function
-
withRendererOptions
Sets an object that is passed through to renderer as options.- Parameters:
rendererOptions
- an object that is passed through to renderer as options
-
withInclusions
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 (overrideswithExclusions(Map)
).Applies only when
showUI=true
.- Parameters:
inclusions
- a map whose keys are attribute names and values are arrays of attribute values- See Also:
-
withExclusions
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.Applies only when
showUI=true
.- Parameters:
exclusions
- a map whose keys are attribute names and values are arrays of attribute values- See Also:
-
withDerivedProperties
Original property name:derivedAttributes
.Sets an object that represents derived properties (see documentation).
- Parameters:
derivedProperties
- an object that represents derived properties
-
withEmptyDataMessage
If component doesn't have data to aggregate, the message will be displayed- Parameters:
emptyDataMessage
- string with an empty data message
-
withShowUI
Shows or hides UI.- Parameters:
showUI
- show UI option
-
withShowRowTotals
Shows or hides row totals.true
by default.- Parameters:
showRowTotals
- row totals option
-
withShowColumnTotals
Shows or hides col totals.true
by default.- Parameters:
showColumnTotals
- column total options
-
show
public void show()Navigate toPivotTableView
and showPivotTable
component with the set parameters -
getPropertiesWithLocale
-
isManagedProperty
-
isPermitted
-
isByteArray
-
isUuid
-
getPropertiesFromView
-
getBaseFetchPlan
-
getEmbeddedIdProperties
-
hasEmbeddedId
-
getEmbeddedIdMetaClass
-
removeNonExistingProperties
-
isIdProperty
Checks if current MetaClass contains given id property.- Parameters:
property
- property to checkmetaClass
- metaClass- Returns:
- true if MetaClass contains given id property
-
isEmbeddedIdProperty
-
getPropertyMetaClass
-
getPivotTableOptions