Package net.sf.jasperreports.engine.base
Class JRBaseVariable
java.lang.Object
net.sf.jasperreports.engine.base.JRBaseVariable
- All Implemented Interfaces:
Serializable,Cloneable,JRChangeEventsSupport,JRCloneable,JRVariable,StoreCloneable<JRBaseVariable>
- Direct Known Subclasses:
JRDesignVariable
public class JRBaseVariable
extends Object
implements JRVariable, Serializable, StoreCloneable<JRBaseVariable>, JRChangeEventsSupport
- Author:
- Teodor Danciu (teodord@users.sourceforge.net)
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CalculationEnumprotected Stringprotected JRExpressionprotected Class<?> protected Stringprotected Stringprotected Stringprotected IncrementTypeEnumprotected JRExpressionprotected booleanprotected Stringstatic final Stringprotected Stringprotected ResetTypeEnumprotected Class<?> protected Stringprotected StringFields inherited from interface net.sf.jasperreports.engine.JRVariable
COLUMN_COUNT, COLUMN_NUMBER, MASTER_CURRENT_PAGE, MASTER_TOTAL_PAGES, PAGE_COUNT, PAGE_NUMBER, REPORT_COUNT -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedprotectedJRBaseVariable(JRVariable variable, JRBaseObjectFactory factory) -
Method Summary
Modifier and TypeMethodDescriptionclone()clone(CloneStore cloneStore) Gets the variable calculation type.Gets the variable optional description.Returns the property change support object for this instance.Returns the main expression for this variable.Class<?> Returns the class of the incrementer factory used for choosing the right incrementer for the variable value.Returns the string name of the variable value class.Returns the group whose break triggers the variable increment.Gets the variable increment type.Returns the initial value expression for this variable.getName()Returns the name of the variable.Returns the group whose break triggers the variable reset.Gets the variable reset type.Class<?> Returns the class of the variable value.Returns the string name of the variable value class.booleanReturnstrueif the variable calculation type is system defined.voidsetDescription(String description) Sets the variable description.
-
Field Details
-
PROPERTY_DESCRIPTION
- See Also:
-
name
-
description
-
valueClassName
-
valueClassRealName
-
incrementerFactoryClassName
-
incrementerFactoryClassRealName
-
resetType
-
incrementType
-
calculation
-
isSystemDefined
protected boolean isSystemDefined -
valueClass
-
incrementerFactoryClass
-
expression
-
initialValueExpression
-
resetGroup
-
incrementGroup
-
-
Constructor Details
-
JRBaseVariable
protected JRBaseVariable() -
JRBaseVariable
-
-
Method Details
-
getName
Description copied from interface:JRVariableReturns the name of the variable. Since all variables are stored in a map, the variable names are the keys in the map.- Specified by:
getNamein interfaceJRVariable- Returns:
- a string containing the variable name
-
getDescription
Description copied from interface:JRVariableGets the variable optional description.- Specified by:
getDescriptionin interfaceJRVariable
-
setDescription
Description copied from interface:JRVariableSets the variable description.- Specified by:
setDescriptionin interfaceJRVariable
-
getValueClass
Description copied from interface:JRVariableReturns the class of the variable value. Any class is allowed as long as it is in the classpath at compile and run time.- Specified by:
getValueClassin interfaceJRVariable- Returns:
- a Class instance representing the variable value class
-
getValueClassName
Description copied from interface:JRVariableReturns the string name of the variable value class.- Specified by:
getValueClassNamein interfaceJRVariable
-
getIncrementerFactoryClass
Description copied from interface:JRVariableReturns the class of the incrementer factory used for choosing the right incrementer for the variable value.- Specified by:
getIncrementerFactoryClassin interfaceJRVariable- Returns:
- the Class instance of the incrementer factory
- See Also:
-
getIncrementerFactoryClassName
Description copied from interface:JRVariableReturns the string name of the variable value class.- Specified by:
getIncrementerFactoryClassNamein interfaceJRVariable
-
getResetType
Description copied from interface:JRVariableGets the variable reset type.- Specified by:
getResetTypein interfaceJRVariable- Returns:
- a value representing one of the reset type constants in
ResetTypeEnum
-
getIncrementType
Description copied from interface:JRVariableGets the variable increment type.- Specified by:
getIncrementTypein interfaceJRVariable- Returns:
- a value representing one of the reset type constants in
IncrementTypeEnum
-
getCalculation
Description copied from interface:JRVariableGets the variable calculation type.- Specified by:
getCalculationin interfaceJRVariable- Returns:
- a value representing one of the calculation type constants in
CalculationEnum
-
isSystemDefined
public boolean isSystemDefined()Description copied from interface:JRVariableReturnstrueif the variable calculation type is system defined.- Specified by:
isSystemDefinedin interfaceJRVariable- See Also:
-
getExpression
Description copied from interface:JRVariableReturns the main expression for this variable. The expression must be numeric for certain calculation types.- Specified by:
getExpressionin interfaceJRVariable- Returns:
- a
JRExpressioninstance containing the expression.
-
getInitialValueExpression
Description copied from interface:JRVariableReturns the initial value expression for this variable. The expression must be numeric for certain calculation types.- Specified by:
getInitialValueExpressionin interfaceJRVariable- Returns:
- a
JRExpressioninstance containing the initial expression.
-
getResetGroup
Description copied from interface:JRVariableReturns the group whose break triggers the variable reset. Only used whenJRVariable.getResetType()returnsResetTypeEnum.GROUP.- Specified by:
getResetGroupin interfaceJRVariable
-
getIncrementGroup
Description copied from interface:JRVariableReturns the group whose break triggers the variable increment. Only used whenJRVariable.getIncrementType()returnsIncrementTypeEnum.GROUP.- Specified by:
getIncrementGroupin interfaceJRVariable
-
clone
- Specified by:
clonein interfaceJRCloneable- Overrides:
clonein classObject
-
clone
- Specified by:
clonein interfaceStoreCloneable<JRBaseVariable>
-
getEventSupport
Description copied from interface:JRChangeEventsSupportReturns the property change support object for this instance.- Specified by:
getEventSupportin interfaceJRChangeEventsSupport- Returns:
- the property change support object for this instance
-