public class JRBaseCrosstabMeasure extends Object implements JRCrosstabMeasure, Serializable, CrosstabBaseCloneable
Modifier and Type | Field and Description |
---|---|
protected CalculationEnum |
calculationValue |
static String |
EXCEPTION_MESSAGE_KEY_MEASURE_INCREMENTER_CLASS_LOAD_ERROR |
static String |
EXCEPTION_MESSAGE_KEY_MEASURE_PERCENTAGE_CALCULATOR_CLASS_LOAD_ERROR |
static String |
EXCEPTION_MESSAGE_KEY_MEASURE_VALUE_CLASS_LOAD_ERROR |
protected JRExpression |
expression |
protected Class<?> |
incrementerFactoryClass |
protected String |
incrementerFactoryClassName |
protected String |
incrementerFactoryClassRealName |
protected String |
name |
protected Class<?> |
percentageCalculatorClass |
protected String |
percentageCalculatorClassName |
protected String |
percentageCalculatorClassRealName |
protected CrosstabPercentageEnum |
percentageType |
protected Class<?> |
valueClass |
protected String |
valueClassName |
protected String |
valueClassRealName |
protected JRVariable |
variable |
Modifier | Constructor and Description |
---|---|
protected |
JRBaseCrosstabMeasure() |
|
JRBaseCrosstabMeasure(JRCrosstabMeasure measure,
JRBaseObjectFactory factory) |
Modifier and Type | Method and Description |
---|---|
Object |
clone() |
Object |
clone(CrosstabBaseCloneFactory cloneFactory) |
CalculationEnum |
getCalculationValue()
Returns the calculation type which will be performed on the measure values.
|
Class<?> |
getIncrementerFactoryClass()
Returns the incrementer factory class.
|
String |
getIncrementerFactoryClassName()
Returns the incrementer factory class name.
|
String |
getName()
Returns the name of the measure.
|
Class<?> |
getPercentageCalculatorClass()
Returns the percentage calculator class.
|
String |
getPercentageCalculatorClassName()
Returns the percentage calculator class name.
|
CrosstabPercentageEnum |
getPercentageType()
Returns the percentage calculation type performed on this measure.
|
Class<?> |
getValueClass()
Returns the value class of this measure.
|
String |
getValueClassName()
Returns the name of the value class for this measure.
|
JRExpression |
getValueExpression()
Returns the measure expression.
|
JRVariable |
getVariable()
Returns the variable associated with this measure.
|
public static final String EXCEPTION_MESSAGE_KEY_MEASURE_INCREMENTER_CLASS_LOAD_ERROR
public static final String EXCEPTION_MESSAGE_KEY_MEASURE_PERCENTAGE_CALCULATOR_CLASS_LOAD_ERROR
public static final String EXCEPTION_MESSAGE_KEY_MEASURE_VALUE_CLASS_LOAD_ERROR
protected String name
protected String valueClassName
protected String valueClassRealName
protected Class<?> valueClass
protected JRExpression expression
protected CalculationEnum calculationValue
protected String incrementerFactoryClassName
protected String incrementerFactoryClassRealName
protected Class<?> incrementerFactoryClass
protected CrosstabPercentageEnum percentageType
protected String percentageCalculatorClassName
protected String percentageCalculatorClassRealName
protected Class<?> percentageCalculatorClass
protected JRVariable variable
protected JRBaseCrosstabMeasure()
public JRBaseCrosstabMeasure(JRCrosstabMeasure measure, JRBaseObjectFactory factory)
public String getName()
JRCrosstabMeasure
getName
in interface JRCrosstabMeasure
JRCrosstabMeasure.getVariable()
public String getValueClassName()
JRCrosstabMeasure
getValueClassName
in interface JRCrosstabMeasure
public JRExpression getValueExpression()
JRCrosstabMeasure
getValueExpression
in interface JRCrosstabMeasure
public CalculationEnum getCalculationValue()
JRCrosstabMeasure
The incrementer factory associated with this measure will create an incrementer which will sum the measure values.
The possible calculation type are the same as the ones used for variables
(see JRVariable.getCalculationValue()
with
the exception of CalculationEnum.SYSTEM
.
getCalculationValue
in interface JRCrosstabMeasure
JRCrosstabMeasure.getIncrementerFactoryClassName()
,
JRExtendedIncrementerFactory
,
JRExtendedIncrementer
public String getIncrementerFactoryClassName()
JRCrosstabMeasure
Crosstab measures require extended incrementers, therefore
the incrementer class should implement
JRExtendedIncrementerFactory
.
getIncrementerFactoryClassName
in interface JRCrosstabMeasure
public CrosstabPercentageEnum getPercentageType()
JRCrosstabMeasure
Currently, only percentage out of grand total is supported.
The possible values are:
If percentage calculation is required, the value class should be one of the built-in supported percentage types or the percentage calculator class should be specified.
getPercentageType
in interface JRCrosstabMeasure
JRPercentageCalculatorFactory.hasBuiltInCalculator(Class)
,
JRCrosstabMeasure.getPercentageCalculatorClassName()
public Class<?> getIncrementerFactoryClass()
JRCrosstabMeasure
getIncrementerFactoryClass
in interface JRCrosstabMeasure
JRCrosstabMeasure.getIncrementerFactoryClassName()
public Class<?> getValueClass()
JRCrosstabMeasure
getValueClass
in interface JRCrosstabMeasure
public JRVariable getVariable()
JRCrosstabMeasure
The variable can be used inside the crosstab data cells as the measure value. The variable has the same name and value class as the measure.
getVariable
in interface JRCrosstabMeasure
public String getPercentageCalculatorClassName()
JRCrosstabMeasure
getPercentageCalculatorClassName
in interface JRCrosstabMeasure
public Class<?> getPercentageCalculatorClass()
JRCrosstabMeasure
getPercentageCalculatorClass
in interface JRCrosstabMeasure
public Object clone()
clone
in interface JRCloneable
clone
in class Object
public Object clone(CrosstabBaseCloneFactory cloneFactory)
clone
in interface CrosstabBaseCloneable
Copyright © 2016. All rights reserved.