Klasse Group

java.lang.Object
com.inet.report.Group
Alle implementierten Schnittstellen:
NodeParser, com.inet.report.ReferencedObject, com.inet.report.ReferenceHolder, Serializable, Cloneable

public class Group extends Object implements Serializable, com.inet.report.ReferenceHolder, com.inet.report.ReferencedObject, NodeParser, Cloneable
This class represents a grouping and disposes references to group header- and group footer areas. Note that this class represents groupings only, not the standard page-, report- and detail- area pairs (header and footer areas). If you need to set the properties of a grouping, i.e. the field for sorting, use the methods of this class.

This class is part of the RDC.
Siehe auch:
  • Felddetails

    • SORT_ASCENDING_ORDER

      public static final int SORT_ASCENDING_ORDER
      Constant for ascending order sort direction.
      Siehe auch:
    • SORT_DESCENDING_ORDER

      public static final int SORT_DESCENDING_ORDER
      Constant for descending order sort direction.
      Siehe auch:
    • SORT_ORIGINAL_ORDER

      public static final int SORT_ORIGINAL_ORDER
      Constant for original order sort direction. This sort order keeps the same values together.
      Siehe auch:
    • SORT_SPECIFIED_ORDER

      public static final int SORT_SPECIFIED_ORDER
      Constant for specified order sort direction.
      Siehe auch:
    • SORT_SUMMARY_ORDER

      public static final int SORT_SUMMARY_ORDER
      Constant for sort by summaries order sort direction.
      Siehe auch:
    • SORT_ORIGINAL_ORDER_2

      public static final int SORT_ORIGINAL_ORDER_2
      Constant for really original order sort direction. This collect only the same values located nearby, and begins a new group whenever the value changes in the group field.
      Siehe auch:
    • SORT_ASCENDING_ORDER_ALPHA_NUMERIC

      public static final int SORT_ASCENDING_ORDER_ALPHA_NUMERIC
      Constant for ascending order sort direction, numeric parts will be sorted by their number value rather than alphabetical.
      Siehe auch:
    • SORT_DESCENDING_ORDER_ALPHA_NUMERIC

      public static final int SORT_DESCENDING_ORDER_ALPHA_NUMERIC
      Constant for descending order sort direction, numeric parts will be sorted by their number value rather than alphabetical
      Siehe auch:
    • CUSTOMIZE_GROUP_NAME_FIELD_DISABLED

      public static final int CUSTOMIZE_GROUP_NAME_FIELD_DISABLED
      Constant for 'disable customize group name field'.
      Siehe auch:
    • CUSTOMIZE_GROUP_NAME_FIELD_ENABLED

      public static final int CUSTOMIZE_GROUP_NAME_FIELD_ENABLED
      Constant for 'enable customize group name field' and choose from existing field.
      Siehe auch:
    • CUSTOMIZE_GROUP_NAME_FIELD_ENABLED_WITH_FM

      public static final int CUSTOMIZE_GROUP_NAME_FIELD_ENABLED_WITH_FM
      Constant for 'enable customize group name field' and use a formula as group name.
      Siehe auch:
    • GROUP_TYPE_REPORT

      public static final int GROUP_TYPE_REPORT
      FOR INTERNAL USE ONLY
      Seit:
      6.0
      Siehe auch:
    • GROUP_TYPE_CHART

      public static final int GROUP_TYPE_CHART
      FOR INTERNAL USE ONLY
      Seit:
      6.0
      Siehe auch:
    • GROUP_TYPE_CROSS_TAB

      public static final int GROUP_TYPE_CROSS_TAB
      FOR INTERNAL USE ONLY
      Seit:
      6.0
      Siehe auch:
  • Methodendetails

    • toString

      public String toString()
      Returns a string representation of this Group. The returned String will contain the type of this group, the sort order and group field name.
      Setzt außer Kraft:
      toString in Klasse Object
      Gibt zurück:
      a String representation of this Group.
      Seit:
      4.0
    • getHeader

      public Area getHeader()
      Returns the group header area. The header area is the first area of records collected in a group.
      Gibt zurück:
      The group header area.
      Seit:
      6.0
      Siehe auch:
    • getFooter

      public Area getFooter()
      Returns the group footer area. The header area is the last area of records collected in a group.
      Gibt zurück:
      The group footer area.
      Seit:
      6.0
      Siehe auch:
    • setSort

      public void setSort(int sortType)
      The Method setSort sets the type of sorting of the data in this group.
      Parameter:
      sortType - The new value of the property sort type.
      Löst aus:
      IllegalArgumentException - will thrown if sort type is unknown.
      Seit:
      6.0
      Siehe auch:
    • setGroupDirectionFormula

      public void setGroupDirectionFormula(FormulaField formula) throws ReportException
      Sets the formula of sort direction of current group. This formula must be of type FormulaField.FORMULA_PROPERTY and must return a positive int value. Allowed range of values 0 for SORT_ASCENDING_ORDER, 1 for SORT_DESCENDING_ORDER, 2 for SORT_ORIGINAL_ORDER. Other formula will be ignored.
      Parameter:
      formula - for sort direction or null to remove the sort direction formula.
      Löst aus:
      ReportException - Wrong formula, formula type or return value of formula
      Seit:
      6.0
      Siehe auch:
    • getGroupDirectionFormula

      public FormulaField getGroupDirectionFormula()
      Returns the formula of sort direction for this group.
      Gibt zurück:
      sort direction formula of this group
      Seit:
      6.0
      Siehe auch:
    • getSort

      public int getSort()
      The Method getSort returns the type of sorting of the data of this group.
      Gibt zurück:
      The value of the property 'sort type'.
      Seit:
      6.0
      Siehe auch:
    • getField

      public Field getField()
      Gets the field definition element.
      Gibt zurück:
      Field The current value of the 'field' property.
      Seit:
      6.0
    • setField

      public void setField(Field newField)
      Sets the field definition element.
      Parameter:
      newField - The new field element of the property 'field'.
      Löst aus:
      IllegalArgumentException - is thrown when newField is null.
      Seit:
      6.0
    • setKeepTogether

      public void setKeepTogether(int keepGroupTogether)
      Use this property to specify the number of records to keep together in this group. For example: Set this value to 3 to make sure that the first 3 records in this group are displayed on the same page.
      Parameter:
      keepGroupTogether - The number of record to keep together in this group. Use the value '-1' to keep all records of this group together.
      Seit:
      6.0
      Siehe auch:
    • getKeepTogether

      public int getKeepTogether()
      Returns the number of records that are kept together in this group.
      Gibt zurück:
      The number of records that are kept together in this group.
      Seit:
      6.0
      Siehe auch:
    • setRepeatGroupHeader

      public void setRepeatGroupHeader(boolean value)
      Use this property to specify whether the group should be repeated on each new page (true) or not (false).
      Parameter:
      value - The new value of the property 'repeat group header'. Set to true if the group header should be repeated on each new page, else set to false.
      Seit:
      6.0
      Siehe auch:
    • getRepeatGroupHeader

      public boolean getRepeatGroupHeader()
      Use this property to specify whether the group should be repeated on each new page (true) or not (false).
      Gibt zurück:
      The value of the property 'repeat group header'. Returns true if the group header should be repeated on each new page, else returns false.
      Seit:
      6.0
      Siehe auch:
    • setRepeatGroupHeaderWithinFooter

      public void setRepeatGroupHeaderWithinFooter(boolean value)
      Repeat the group header on a new page even when the group display is currently in its footer. By default a group header will only be repeated on a new page when the end of the page is inside the detail data of the group – this causes this behavior to be overridden. This option only has an effect in combination with the option RepeatGroupHeader.
      Parameter:
      value - The new value of the option.
      Seit:
      6.0
      Siehe auch:
    • getRepeatGroupHeaderWithinFooter

      public boolean getRepeatGroupHeaderWithinFooter()
      Get the RepeatGroupHeaderWithinFooter flag.
      Gibt zurück:
      a boolean.
      Seit:
      6.0
      Siehe auch:
    • setSectionWillBePrinted

      public void setSectionWillBePrinted(int value)
      Use this property to specify for what kind of values the group section should be printed, i.e. 'for each day' prints the record with the same day together. This property is only available for date, datetime and boolean.
      Parameter:
      value - The new value of the property 'section will be printed'.
      Löst aus:
      IllegalArgumentException - if value is no valid property value
      Seit:
      6.0
      Siehe auch:
    • getSectionWillBePrinted

      public int getSectionWillBePrinted()
      Returns for what kind of values the group section should be printed, i.e. 'for each day' prints the record with the same day together. This property is only available for date, datetime and boolean.
      Gibt zurück:
      the 'change of' type.
      Seit:
      6.0
      Siehe auch:
    • setCustomizeGroupNameField

      public void setCustomizeGroupNameField(int value)
      Use this property to customize the group name field. Possibilities are 'disabled', 'choose from field' and 'set with formula'. If property is disabled the group name is the name of the groups underlaying database field. If the property is not set to CUSTOMIZE_GROUP_NAME_FIELD_DISABLED, check that the corresponding field is not set to null.
      Parameter:
      value - The new value of the property.
      Löst aus:
      IllegalArgumentException - if value is no valid property value
      Seit:
      6.0
      Siehe auch:
    • getCustomizeGroupNameField

      public int getCustomizeGroupNameField()
      Returns the kind of the customization of the group name field.
      Gibt zurück:
      The value of the property.
      Seit:
      6.0
      Siehe auch:
    • setGroupNameFormula

      public void setGroupNameFormula(FormulaField fm)
      If property 'customize groupname field' is set to CUSTOMIZE_GROUP_NAME_FIELD_ENABLED_WITH_FM a formula is needed for rendering. Set the formula with this method.
      Parameter:
      fm - The formula field which specify the name of the group.
      Seit:
      6.0
      Siehe auch:
    • getGroupNameFormula

      public FormulaField getGroupNameFormula()
      Returns the formula which specify the name of the group.
      Gibt zurück:
      The formula field for specifying the groupname.
      Seit:
      6.0
      Siehe auch:
    • setGroupNameDbField

      public void setGroupNameDbField(DatabaseField dbField)
      If property 'customize groupname field' is set to CUSTOMIZE_GROUP_NAME_FIELD_ENABLED a databasefield is needed for rendering. Set the database field with this method.
      Parameter:
      dbField - The database field which specify the name of the group
      Seit:
      6.0
      Siehe auch:
    • getGroupNameDbField

      public DatabaseField getGroupNameDbField()
      Returns the database field which specify the name of the group.
      Gibt zurück:
      The database field for specifying the groupname.
      Seit:
      6.0
      Siehe auch:
    • setHierarchicalGrouping

      public void setHierarchicalGrouping(boolean enabled, Field parentField, int indentation) throws ReportException
      Enable or disable the property 'hierarchical grouping' with this method. Hierarchical grouping arranges your data in the report to show hierarchical relationships. All data stay in the table but indentations of groups of data displays the relationsships between them. Use parentField and indentation for individual arrangement of the hierarchy.
      Parameter:
      enabled - true if hierarchical grouping should be enabled, else false.
      parentField - The field which should be the reference for grouping of this group. Note that the field of this group and parantId field should have the same type. The value is ignored if parameter enabled is false.
      indentation - The depth of the indent of groups of data in twips. The value is ignored if parameter enabled is false.
      Löst aus:
      ReportException - if parent field is null or the field of this group and parent field not on the same type.
      Seit:
      6.0
    • getHierarchicalGrouping

      public boolean getHierarchicalGrouping()
      Returns if the property 'hierarchical grouping' is enabled or disabled.
      Gibt zurück:
      true if this group has a hierarchical sorting otherwise false.
      Seit:
      6.0
    • setIndentation

      public void setIndentation(int indentation)
      Sets the depth of the indentation of the data groups.
      Parameter:
      indentation - The depth of the indent of groups of data in twips.
      Löst aus:
      IllegalArgumentException - if indentation is negative
      Seit:
      6.0
    • getIndentation

      public int getIndentation()
      Returns the depth of the indentation of the data groups.
      Gibt zurück:
      The depth in twips.
      Seit:
      6.0
    • getParentField

      public Field getParentField()
      Returns the reference field for grouping of the instanceId field.
      Gibt zurück:
      The field which should be the reference for grouping of the instanceId field.
      Seit:
      6.0
    • isGroup

      public boolean isGroup()
      Returns true if this group is a GroupAreaPair and false if this group is a Detail-, Page- or ReportAreaPair.
      Gibt zurück:
      true if this is a group, false if this is the report header/footer.
      Seit:
      6.0
    • indexOf

      public int indexOf()
      Returns the position of this group in report group set.
      Gibt zurück:
      the 1-based index.
      Seit:
      6.0
    • getGroupNameField

      public GroupField getGroupNameField()
      Returns the group name field of this group. This field complies the group name and can be used by FieldElement to display the group name.
      Gibt zurück:
      the group name field.
      Seit:
      6.0
    • getSpecifiedOrder

      public SpecifiedOrder getSpecifiedOrder()
      Returns the specified sorting order for this group. Specified sorting allows you to specify a condition for each group, which values are to be added to this group.
      Gibt zurück:
      SpecifiedOrder contains the grouping conditions.
      Seit:
      6.0
      Siehe auch:
    • setSpecifiedOrder

      public void setSpecifiedOrder(SpecifiedOrder order)
      Set specified sorting order for this group. Specified sorting allows you to specify a condition for each group, which values are to be added to this group.
      Parameter:
      order - is SpecifiedOrder Object contains the grouping conditions for this group.
      Seit:
      6.0
      Siehe auch:
    • getBySummaryOrder

      public BySummaryOrder getBySummaryOrder()
      Returns the BySummary sorting order for this group BySummary sorting allows you to sort the groups by our values of aggregate function.
      Gibt zurück:
      BySummaryOrder Object contains SummaryField of aggregate function and sort direction.
      Seit:
      6.0
      Siehe auch:
    • setBySummaryOrder

      public void setBySummaryOrder(BySummaryOrder order)
      Set BySummary sorting order for this group. BySummary sorting allows you to sort the groups by our values of aggregate function.
      Parameter:
      order - is BySummaryOrder Object contains SummaryField of aggregate function and sort direction.
      Seit:
      6.0
      Siehe auch:
    • addReferenceHolder

      public final void addReferenceHolder(com.inet.report.ReferenceHolder holder)
      FOR INTERNAL USE ONLY
      Angegeben von:
      addReferenceHolder in Schnittstelle com.inet.report.ReferencedObject
      Seit:
      6.0
    • getReferenceHolders

      public final com.inet.report.ReferenceHolder[] getReferenceHolders()
      FOR INTERNAL USE ONLY
      Angegeben von:
      getReferenceHolders in Schnittstelle com.inet.report.ReferencedObject
    • getReferenceHolderCount

      public final int getReferenceHolderCount()
      FOR INTERNAL USE ONLY
      Angegeben von:
      getReferenceHolderCount in Schnittstelle com.inet.report.ReferencedObject
    • getRealReferenceCount

      public final int getRealReferenceCount()
      FOR INTERNAL USE ONLY
      Angegeben von:
      getRealReferenceCount in Schnittstelle com.inet.report.ReferencedObject
    • removeReferenceHolder

      public final void removeReferenceHolder(com.inet.report.ReferenceHolder holder)
      FOR INTERNAL USE ONLY
      Angegeben von:
      removeReferenceHolder in Schnittstelle com.inet.report.ReferencedObject
      Seit:
      6.0
    • addReferencedObject

      public final void addReferencedObject(com.inet.report.ReferencedObject reference)
      FOR INTERNAL USE ONLY
      Angegeben von:
      addReferencedObject in Schnittstelle com.inet.report.ReferenceHolder
      Seit:
      6.0
    • getReferencedObjects

      public final com.inet.report.ReferencedObject[] getReferencedObjects()
      FOR INTERNAL USE ONLY
      Angegeben von:
      getReferencedObjects in Schnittstelle com.inet.report.ReferenceHolder
    • getRealReferencedObjectCount

      public final int getRealReferencedObjectCount()
      FOR INTERNAL USE ONLY
      Angegeben von:
      getRealReferencedObjectCount in Schnittstelle com.inet.report.ReferenceHolder
      Seit:
      6.0
    • getReferencedObjectCount

      public final int getReferencedObjectCount()
      FOR INTERNAL USE ONLY
      Angegeben von:
      getReferencedObjectCount in Schnittstelle com.inet.report.ReferenceHolder
    • removeReferencedObject

      public final void removeReferencedObject(com.inet.report.ReferencedObject reference)
      FOR INTERNAL USE ONLY
      Angegeben von:
      removeReferencedObject in Schnittstelle com.inet.report.ReferenceHolder
      Seit:
      6.0
    • resetReferences

      public void resetReferences()
      FOR INTERNAL USE ONLY
      Angegeben von:
      resetReferences in Schnittstelle com.inet.report.ReferenceHolder
    • setReferences

      public void setReferences()
      FOR INTERNAL USE ONLY
      Angegeben von:
      setReferences in Schnittstelle com.inet.report.ReferenceHolder
    • setGroupType

      public void setGroupType(int groupType)
      FOR INTERNAL USE ONLY Setzt den Typ der Gruppe. Handelt es sich um eine normale Gruppe des Berichtes oder um eine "lokale" Gruppe im Chart oder in der Crosstab.
      Parameter:
      groupType - der Typ der Gruppe
      Seit:
      6.0
      Siehe auch:
    • getGroupType

      public int getGroupType()
      FOR INTERNAL USE ONLY Gibt den Typ der Gruppe zurück. Handelt es sich um eine normale Gruppe des Berichtes oder um eine "lokale" Gruppe im Chart oder in der Crosstab.
      Gibt zurück:
      den Typ der Gruppe
      Seit:
      6.0
      Siehe auch:
    • parseElement

      public NodeParser parseElement(com.inet.report.parser.XMLTag group, String tag, Attributes atts, Map<String,Object> parserMap) throws FatalParserException
      FOR INTERNAL USE ONLY Internal method for reading report XML

      Parses an XML node with the given information, and returns either a sub-element which was created as a result, or null if no sub-element was created, i.e. the information was applied to the ReportComponent itself. Note that the parsing is highly tolerant, i.e. exceptions are intercepted and suppressed if at all possible.

      Angegeben von:
      parseElement in Schnittstelle NodeParser
      Parameter:
      group - XMLTag of the current node to be parsed, or null if there is no such current group. An XMLTag is a group of nodes bundled together, usually it is a Properties node such as CommonProperties, BorderProperties, etc.
      tag - The XMLTag to be parsed
      atts - The set of attributes in the current XMLTag
      parserMap - The map of current Parser.
      Gibt zurück:
      The NodeParser sub-element if one needed to be created, or null if none was created.
      Löst aus:
      FatalParserException - if an exception occurs which causes the report to not be able to be read: causes the abortion of the reading of the report.
    • parseText

      public void parseText(String text, Map<String,Object> parserMap)
      FOR INTERNAL USE ONLY Internal method for reading report XML

      This method is called if text was encountered in the context of this node. (Examples would be a formula's text or a text element's text)

      Angegeben von:
      parseText in Schnittstelle NodeParser
      Parameter:
      text - text encountered and to be stored
      parserMap - The map of current Parser.
    • parseEndElement

      public void parseEndElement(com.inet.report.parser.XMLTag group, String tag, Map<String,Object> parserMap) throws FatalParserException
      FOR INTERNAL USE ONLY Internal method for reading report XML

      Receive notification of the end of an XML tag.

      Angegeben von:
      parseEndElement in Schnittstelle NodeParser
      Parameter:
      group - XMLTag of the current node to be parsed, or null if there is no such current group.
      tag - The XMLTag to be parsed
      parserMap - The map of current Parser.
      Löst aus:
      FatalParserException - if an exception occurs which causes the report to not be able to be read: causes the abortion of the reading of the report.
    • isDOMParser

      public boolean isDOMParser()
      FOR INTERNAL USE ONLY Internal method for reading report XML

      Returns whether this node is to be read via a DOM parser.

      Angegeben von:
      isDOMParser in Schnittstelle NodeParser
      Gibt zurück:
      true if this node is to be read via a DOM parser, false otherwise.
    • parseDOM

      public void parseDOM(Node node, Map<String,Object> parserMap) throws FatalParserException
      FOR INTERNAL USE ONLY Internal method for reading report XML

      Parses the node.

      Angegeben von:
      parseDOM in Schnittstelle NodeParser
      Parameter:
      node - the node
      parserMap - The map of current Parser.
      Löst aus:
      FatalParserException - if an exception occurs which causes the report to not be able to be read: causes the abortion of the reading of the report.