Class RelationalGroup

    • Constructor Detail

      • RelationalGroup

        public RelationalGroup()
    • Method Detail

      • getHeader

        public GroupHeader getHeader()
        Returns the group header.

        The group header is a report band that contains elements that should be printed at the start of a group.

        Returns:
        the group header.
      • setHeader

        public void setHeader​(GroupHeader header)
        Sets the header for the group.
        Parameters:
        header - the header (null not permitted).
        Throws:
        NullPointerException - if the given header is null
      • getFooter

        public GroupFooter getFooter()
        Returns the group footer.
        Returns:
        the footer.
      • setFooter

        public void setFooter​(GroupFooter footer)
        Sets the footer for the group.
        Parameters:
        footer - the footer (null not permitted).
        Throws:
        NullPointerException - if the given footer is null.
      • setFields

        public void setFields​(List<String> c)
        Sets the fields for this group. The given list must contain Strings defining the needed fields from the DataRow. Don't reference Function-Fields here, functions are not supported in th groupfield definition.
        Parameters:
        c - the list containing strings.
        Throws:
        NullPointerException - if the given list is null or the list contains null-values.
      • clearFields

        public void clearFields()
      • getElementCount

        public int getElementCount()
        Description copied from class: Section
        Returns the number of elements in this section.
        Specified by:
        getElementCount in class Section
        Returns:
        the number of elements of this section.
      • addField

        public void addField​(String name)
        Adds a field to the group. The field names must correspond to the column names in the report's TableModel.
        Parameters:
        name - the field name (null not permitted).
        Throws:
        NullPointerException - if the name is null
      • getFields

        public List<String> getFields()
        Returns the list of fields for this group.
        Returns:
        a list (unmodifiable) of fields for the group.
      • setFieldsArray

        public void setFieldsArray​(String[] fields)
      • getFieldsArray

        public String[] getFieldsArray()
        Returns the group fields as array.
        Returns:
        the fields as string array.
      • toString

        public String toString()
        Returns a string representation of the group (useful for debugging).
        Overrides:
        toString in class Element
        Returns:
        A string.
      • equals

        public boolean equals​(Object obj)
        Checks whether the group is equal. A group is considered equal to another group, if it defines the same fields as the other group.
        Overrides:
        equals in class Object
        Parameters:
        obj - the object to be checked
        Returns:
        true, if the object is a group instance with the same fields, false otherwise.
      • hashCode

        public int hashCode()
        Computes a hashcode for this group.
        Overrides:
        hashCode in class Object
        Returns:
        the hashcode.
      • derive

        public RelationalGroup derive​(boolean preserveElementInstanceIds)
        Description copied from class: Element
        Creates a deep copy of this element and regenerates all instance-ids.
        Overrides:
        derive in class Group
        Parameters:
        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.
        Returns:
        the copy of the element.
      • removeElement

        protected void removeElement​(Element element)
        Description copied from class: Section
        Removes an element from the section.
        Overrides:
        removeElement in class Group
        Parameters:
        element - the element to be section.
      • getElement

        public Element getElement​(int index)
        Description copied from class: Section
        Returns the element stored add the given index.
        Specified by:
        getElement in class Section
        Parameters:
        index - the element position within this section
        Returns:
        the element