net.sf.jasperreports.engine.fill
Class JRFillVariable

java.lang.Object
  extended bynet.sf.jasperreports.engine.fill.JRFillVariable
All Implemented Interfaces:
JRVariable

public class JRFillVariable
extends java.lang.Object
implements JRVariable

Version:
$Id: JRFillVariable.java,v 1.17 2005/07/20 16:13:26 lucianc Exp $
Author:
Teodor Danciu (teodord@users.sourceforge.net)

Field Summary
static byte HELPER_COUNT
          Constant for the count helper variable.
static byte HELPER_SUM
          Constant for the count sum variable.
static byte HELPER_VARIANCE
          Constant for the count variance variable.
protected  JRVariable parent
           
 
Fields inherited from interface net.sf.jasperreports.engine.JRVariable
CALCULATION_AVERAGE, CALCULATION_COUNT, CALCULATION_HIGHEST, CALCULATION_LOWEST, CALCULATION_NOTHING, CALCULATION_STANDARD_DEVIATION, CALCULATION_SUM, CALCULATION_SYSTEM, CALCULATION_VARIANCE, COLUMN_COUNT, COLUMN_NUMBER, PAGE_COUNT, PAGE_NUMBER, REPORT_COUNT, RESET_TYPE_COLUMN, RESET_TYPE_GROUP, RESET_TYPE_NONE, RESET_TYPE_PAGE, RESET_TYPE_REPORT
 
Constructor Summary
protected JRFillVariable(JRVariable variable, JRFillObjectFactory factory)
           
 
Method Summary
 byte getCalculation()
          Returns the variable calculation type.
 java.lang.Object getEstimatedValue()
           
 JRExpression getExpression()
          Returns the main expression for this variable.
 JRFillVariable getHelperVariable(byte type)
          Returns a helper variable.
 java.lang.Object getIncrementedValue()
           
 JRIncrementer getIncrementer()
           
 java.lang.Class getIncrementerFactoryClass()
          Returns the class of the incrementer factory used for choosing the right incrementer for the variable value.
 java.lang.String getIncrementerFactoryClassName()
          Returns the string name of the variable value class.
 JRGroup getIncrementGroup()
          Returns the group whose break triggers the variable increment.
 byte getIncrementType()
          Returns the variable increment type.
 JRExpression getInitialValueExpression()
          Returns the initial value expression for this variable.
 java.lang.String getName()
          Returns the name of the variable.
 java.lang.Object getOldValue()
           
 JRGroup getResetGroup()
          Returns the group whose break triggers the variable reset.
 byte getResetType()
          Returns the variable reset type.
 java.lang.Object getValue()
           
 java.lang.Class getValueClass()
          Returns the class of the variable value.
 java.lang.String getValueClassName()
          Returns the string name of the variable value class.
 boolean isInitialized()
           
 boolean isSystemDefined()
          Returns true if the variable calculation type is system defined.
 void setEstimatedValue(java.lang.Object estimatedValue)
           
 JRFillVariable setHelperVariable(JRFillVariable helperVariable, byte type)
          Sets a helper variable.
 void setIncrementedValue(java.lang.Object incrementedValue)
           
 void setInitialized(boolean isInitialized)
           
 void setOldValue(java.lang.Object oldValue)
           
 void setValue(java.lang.Object value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

parent

protected JRVariable parent

HELPER_COUNT

public static final byte HELPER_COUNT
Constant for the count helper variable.

See Also:
Constant Field Values

HELPER_SUM

public static final byte HELPER_SUM
Constant for the count sum variable.

See Also:
Constant Field Values

HELPER_VARIANCE

public static final byte HELPER_VARIANCE
Constant for the count variance variable.

See Also:
Constant Field Values
Constructor Detail

JRFillVariable

protected JRFillVariable(JRVariable variable,
                         JRFillObjectFactory factory)
Method Detail

getName

public java.lang.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 interface JRVariable
Returns:
a string containing the variable name

getValueClass

public java.lang.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 interface JRVariable
Returns:
a Class instance representing the variable value class

getValueClassName

public java.lang.String getValueClassName()
Description copied from interface: JRVariable
Returns the string name of the variable value class.

Specified by:
getValueClassName in interface JRVariable

getIncrementerFactoryClass

public java.lang.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 interface JRVariable
Returns:
the Class instance of the incrementer factory
See Also:
JRIncrementer, JRIncrementerFactory

getIncrementerFactoryClassName

public java.lang.String getIncrementerFactoryClassName()
Description copied from interface: JRVariable
Returns the string name of the variable value class.

Specified by:
getIncrementerFactoryClassName in interface JRVariable

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 interface JRVariable
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 interface JRVariable
Returns:
a JRExpression instance containing the initial expression.

getResetType

public byte getResetType()
Description copied from interface: JRVariable
Returns the variable reset type. This value must be one of the reset type constants declared in this class.

Specified by:
getResetType in interface JRVariable

getIncrementType

public byte getIncrementType()
Description copied from interface: JRVariable
Returns the variable increment type. This value must be one of the reset type constants declared in this class, since the increment type uses the same constants as the reset type.

Specified by:
getIncrementType in interface JRVariable

getCalculation

public byte getCalculation()
Description copied from interface: JRVariable
Returns the variable calculation type. This value must be one of the calculation constants declared in this class.

Specified by:
getCalculation in interface JRVariable

isSystemDefined

public boolean isSystemDefined()
Description copied from interface: JRVariable
Returns true if the variable calculation type is system defined.

Specified by:
isSystemDefined in interface JRVariable
See Also:
JRVariable.CALCULATION_SYSTEM

getResetGroup

public JRGroup getResetGroup()
Description copied from interface: JRVariable
Returns the group whose break triggers the variable reset. Only used when JRVariable.getResetType() returns JRVariable.RESET_TYPE_GROUP.

Specified by:
getResetGroup in interface JRVariable

getIncrementGroup

public JRGroup getIncrementGroup()
Description copied from interface: JRVariable
Returns the group whose break triggers the variable increment. Only used when JRVariable.getIncrementType() returns JRVariable.RESET_TYPE_GROUP.

Specified by:
getIncrementGroup in interface JRVariable

getOldValue

public java.lang.Object getOldValue()

setOldValue

public void setOldValue(java.lang.Object oldValue)

getEstimatedValue

public java.lang.Object getEstimatedValue()

setEstimatedValue

public void setEstimatedValue(java.lang.Object estimatedValue)

getIncrementedValue

public java.lang.Object getIncrementedValue()

setIncrementedValue

public void setIncrementedValue(java.lang.Object incrementedValue)

getValue

public java.lang.Object getValue()

setValue

public void setValue(java.lang.Object value)

isInitialized

public boolean isInitialized()

setInitialized

public void setInitialized(boolean isInitialized)

getIncrementer

public JRIncrementer getIncrementer()

setHelperVariable

public JRFillVariable setHelperVariable(JRFillVariable helperVariable,
                                        byte type)
Sets a helper variable.

Parameters:
helperVariable - the helper variable
type - the helper type
Returns:
the previous helper variable for the type

getHelperVariable

public JRFillVariable getHelperVariable(byte type)
Returns a helper variable.

Parameters:
type - the helper type
Returns:
the helper variable for the specified type


© 2001-2005 JasperSoft Corporation www.jaspersoft.com