Package net.sf.jasperreports.engine.base
Class JRBaseVariable
- java.lang.Object
-
- net.sf.jasperreports.engine.base.JRBaseVariable
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,JRChangeEventsSupport,JRCloneable,JRVariable,StoreCloneable<JRBaseVariable>
- Direct Known Subclasses:
JRDesignVariable
public class JRBaseVariable extends java.lang.Object implements JRVariable, java.io.Serializable, StoreCloneable<JRBaseVariable>, JRChangeEventsSupport
- Author:
- Teodor Danciu (teodord@users.sourceforge.net)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected CalculationEnumcalculationValueprotected java.lang.Stringdescriptionprotected JRExpressionexpressionprotected java.lang.Class<?>incrementerFactoryClassprotected java.lang.StringincrementerFactoryClassNameprotected java.lang.StringincrementerFactoryClassRealNameprotected JRGroupincrementGroupprotected IncrementTypeEnumincrementTypeValueprotected JRExpressioninitialValueExpressionprotected booleanisSystemDefinedprotected java.lang.Stringnamestatic java.lang.StringPROPERTY_DESCRIPTIONprotected JRGroupresetGroupprotected ResetTypeEnumresetTypeValueprotected java.lang.Class<?>valueClassprotected java.lang.StringvalueClassNameprotected java.lang.StringvalueClassRealName-
Fields 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
Constructors Modifier Constructor Description protectedJRBaseVariable()protectedJRBaseVariable(JRVariable variable, JRBaseObjectFactory factory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectclone()JRBaseVariableclone(CloneStore cloneStore)CalculationEnumgetCalculationValue()Gets the variable calculation type.java.lang.StringgetDescription()Gets the variable optional description.JRPropertyChangeSupportgetEventSupport()Returns the property change support object for this instance.JRExpressiongetExpression()Returns the main expression for this variable.java.lang.Class<?>getIncrementerFactoryClass()Returns the class of the incrementer factory used for choosing the right incrementer for the variable value.java.lang.StringgetIncrementerFactoryClassName()Returns the string name of the variable value class.JRGroupgetIncrementGroup()Returns the group whose break triggers the variable increment.IncrementTypeEnumgetIncrementTypeValue()Gets the variable increment type.JRExpressiongetInitialValueExpression()Returns the initial value expression for this variable.java.lang.StringgetName()Returns the name of the variable.JRGroupgetResetGroup()Returns the group whose break triggers the variable reset.ResetTypeEnumgetResetTypeValue()Gets the variable reset type.java.lang.Class<?>getValueClass()Returns the class of the variable value.java.lang.StringgetValueClassName()Returns the string name of the variable value class.booleanisSystemDefined()Returnstrueif the variable calculation type is system defined.voidsetDescription(java.lang.String description)Sets the variable description.
-
-
-
Field Detail
-
PROPERTY_DESCRIPTION
public static final java.lang.String PROPERTY_DESCRIPTION
- See Also:
- Constant Field Values
-
name
protected java.lang.String name
-
description
protected java.lang.String description
-
valueClassName
protected java.lang.String valueClassName
-
valueClassRealName
protected java.lang.String valueClassRealName
-
incrementerFactoryClassName
protected java.lang.String incrementerFactoryClassName
-
incrementerFactoryClassRealName
protected java.lang.String incrementerFactoryClassRealName
-
resetTypeValue
protected ResetTypeEnum resetTypeValue
-
incrementTypeValue
protected IncrementTypeEnum incrementTypeValue
-
calculationValue
protected CalculationEnum calculationValue
-
isSystemDefined
protected boolean isSystemDefined
-
valueClass
protected transient java.lang.Class<?> valueClass
-
incrementerFactoryClass
protected transient java.lang.Class<?> incrementerFactoryClass
-
expression
protected JRExpression expression
-
initialValueExpression
protected JRExpression initialValueExpression
-
resetGroup
protected JRGroup resetGroup
-
incrementGroup
protected JRGroup incrementGroup
-
-
Constructor Detail
-
JRBaseVariable
protected JRBaseVariable()
-
JRBaseVariable
protected JRBaseVariable(JRVariable variable, JRBaseObjectFactory factory)
-
-
Method Detail
-
getName
public java.lang.String 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
public java.lang.String getDescription()
Description copied from interface:JRVariableGets the variable optional description.- Specified by:
getDescriptionin interfaceJRVariable
-
setDescription
public void setDescription(java.lang.String description)
Description copied from interface:JRVariableSets the variable description.- Specified by:
setDescriptionin interfaceJRVariable
-
getValueClass
public java.lang.Class<?> 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
public java.lang.String getValueClassName()
Description copied from interface:JRVariableReturns the string name of the variable value class.- Specified by:
getValueClassNamein interfaceJRVariable
-
getIncrementerFactoryClass
public java.lang.Class<?> 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:
JRIncrementer,JRIncrementerFactory
-
getIncrementerFactoryClassName
public java.lang.String getIncrementerFactoryClassName()
Description copied from interface:JRVariableReturns the string name of the variable value class.- Specified by:
getIncrementerFactoryClassNamein interfaceJRVariable
-
getResetTypeValue
public ResetTypeEnum getResetTypeValue()
Description copied from interface:JRVariableGets the variable reset type.- Specified by:
getResetTypeValuein interfaceJRVariable- Returns:
- a value representing one of the reset type constants in
ResetTypeEnum
-
getIncrementTypeValue
public IncrementTypeEnum getIncrementTypeValue()
Description copied from interface:JRVariableGets the variable increment type.- Specified by:
getIncrementTypeValuein interfaceJRVariable- Returns:
- a value representing one of the reset type constants in
IncrementTypeEnum
-
getCalculationValue
public CalculationEnum getCalculationValue()
Description copied from interface:JRVariableGets the variable calculation type.- Specified by:
getCalculationValuein 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:
CalculationEnum.SYSTEM
-
getExpression
public JRExpression 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
public JRExpression 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
public JRGroup getResetGroup()
Description copied from interface:JRVariableReturns the group whose break triggers the variable reset. Only used whenJRVariable.getResetTypeValue()returnsResetTypeEnum.GROUP.- Specified by:
getResetGroupin interfaceJRVariable
-
getIncrementGroup
public JRGroup getIncrementGroup()
Description copied from interface:JRVariableReturns the group whose break triggers the variable increment. Only used whenJRVariable.getIncrementTypeValue()returnsIncrementTypeEnum.GROUP.- Specified by:
getIncrementGroupin interfaceJRVariable
-
clone
public java.lang.Object clone()
- Specified by:
clonein interfaceJRCloneable- Overrides:
clonein classjava.lang.Object
-
clone
public JRBaseVariable clone(CloneStore cloneStore)
- Specified by:
clonein interfaceStoreCloneable<JRBaseVariable>
-
getEventSupport
public JRPropertyChangeSupport 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
-
-