Class JRBaseCrosstabMeasure
- java.lang.Object
-
- net.sf.jasperreports.crosstabs.base.JRBaseCrosstabMeasure
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,CrosstabBaseCloneable,JRCrosstabMeasure,JRCloneable
- Direct Known Subclasses:
JRDesignCrosstabMeasure
public class JRBaseCrosstabMeasure extends java.lang.Object implements JRCrosstabMeasure, java.io.Serializable, CrosstabBaseCloneable
Base read-only crosstab measure implementation.- Author:
- Lucian Chirita (lucianc@users.sourceforge.net)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected CalculationEnumcalculationValuestatic java.lang.StringEXCEPTION_MESSAGE_KEY_MEASURE_INCREMENTER_CLASS_LOAD_ERRORstatic java.lang.StringEXCEPTION_MESSAGE_KEY_MEASURE_PERCENTAGE_CALCULATOR_CLASS_LOAD_ERRORstatic java.lang.StringEXCEPTION_MESSAGE_KEY_MEASURE_VALUE_CLASS_LOAD_ERRORprotected JRExpressionexpressionprotected java.lang.Class<?>incrementerFactoryClassprotected java.lang.StringincrementerFactoryClassNameprotected java.lang.StringincrementerFactoryClassRealNameprotected java.lang.Stringnameprotected java.lang.Class<?>percentageCalculatorClassprotected java.lang.StringpercentageCalculatorClassNameprotected java.lang.StringpercentageCalculatorClassRealNameprotected CrosstabPercentageEnumpercentageTypeprotected java.lang.Class<?>valueClassprotected java.lang.StringvalueClassNameprotected java.lang.StringvalueClassRealNameprotected JRVariablevariable
-
Constructor Summary
Constructors Modifier Constructor Description protectedJRBaseCrosstabMeasure()JRBaseCrosstabMeasure(JRCrosstabMeasure measure, JRBaseObjectFactory factory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectclone()java.lang.Objectclone(CrosstabBaseCloneFactory cloneFactory)CalculationEnumgetCalculationValue()Returns the calculation type which will be performed on the measure values.java.lang.Class<?>getIncrementerFactoryClass()Returns the incrementer factory class.java.lang.StringgetIncrementerFactoryClassName()Returns the incrementer factory class name.java.lang.StringgetName()Returns the name of the measure.java.lang.Class<?>getPercentageCalculatorClass()Returns the percentage calculator class.java.lang.StringgetPercentageCalculatorClassName()Returns the percentage calculator class name.CrosstabPercentageEnumgetPercentageType()Returns the percentage calculation type performed on this measure.java.lang.Class<?>getValueClass()Returns the value class of this measure.java.lang.StringgetValueClassName()Returns the name of the value class for this measure.JRExpressiongetValueExpression()Returns the measure expression.JRVariablegetVariable()Returns the variable associated with this measure.
-
-
-
Field Detail
-
EXCEPTION_MESSAGE_KEY_MEASURE_INCREMENTER_CLASS_LOAD_ERROR
public static final java.lang.String EXCEPTION_MESSAGE_KEY_MEASURE_INCREMENTER_CLASS_LOAD_ERROR
- See Also:
- Constant Field Values
-
EXCEPTION_MESSAGE_KEY_MEASURE_PERCENTAGE_CALCULATOR_CLASS_LOAD_ERROR
public static final java.lang.String EXCEPTION_MESSAGE_KEY_MEASURE_PERCENTAGE_CALCULATOR_CLASS_LOAD_ERROR
- See Also:
- Constant Field Values
-
EXCEPTION_MESSAGE_KEY_MEASURE_VALUE_CLASS_LOAD_ERROR
public static final java.lang.String EXCEPTION_MESSAGE_KEY_MEASURE_VALUE_CLASS_LOAD_ERROR
- See Also:
- Constant Field Values
-
name
protected java.lang.String name
-
valueClassName
protected java.lang.String valueClassName
-
valueClassRealName
protected java.lang.String valueClassRealName
-
valueClass
protected transient java.lang.Class<?> valueClass
-
expression
protected JRExpression expression
-
calculationValue
protected CalculationEnum calculationValue
-
incrementerFactoryClassName
protected java.lang.String incrementerFactoryClassName
-
incrementerFactoryClassRealName
protected java.lang.String incrementerFactoryClassRealName
-
incrementerFactoryClass
protected java.lang.Class<?> incrementerFactoryClass
-
percentageType
protected CrosstabPercentageEnum percentageType
-
percentageCalculatorClassName
protected java.lang.String percentageCalculatorClassName
-
percentageCalculatorClassRealName
protected java.lang.String percentageCalculatorClassRealName
-
percentageCalculatorClass
protected java.lang.Class<?> percentageCalculatorClass
-
variable
protected JRVariable variable
-
-
Constructor Detail
-
JRBaseCrosstabMeasure
protected JRBaseCrosstabMeasure()
-
JRBaseCrosstabMeasure
public JRBaseCrosstabMeasure(JRCrosstabMeasure measure, JRBaseObjectFactory factory)
-
-
Method Detail
-
getName
public java.lang.String getName()
Description copied from interface:JRCrosstabMeasureReturns the name of the measure.- Specified by:
getNamein interfaceJRCrosstabMeasure- Returns:
- the name of the measure
- See Also:
JRCrosstabMeasure.getVariable()
-
getValueClassName
public java.lang.String getValueClassName()
Description copied from interface:JRCrosstabMeasureReturns the name of the value class for this measure.- Specified by:
getValueClassNamein interfaceJRCrosstabMeasure- Returns:
- the name of the value class for this measure
-
getValueExpression
public JRExpression getValueExpression()
Description copied from interface:JRCrosstabMeasureReturns the measure expression.- Specified by:
getValueExpressionin interfaceJRCrosstabMeasure- Returns:
- the measure expression
-
getCalculationValue
public CalculationEnum getCalculationValue()
Description copied from interface:JRCrosstabMeasureReturns the calculation type which will be performed on the measure values.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 ofCalculationEnum.SYSTEM.- Specified by:
getCalculationValuein interfaceJRCrosstabMeasure- Returns:
- the calculation type which will be performed on the measure values
- See Also:
JRCrosstabMeasure.getIncrementerFactoryClassName(),JRExtendedIncrementerFactory,JRExtendedIncrementer
-
getIncrementerFactoryClassName
public java.lang.String getIncrementerFactoryClassName()
Description copied from interface:JRCrosstabMeasureReturns the incrementer factory class name.Crosstab measures require extended incrementers, therefore the incrementer class should implement
JRExtendedIncrementerFactory.- Specified by:
getIncrementerFactoryClassNamein interfaceJRCrosstabMeasure- Returns:
- the incrementer factory class name
-
getPercentageType
public CrosstabPercentageEnum getPercentageType()
Description copied from interface:JRCrosstabMeasureReturns the percentage calculation type performed on this measure.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.
- Specified by:
getPercentageTypein interfaceJRCrosstabMeasure- Returns:
- the percentage calculation type
- See Also:
JRPercentageCalculatorFactory.hasBuiltInCalculator(Class),JRCrosstabMeasure.getPercentageCalculatorClassName()
-
getIncrementerFactoryClass
public java.lang.Class<?> getIncrementerFactoryClass()
Description copied from interface:JRCrosstabMeasureReturns the incrementer factory class.- Specified by:
getIncrementerFactoryClassin interfaceJRCrosstabMeasure- Returns:
- the incrementer factory class
- See Also:
JRCrosstabMeasure.getIncrementerFactoryClassName()
-
getValueClass
public java.lang.Class<?> getValueClass()
Description copied from interface:JRCrosstabMeasureReturns the value class of this measure.- Specified by:
getValueClassin interfaceJRCrosstabMeasure- Returns:
- the value class of this measure
-
getVariable
public JRVariable getVariable()
Description copied from interface:JRCrosstabMeasureReturns the variable associated with this measure.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.
- Specified by:
getVariablein interfaceJRCrosstabMeasure- Returns:
- the variable associated with this measure
-
getPercentageCalculatorClassName
public java.lang.String getPercentageCalculatorClassName()
Description copied from interface:JRCrosstabMeasureReturns the percentage calculator class name.- Specified by:
getPercentageCalculatorClassNamein interfaceJRCrosstabMeasure- Returns:
- the percentage calculator class name
-
getPercentageCalculatorClass
public java.lang.Class<?> getPercentageCalculatorClass()
Description copied from interface:JRCrosstabMeasureReturns the percentage calculator class.- Specified by:
getPercentageCalculatorClassin interfaceJRCrosstabMeasure- Returns:
- the percentage calculator class
-
clone
public java.lang.Object clone()
- Specified by:
clonein interfaceJRCloneable- Overrides:
clonein classjava.lang.Object
-
clone
public java.lang.Object clone(CrosstabBaseCloneFactory cloneFactory)
- Specified by:
clonein interfaceCrosstabBaseCloneable
-
-