Package com.reportmill.base
Class RMGrouping
- java.lang.Object
-
- com.reportmill.base.RMObject
-
- com.reportmill.base.RMGrouping
-
- All Implemented Interfaces:
RMArchiver.Archiving,java.lang.Cloneable
public class RMGrouping extends RMObject
This object represents an individual grouping with attributes like key, sorts, topN sort, etc.
-
-
Constructor Summary
Constructors Constructor Description RMGrouping()Creates an empty grouping.RMGrouping(java.lang.String aKey)Creates a grouping with the given key.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddSort(RMSort anSO)Adds the given sort to the grouping.voidaddSort(java.lang.String aSortKey)Adds a sort to the grouping for the given sort key.voidaddSorts(java.util.List sos)Adds the list of sorts to the grouping.java.lang.Objectclone()Standard clone implementation.booleanequals(java.lang.Object anObj)Standard equals implementation.java.lang.ObjectfromXML(RXArchiver anArchiver, RXElement anElement)XML unarchival.booleangetHasDetails()Returns whether the grouping has a details.booleangetHasHeader()Returns whether the grouping has a header.booleangetHasSummary()Returns whether the grouping has a summary.booleangetIncludeAllValues()Returns whether the grouping includes all values.booleangetIncludeNulls()Returns whether the grouping includes nulls.java.lang.StringgetKey()Returns the grouping key.RMSortgetSort(int anIndex)Returns the individual sort at the given index.intgetSortCount()Returns the number of sorts in the grouping.java.util.ListgetSorts()Returns the groupings list of sorts.intgetTopNCount()Returns the top N count for the grouping.booleangetTopNIncludeOthers()Returns whether the top N sort for the grouping includes others.RMSortgetTopNSort()Returns the top N sort for the grouping.java.lang.ObjectinitWithArchiver(RMArchiver anArchiver)Legacy unarchival.voidmoveSort(int sourceIndex, int destIndex)Moves a sort from the source index to the destination index.voidremoveSort(RMSort anSO)Removes the given sort from the grouping.voidsetHasDetails(boolean aValue)Sets whether the grouping has a details.voidsetHasHeader(boolean aValue)Sets whether the grouping has a header.voidsetHasSummary(boolean aValue)Sets whether the grouping has a summary.voidsetIncludeAllValues(boolean aValue)Sets whether the grouping includes all values.voidsetIncludeNulls(boolean aValue)Sets whether the grouping includes nulls.voidsetKey(java.lang.String aValue)Sets the grouping key.voidsetTopNCount(int aValue)Sets the top N count for the grouping.voidsetTopNIncludeOthers(boolean aValue)Sets whether the top N sort for the grouping includes others.voidsetTopNSort(RMSort aSort)Sets the top N sort for the grouping.RXElementtoXML(RXArchiver anArchiver)XML Archival.-
Methods inherited from class com.reportmill.base.RMObject
copy, didChange, didUndo, getAnimAttribute, getClassNameShort, undoClone, undoCopy, undoEquals
-
-
-
-
Method Detail
-
getKey
public java.lang.String getKey()
Returns the grouping key.
-
setKey
public void setKey(java.lang.String aValue)
Sets the grouping key.
-
getSorts
public java.util.List getSorts()
Returns the groupings list of sorts.
-
getSortCount
public int getSortCount()
Returns the number of sorts in the grouping.
-
getSort
public RMSort getSort(int anIndex)
Returns the individual sort at the given index.
-
addSort
public void addSort(java.lang.String aSortKey)
Adds a sort to the grouping for the given sort key.
-
addSort
public void addSort(RMSort anSO)
Adds the given sort to the grouping.
-
addSorts
public void addSorts(java.util.List sos)
Adds the list of sorts to the grouping.
-
removeSort
public void removeSort(RMSort anSO)
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
public RMSort getTopNSort()
Returns the top N sort for the grouping.
-
setTopNSort
public void setTopNSort(RMSort aSort)
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
public boolean equals(java.lang.Object anObj)
Standard equals implementation.- Overrides:
equalsin classjava.lang.Object
-
clone
public java.lang.Object clone()
Standard clone implementation.
-
toXML
public RXElement toXML(RXArchiver anArchiver)
XML Archival.
-
fromXML
public java.lang.Object fromXML(RXArchiver anArchiver, RXElement anElement)
XML unarchival.
-
initWithArchiver
public java.lang.Object initWithArchiver(RMArchiver anArchiver)
Legacy unarchival.- Specified by:
initWithArchiverin interfaceRMArchiver.Archiving- Overrides:
initWithArchiverin classRMObject
-
-