net.sf.jasperreports.engine.fill

## Class JRFillVariable

- java.lang.Object
- - net.sf.jasperreports.engine.fill.JRFillVariable

- All Implemented Interfaces:
    java.lang.Cloneable, JRCalculable, JRCloneable, JRVariable

      public class JRFillVariable
      extends java.lang.Object
      implements JRVariable, JRCalculable

  Version:
    $Id: JRFillVariable.java 5878 2013-01-07 20:23:13Z teodord $
  Author:
    Teodor Danciu (teodord@users.sourceforge.net)

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected JRVariable` | `parent`

    - ### Fields inherited from interface net.sf.jasperreports.engine.JRVariable

      `COLUMN_COUNT, COLUMN_NUMBER, PAGE_COUNT, PAGE_NUMBER, REPORT_COUNT`

    - ### Fields inherited from interface net.sf.jasperreports.engine.fill.JRCalculable

      `HELPER_COUNT, HELPER_SIZE, HELPER_SUM, HELPER_VARIANCE`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `JRFillVariable(JRVariable variable, JRFillObjectFactory factory)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.Object` | `clone()`
    `CalculationEnum` | `getCalculationValue()` Gets the variable calculation type.
    `java.lang.Object` | `getEstimatedValue()`
    `JRExpression` | `getExpression()` Returns the main expression for this variable.
    `JRCalculable` | `getHelperVariable(byte type)` Returns a helper variable.
    `java.lang.Object` | `getIncrementedValue()` Returns the incremented value of the calculable object.
    `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.
    `IncrementTypeEnum` | `getIncrementTypeValue()` Gets 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()`
    `java.lang.Object` | `getPreviousOldValue()`
    `JRGroup` | `getResetGroup()` Returns the group whose break triggers the variable reset.
    `ResetTypeEnum` | `getResetTypeValue()` Gets the variable reset type.
    `java.lang.Object` | `getValue()` Returns the value of the calculable object.
    `java.lang.Object` | `getValue(byte evaluation)`
    `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()` Returns `true` if and only if the calculable object was only initialized and not incremented.
    `boolean` | `isSystemDefined()` Returns `true` if the variable calculation type is system defined.
    `void` | `overwriteValue(java.lang.Object newValue, byte evaluation)`
    `protected void` | `reset()`
    `void` | `restoreValue(byte evaluation)`
    `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)` Sets the initialized flag for this calculable object.
    `void` | `setOldValue(java.lang.Object oldValue)`
    `void` | `setPreviousOldValue(java.lang.Object previousOldValue)`
    `void` | `setValue(java.lang.Object value)`

    - ### Methods inherited from class java.lang.Object

      `equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### parent

          protected JRVariable parent

  - ### Constructor Detail

    - #### JRFillVariable

          protected JRFillVariable(JRVariable variable,
                        JRFillObjectFactory factory)

  - ### Method Detail

    - #### reset

          protected void reset()

    - #### 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.

    - #### getResetTypeValue

          public ResetTypeEnum getResetTypeValue()

      Description copied from interface: `JRVariable`
      Gets the variable reset type.
      Specified by:
        `getResetTypeValue` in interface `JRVariable`
      Returns:
        a value representing one of the reset type constants in `ResetTypeEnum`

    - #### getIncrementTypeValue

          public IncrementTypeEnum getIncrementTypeValue()

      Description copied from interface: `JRVariable`
      Gets the variable increment type.
      Specified by:
        `getIncrementTypeValue` in interface `JRVariable`
      Returns:
        a value representing one of the reset type constants in `IncrementTypeEnum`

    - #### getCalculationValue

          public CalculationEnum getCalculationValue()

      Description copied from interface: `JRVariable`
      Gets the variable calculation type.
      Specified by:
        `getCalculationValue` in interface `JRVariable`
      Returns:
        a value representing one of the calculation type constants in `CalculationEnum`

    - #### 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:
        `CalculationEnum.SYSTEM`

    - #### getResetGroup

          public JRGroup getResetGroup()

      Description copied from interface: `JRVariable`
      Returns the group whose break triggers the variable reset. Only used when `JRVariable.getResetTypeValue()` returns `ResetTypeEnum.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.getIncrementTypeValue()` returns `ResetTypeEnum.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()

      Description copied from interface: `JRCalculable`
      Returns the incremented value of the calculable object.
      Specified by:
        `getIncrementedValue` in interface `JRCalculable`
      Returns:
        the incremented value

    - #### setIncrementedValue

          public void setIncrementedValue(java.lang.Object incrementedValue)

    - #### getValue

          public java.lang.Object getValue()

      Description copied from interface: `JRCalculable`
      Returns the value of the calculable object.
      Specified by:
        `getValue` in interface `JRCalculable`
      Returns:
        the value

    - #### setValue

          public void setValue(java.lang.Object value)

    - #### isInitialized

          public boolean isInitialized()

      Description copied from interface: `JRCalculable`
      Returns `true` if and only if the calculable object was only initialized and not incremented.
      Specified by:
        `isInitialized` in interface `JRCalculable`
      Returns:
        `true` if and only if the calculable object was only initialized and not incremented

    - #### setInitialized

          public void setInitialized(boolean isInitialized)

      Description copied from interface: `JRCalculable`
      Sets the initialized flag for this calculable object.
      Specified by:
        `setInitialized` in interface `JRCalculable`
      Parameters:
        `isInitialized` - the initialized flag
      See Also:
        `JRCalculable.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 JRCalculable getHelperVariable(byte type)

      Returns a helper variable.
      Specified by:
        `getHelperVariable` in interface `JRCalculable`
      Parameters:
        `type` - the helper type
      Returns:
        the helper variable for the specified type

    - #### getValue

          public java.lang.Object getValue(byte evaluation)

    - #### overwriteValue

          public void overwriteValue(java.lang.Object newValue,
                            byte evaluation)

    - #### restoreValue

          public void restoreValue(byte evaluation)

    - #### getPreviousOldValue

          public java.lang.Object getPreviousOldValue()

    - #### setPreviousOldValue

          public void setPreviousOldValue(java.lang.Object previousOldValue)

    - #### clone

          public java.lang.Object clone()

      Specified by:
        `clone` in interface `JRCloneable`
      Overrides:
        `clone` in class `java.lang.Object`

© 2001-2010 Jaspersoft Corporation www.jaspersoft.com