Package com.reportmill.base
Class RMGrouping
java.lang.Object
com.reportmill.base.RMObject
com.reportmill.base.RMGrouping
- All Implemented Interfaces:
RMArchiver.Archiving
,Cloneable
This object represents an individual grouping with attributes like key, sorts, topN sort, etc.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an empty grouping.RMGrouping
(String aKey) Creates a grouping with the given key. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds the given sort to the grouping.void
Adds a sort to the grouping for the given sort key.void
Adds the list of sorts to the grouping.clone()
Standard clone implementation.boolean
Standard equals implementation.fromXML
(RXArchiver anArchiver, RXElement anElement) XML unarchival.boolean
Returns whether the grouping has a details.boolean
Returns whether the grouping has a header.boolean
Returns whether the grouping has a summary.boolean
Returns whether the grouping includes all values.boolean
Returns whether the grouping includes nulls.getKey()
Returns the grouping key.getSort
(int anIndex) Returns the individual sort at the given index.int
Returns the number of sorts in the grouping.getSorts()
Returns the groupings list of sorts.int
Returns the top N count for the grouping.boolean
Returns whether the top N sort for the grouping includes others.Returns the top N sort for the grouping.initWithArchiver
(RMArchiver anArchiver) Legacy unarchival.void
moveSort
(int sourceIndex, int destIndex) Moves a sort from the source index to the destination index.void
removeSort
(RMSort anSO) Removes the given sort from the grouping.void
setHasDetails
(boolean aValue) Sets whether the grouping has a details.void
setHasHeader
(boolean aValue) Sets whether the grouping has a header.void
setHasSummary
(boolean aValue) Sets whether the grouping has a summary.void
setIncludeAllValues
(boolean aValue) Sets whether the grouping includes all values.void
setIncludeNulls
(boolean aValue) Sets whether the grouping includes nulls.void
Sets the grouping key.void
setTopNCount
(int aValue) Sets the top N count for the grouping.void
setTopNIncludeOthers
(boolean aValue) Sets whether the top N sort for the grouping includes others.void
setTopNSort
(RMSort aSort) Sets the top N sort for the grouping.toXML
(RXArchiver anArchiver) XML Archival.Methods inherited from class com.reportmill.base.RMObject
copy, didChange, didUndo, getAnimAttribute, getClassNameShort, undoClone, undoCopy, undoEquals
-
Constructor Details
-
RMGrouping
public RMGrouping()Creates an empty grouping. -
RMGrouping
Creates a grouping with the given key.
-
-
Method Details
-
getKey
Returns the grouping key. -
setKey
Sets the grouping key. -
getSorts
Returns the groupings list of sorts. -
getSortCount
public int getSortCount()Returns the number of sorts in the grouping. -
getSort
Returns the individual sort at the given index. -
addSort
Adds a sort to the grouping for the given sort key. -
addSort
Adds the given sort to the grouping. -
addSorts
Adds the list of sorts to the grouping. -
removeSort
Removes the given sort from the grouping. -
moveSort
public void moveSort(int sourceIndex, int destIndex) Moves a sort from the source index to the destination index. -
getTopNSort
Returns the top N sort for the grouping. -
setTopNSort
Sets the top N sort for the grouping. -
getTopNCount
public int getTopNCount()Returns the top N count for the grouping. -
setTopNCount
public void setTopNCount(int aValue) Sets the top N count for the grouping. -
getTopNIncludeOthers
public boolean getTopNIncludeOthers()Returns whether the top N sort for the grouping includes others. -
setTopNIncludeOthers
public void setTopNIncludeOthers(boolean aValue) Sets whether the top N sort for the grouping includes others. -
getHasHeader
public boolean getHasHeader()Returns whether the grouping has a header. -
setHasHeader
public void setHasHeader(boolean aValue) Sets whether the grouping has a header. -
getHasDetails
public boolean getHasDetails()Returns whether the grouping has a details. -
setHasDetails
public void setHasDetails(boolean aValue) Sets whether the grouping has a details. -
getHasSummary
public boolean getHasSummary()Returns whether the grouping has a summary. -
setHasSummary
public void setHasSummary(boolean aValue) Sets whether the grouping has a summary. -
getIncludeAllValues
public boolean getIncludeAllValues()Returns whether the grouping includes all values. -
setIncludeAllValues
public void setIncludeAllValues(boolean aValue) Sets whether the grouping includes all values. -
getIncludeNulls
public boolean getIncludeNulls()Returns whether the grouping includes nulls. -
setIncludeNulls
public void setIncludeNulls(boolean aValue) Sets whether the grouping includes nulls. -
equals
Standard equals implementation. -
clone
Standard clone implementation. -
toXML
XML Archival. -
fromXML
XML unarchival. -
initWithArchiver
Legacy unarchival.- Specified by:
initWithArchiver
in interfaceRMArchiver.Archiving
- Overrides:
initWithArchiver
in classRMObject
-