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:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected CalculationEnum
calculation
protected String
description
protected JRExpression
expression
protected Class<?>
incrementerFactoryClass
protected String
incrementerFactoryClassName
protected String
incrementerFactoryClassRealName
protected String
incrementGroup
protected IncrementTypeEnum
incrementType
protected JRExpression
initialValueExpression
protected boolean
isSystemDefined
protected String
name
static String
PROPERTY_DESCRIPTION
protected String
resetGroup
protected ResetTypeEnum
resetType
protected Class<?>
valueClass
protected String
valueClassName
protected String
valueClassRealName
-
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 protected
JRBaseVariable()
protected
JRBaseVariable(JRVariable variable, JRBaseObjectFactory factory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
clone()
JRBaseVariable
clone(CloneStore cloneStore)
CalculationEnum
getCalculation()
Gets the variable calculation type.String
getDescription()
Gets the variable optional description.JRPropertyChangeSupport
getEventSupport()
Returns the property change support object for this instance.JRExpression
getExpression()
Returns the main expression for this variable.Class<?>
getIncrementerFactoryClass()
Returns the class of the incrementer factory used for choosing the right incrementer for the variable value.String
getIncrementerFactoryClassName()
Returns the string name of the variable value class.String
getIncrementGroup()
Returns the group whose break triggers the variable increment.IncrementTypeEnum
getIncrementType()
Gets the variable increment type.JRExpression
getInitialValueExpression()
Returns the initial value expression for this variable.String
getName()
Returns the name of the variable.String
getResetGroup()
Returns the group whose break triggers the variable reset.ResetTypeEnum
getResetType()
Gets the variable reset type.Class<?>
getValueClass()
Returns the class of the variable value.String
getValueClassName()
Returns the string name of the variable value class.boolean
isSystemDefined()
Returnstrue
if the variable calculation type is system defined.void
setDescription(String description)
Sets the variable description.
-
-
-
Field Detail
-
PROPERTY_DESCRIPTION
public static final String PROPERTY_DESCRIPTION
- See Also:
- Constant Field Values
-
name
protected String name
-
description
protected String description
-
valueClassName
protected String valueClassName
-
valueClassRealName
protected String valueClassRealName
-
incrementerFactoryClassName
protected String incrementerFactoryClassName
-
incrementerFactoryClassRealName
protected String incrementerFactoryClassRealName
-
resetType
protected ResetTypeEnum resetType
-
incrementType
protected IncrementTypeEnum incrementType
-
calculation
protected CalculationEnum calculation
-
isSystemDefined
protected boolean isSystemDefined
-
valueClass
protected transient Class<?> valueClass
-
incrementerFactoryClass
protected transient Class<?> incrementerFactoryClass
-
expression
protected JRExpression expression
-
initialValueExpression
protected JRExpression initialValueExpression
-
resetGroup
protected String resetGroup
-
incrementGroup
protected String incrementGroup
-
-
Constructor Detail
-
JRBaseVariable
protected JRBaseVariable()
-
JRBaseVariable
protected JRBaseVariable(JRVariable variable, JRBaseObjectFactory factory)
-
-
Method Detail
-
getName
public String getName()
Description copied from interface:JRVariable
Returns the name of the variable. Since all variables are stored in a map, the variable names are the keys in the map.- Specified by:
getName
in interfaceJRVariable
- Returns:
- a string containing the variable name
-
getDescription
public String getDescription()
Description copied from interface:JRVariable
Gets the variable optional description.- Specified by:
getDescription
in interfaceJRVariable
-
setDescription
public void setDescription(String description)
Description copied from interface:JRVariable
Sets the variable description.- Specified by:
setDescription
in interfaceJRVariable
-
getValueClass
public Class<?> getValueClass()
Description copied from interface:JRVariable
Returns 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:
getValueClass
in interfaceJRVariable
- Returns:
- a Class instance representing the variable value class
-
getValueClassName
public String getValueClassName()
Description copied from interface:JRVariable
Returns the string name of the variable value class.- Specified by:
getValueClassName
in interfaceJRVariable
-
getIncrementerFactoryClass
public Class<?> getIncrementerFactoryClass()
Description copied from interface:JRVariable
Returns the class of the incrementer factory used for choosing the right incrementer for the variable value.- Specified by:
getIncrementerFactoryClass
in interfaceJRVariable
- Returns:
- the Class instance of the incrementer factory
- See Also:
JRIncrementer
,JRIncrementerFactory
-
getIncrementerFactoryClassName
public String getIncrementerFactoryClassName()
Description copied from interface:JRVariable
Returns the string name of the variable value class.- Specified by:
getIncrementerFactoryClassName
in interfaceJRVariable
-
getResetType
public ResetTypeEnum getResetType()
Description copied from interface:JRVariable
Gets the variable reset type.- Specified by:
getResetType
in interfaceJRVariable
- Returns:
- a value representing one of the reset type constants in
ResetTypeEnum
-
getIncrementType
public IncrementTypeEnum getIncrementType()
Description copied from interface:JRVariable
Gets the variable increment type.- Specified by:
getIncrementType
in interfaceJRVariable
- Returns:
- a value representing one of the reset type constants in
IncrementTypeEnum
-
getCalculation
public CalculationEnum getCalculation()
Description copied from interface:JRVariable
Gets the variable calculation type.- Specified by:
getCalculation
in interfaceJRVariable
- Returns:
- a value representing one of the calculation type constants in
CalculationEnum
-
isSystemDefined
public boolean isSystemDefined()
Description copied from interface:JRVariable
Returnstrue
if the variable calculation type is system defined.- Specified by:
isSystemDefined
in interfaceJRVariable
- See Also:
CalculationEnum.SYSTEM
-
getExpression
public JRExpression getExpression()
Description copied from interface:JRVariable
Returns the main expression for this variable. The expression must be numeric for certain calculation types.- Specified by:
getExpression
in interfaceJRVariable
- Returns:
- a
JRExpression
instance containing the expression.
-
getInitialValueExpression
public JRExpression getInitialValueExpression()
Description copied from interface:JRVariable
Returns the initial value expression for this variable. The expression must be numeric for certain calculation types.- Specified by:
getInitialValueExpression
in interfaceJRVariable
- Returns:
- a
JRExpression
instance containing the initial expression.
-
getResetGroup
public String getResetGroup()
Description copied from interface:JRVariable
Returns the group whose break triggers the variable reset. Only used whenJRVariable.getResetType()
returnsResetTypeEnum.GROUP
.- Specified by:
getResetGroup
in interfaceJRVariable
-
getIncrementGroup
public String getIncrementGroup()
Description copied from interface:JRVariable
Returns the group whose break triggers the variable increment. Only used whenJRVariable.getIncrementType()
returnsIncrementTypeEnum.GROUP
.- Specified by:
getIncrementGroup
in interfaceJRVariable
-
clone
public Object clone()
- Specified by:
clone
in interfaceJRCloneable
- Overrides:
clone
in classObject
-
clone
public JRBaseVariable clone(CloneStore cloneStore)
- Specified by:
clone
in interfaceStoreCloneable<JRBaseVariable>
-
getEventSupport
public JRPropertyChangeSupport getEventSupport()
Description copied from interface:JRChangeEventsSupport
Returns the property change support object for this instance.- Specified by:
getEventSupport
in interfaceJRChangeEventsSupport
- Returns:
- the property change support object for this instance
-
-