Class DataGroupHandle

  • All Implemented Interfaces:
    org.eclipse.birt.report.model.elements.interfaces.IDataGroupModel, org.eclipse.birt.report.model.elements.interfaces.IDesignElementModel

    public class DataGroupHandle
    extends ContentElementHandle
    implements org.eclipse.birt.report.model.elements.interfaces.IDataGroupModel
    • Constructor Detail

      • DataGroupHandle

        public DataGroupHandle​(org.eclipse.birt.report.model.core.Module module,
                               org.eclipse.birt.report.model.core.DesignElement element)
        Constructs a data group handle with the given design and the element. The application generally does not create handles directly. Instead, it uses one of the navigation methods available on other element handles.
        Parameters:
        module - the module
        element - the model representation of the element
    • Method Detail

      • getGroupName

        public java.lang.String getGroupName()
        Gets the name of the group.
        Returns:
        the name of the group
      • setGroupName

        public void setGroupName​(java.lang.String theName)
                          throws SemanticException
        Sets the group name.
        Parameters:
        theName - the group name to set
        Throws:
        SemanticException
      • getKeyExpr

        public java.lang.String getKeyExpr()
        Gets the expression that defines the group. This is normally simply a reference to a data set column.
        Returns:
        the expression as a string
        See Also:
        setKeyExpr(String)
      • setKeyExpr

        public void setKeyExpr​(java.lang.String expr)
                        throws SemanticException
        Sets the data group expression.
        Parameters:
        expr - the expression to set
        Throws:
        SemanticException - If the expression is invalid.
        See Also:
        getKeyExpr()
      • sortsIterator

        public java.util.Iterator sortsIterator()
        Returns the iterator for Sort list defined on the data group. The element in the iterator is the corresponding StructureHandle.
        Returns:
        the iterator for SortKey structure list defined on the data group.
      • filtersIterator

        public java.util.Iterator filtersIterator()
        Returns an iterator for the filter list defined on the data group. Each object returned is of type StructureHandle.
        Returns:
        the iterator for FilterCond structure list defined on the data group.
      • setIntervalBase

        public void setIntervalBase​(java.lang.String intervalBase)
                             throws SemanticException
        Sets the base of the interval property of this data group.IntervalBase, in conjunction with Interval and IntervalRange, determines how data is divided into data groups.
        Parameters:
        intervalBase - interval base property value.
        Throws:
        SemanticException - if the property is locked.
      • getIntervalBase

        public java.lang.String getIntervalBase()
        Return the interval base property value of this data group.
        Returns:
        interval baseF property value of this data group.
      • getInterval

        public java.lang.String getInterval()
        Returns the interval of this data group. The return value is defined in DesignChoiceConstants and can be one of:
        • INTERVAL_NONE
        • INTERVAL_PREFIX
        • INTERVAL_YEAR
        • INTERVAL_QUARTER
        • INTERVAL_MONTH
        • INTERVAL_WEEK
        • INTERVAL_DAY
        • INTERVAL_HOUR
        • INTERVAL_MINUTE
        • INTERVAL_SECOND
        • INTERVAL_INTERVAL
        Returns:
        the interval value as a string
      • setInterval

        public void setInterval​(java.lang.String interval)
                         throws SemanticException
        Returns the interval of this data group. The input value is defined in DesignChoiceConstants and can be one of:
        • INTERVAL_NONE
        • INTERVAL_PREFIX
        • INTERVAL_YEAR
        • INTERVAL_QUARTER
        • INTERVAL_MONTH
        • INTERVAL_WEEK
        • INTERVAL_DAY
        • INTERVAL_HOUR
        • INTERVAL_MINUTE
        • INTERVAL_SECOND
        • INTERVAL_INTERVAL
        Parameters:
        interval - the interval value as a string
        Throws:
        SemanticException - if the property is locked or the input value is not one of the above.
      • getIntervalRange

        public double getIntervalRange()
        Returns the interval range of this data group.
        Returns:
        the interval range value as a double
      • setIntervalRange

        public void setIntervalRange​(double intervalRange)
                              throws SemanticException
        Returns the interval range of this data group.
        Parameters:
        intervalRange - the interval range value as a double
        Throws:
        SemanticException - if the property is locked.
      • setIntervalRange

        public void setIntervalRange​(java.lang.String intervalRange)
                              throws SemanticException
        Sets the interval range of data group.
        Parameters:
        intervalRange - the interval range value as a string.value is locale dependent.
        Throws:
        SemanticException - if the property is locked.
      • getSortDirection

        public java.lang.String getSortDirection()
        Returns the sort direction of this data group. The return value is defined in DesignChoiceConstants and can be one of:
        • SORT_DIRECTION_ASC
        • SORT_DIRECTION_DESC
        Returns:
        the sort direction of this data group
      • setSortDirection

        public void setSortDirection​(java.lang.String direction)
                              throws SemanticException
        Sets the sort direction of this data group. The return value is defined in DesignChoiceConstants and can be one of:
        • SORT_DIRECTION_ASC
        • SORT_DIRECTION_DESC
        Parameters:
        direction - the sort direction of this data group
        Throws:
        SemanticException - if the property is locked or the input value is not one of the above.
      • setSortType

        public void setSortType​(java.lang.String sortType)
                         throws SemanticException
        Sets the sort type, which indicates the way of sorting.
        Parameters:
        sortType - sort type.
        Throws:
        SemanticException - if the property is locked.
      • getSortType

        public java.lang.String getSortType()
        Return the sort type.
        Returns:
        the sort type.