Class Group

  • All Implemented Interfaces:
    Serializable, Cloneable, Iterable<Element>, DataTarget, ReportElement
    Direct Known Subclasses:
    CrosstabColumnGroup, CrosstabGroup, CrosstabOtherGroup, CrosstabRowGroup, RelationalGroup

    public abstract class Group
    extends Section
    A report group. Reports can contain any number of (nested) groups. The order of the fields is not important. If the group does not contain any fields, the group spans the whole report from the first to the last row (such a group is called the default group).

    The group's field list should not be modified after the group was added to the group list, or the results are undefined.

    Groups of the same GroupList must have a subgroup relation. The designated child group must contain all fields of the direct parent plus at least one new field. There is no requirement, that the referenced field actually exists, if it doesn't, null is assumed as field value.

    It is recommended that the name of the group is unique within the report. The name will not be used internally to identify the group, but most functions depend on a recognizable group name to identify the group to be processed.

    David Gilbert, Thomas Morgner
    See Also:
    Serialized Form
    • Constructor Detail

      • Group

        protected Group()
        Constructs a group with no fields, and an empty header and footer.
    • Method Detail

      • setBody

        public void setBody​(GroupBody body)
      • clone

        public Group clone()
        Clones this Element.
        Specified by:
        clone in interface DataTarget
        clone in class Section
        a clone of this element.
      • derive

        public Group derive​(boolean preserveElementInstanceIds)
        Description copied from class: Element
        Creates a deep copy of this element and regenerates all instance-ids.
        derive in class Section
        preserveElementInstanceIds - defines whether this call generates new instance-ids for the derived elements. Instance-IDs are used by the report processor to recognize reoccurring elements and must not changed within the report run. Outside of the report processors new instance ids should be generated at all times to separate instances and to make them uniquely identifiable.
        the copy of the element.
      • isGroupChange

        public abstract boolean isGroupChange​(DataRow dataRow)
      • removeElement

        protected void removeElement​(Element element)
        Description copied from class: Section
        Removes an element from the section.
        Specified by:
        removeElement in class Section
        element - the element to be section.
      • createDefaultBody

        protected abstract GroupBody createDefaultBody()
      • getGeneratedName

        public String getGeneratedName()
      • getName

        public String getName()
        Description copied from class: Element
        Returns the name of the Element. The name of the Element is never null.
        Specified by:
        getName in interface ReportElement
        getName in class Element
        the name.
      • matches

        public boolean matches​(String name)
      • isAscendingSortOrder

        public boolean isAscendingSortOrder()
      • setAscendingSortOrder

        public void setAscendingSortOrder​(Boolean order)