Class MeasureDefinition
- java.lang.Object
-
- net.sf.jasperreports.crosstabs.fill.calculation.MeasureDefinition
-
public class MeasureDefinition extends Object
Crosstab measure definition.- Author:
- Lucian Chirita (lucianc@users.sourceforge.net)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
MeasureDefinition.MeasureValue
An accumulated value of a crosstab measure.
-
Field Summary
Fields Modifier and Type Field Description protected CalculationEnum
calculation
protected JRExtendedIncrementerFactory
incrementerFactory
protected boolean
isSystemDefined
protected static AbstractValueProvider
VALUE_PROVIDER
Measure value provider.protected Class<?>
valueClass
-
Constructor Summary
Constructors Modifier Constructor Description MeasureDefinition(Class<?> valueClass, CalculationEnum calculation, JRExtendedIncrementerFactory incrementerFactory)
Create a measure definition.protected
MeasureDefinition(Class<?> valueClass, CalculationEnum calculation, JRExtendedIncrementerFactory incrementerFactory, boolean isSystemDefined)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MeasureDefinition
createDistinctCountHelperMeasure(MeasureDefinition measure)
Creates a helper measure for a distinct count calculation.static MeasureDefinition
createHelperMeasure(MeasureDefinition measure, CalculationEnum helperCalculation)
Creates a helper measure for a specific calculation.CalculationEnum
getCalculation()
Returns the calculation type.JRExtendedIncrementer
getIncrementer()
Returns the incrementer used for this measure.JRExtendedIncrementerFactory
getIncrementerFactory()
Returns the incrementer factory.Class<?>
getValueClass()
Returns the measure value class.protected boolean
isSystemDefined()
-
-
-
Field Detail
-
calculation
protected CalculationEnum calculation
-
incrementerFactory
protected final JRExtendedIncrementerFactory incrementerFactory
-
valueClass
protected final Class<?> valueClass
-
isSystemDefined
protected final boolean isSystemDefined
-
VALUE_PROVIDER
protected static final AbstractValueProvider VALUE_PROVIDER
Measure value provider.
-
-
Constructor Detail
-
MeasureDefinition
public MeasureDefinition(Class<?> valueClass, CalculationEnum calculation, JRExtendedIncrementerFactory incrementerFactory)
Create a measure definition.- Parameters:
valueClass
- the value classcalculation
- the calculation typeincrementerFactory
- the incrementer factory
-
MeasureDefinition
protected MeasureDefinition(Class<?> valueClass, CalculationEnum calculation, JRExtendedIncrementerFactory incrementerFactory, boolean isSystemDefined)
-
-
Method Detail
-
createHelperMeasure
public static MeasureDefinition createHelperMeasure(MeasureDefinition measure, CalculationEnum helperCalculation)
Creates a helper measure for a specific calculation.- Parameters:
measure
- the measurehelperCalculation
- 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
-
-