Class MeasureDefinition


  • public class MeasureDefinition
    extends Object
    Crosstab measure definition.
    Author:
    Lucian Chirita (lucianc@users.sourceforge.net)
    • Constructor Detail

      • MeasureDefinition

        public MeasureDefinition​(Class<?> valueClass,
                                 CalculationEnum calculation,
                                 JRExtendedIncrementerFactory incrementerFactory)
        Create a measure definition.
        Parameters:
        valueClass - the value class
        calculation - the calculation type
        incrementerFactory - the incrementer factory
    • Method Detail

      • createHelperMeasure

        public static MeasureDefinition createHelperMeasure​(MeasureDefinition measure,
                                                            CalculationEnum helperCalculation)
        Creates a helper measure for a specific calculation.
        Parameters:
        measure - the measure
        helperCalculation - the calculation
        Returns:
        the helper measure having the specified calculation
      • createDistinctCountHelperMeasure

        public static MeasureDefinition createDistinctCountHelperMeasure​(MeasureDefinition measure)
        Creates a helper measure for a distinct count calculation.
        Parameters:
        measure - the measure
        Returns:
        the helper measure having the specified calculation
      • getCalculation

        public CalculationEnum getCalculation()
        Returns the calculation type.
        Returns:
        the calculation type
      • getIncrementerFactory

        public JRExtendedIncrementerFactory getIncrementerFactory()
        Returns the incrementer factory.
        Returns:
        the incrementer factory
      • getIncrementer

        public JRExtendedIncrementer getIncrementer()
        Returns the incrementer used for this measure.
        Returns:
        the incrementer used for this measure
      • isSystemDefined

        protected boolean isSystemDefined()
      • getValueClass

        public Class<?> getValueClass()
        Returns the measure value class.
        Returns:
        the measure value class