net.sf.jasperreports.engine.base
Class JRBaseVariable

java.lang.Object
  extended by net.sf.jasperreports.engine.base.JRBaseVariable
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, JRCloneable, JRVariable
Direct Known Subclasses:
JRDesignVariable

public class JRBaseVariable
extends java.lang.Object
implements JRVariable, java.io.Serializable

Version:
$Id: JRBaseVariable.java 2000 2007-12-05 14:07:13Z teodord $
Author:
Teodor Danciu (teodord@users.sourceforge.net)
See Also:
Serialized Form

Field Summary
protected  byte calculation
           
protected  JRExpression expression
           
protected  java.lang.Class incrementerFactoryClass
           
protected  java.lang.String incrementerFactoryClassName
           
protected  java.lang.String incrementerFactoryClassRealName
           
protected  JRGroup incrementGroup
           
protected  byte incrementType
           
protected  JRExpression initialValueExpression
           
protected  boolean isSystemDefined
           
protected  java.lang.String name
           
protected  JRGroup resetGroup
           
protected  byte resetType
           
protected  java.lang.Class valueClass
           
protected  java.lang.String valueClassName
           
protected  java.lang.String valueClassRealName
           
 
Fields inherited from interface net.sf.jasperreports.engine.JRVariable
CALCULATION_AVERAGE, CALCULATION_COUNT, CALCULATION_DISTINCT_COUNT, CALCULATION_FIRST, 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 JRBaseVariable()
           
protected JRBaseVariable(JRVariable variable, JRBaseObjectFactory factory)
           
 
Method Summary
 java.lang.Object clone()
           
 byte getCalculation()
          Returns the variable calculation type.
 JRExpression getExpression()
          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.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.
 JRGroup getResetGroup()
          Returns the group whose break triggers the variable reset.
 byte getResetType()
          Returns the variable reset type.
 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 isSystemDefined()
          Returns true if the variable calculation type is system defined.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected java.lang.String name

valueClassName

protected java.lang.String valueClassName

valueClassRealName

protected java.lang.String valueClassRealName

incrementerFactoryClassName

protected java.lang.String incrementerFactoryClassName

incrementerFactoryClassRealName

protected java.lang.String incrementerFactoryClassRealName

resetType

protected byte resetType

incrementType

protected byte incrementType

calculation

protected byte calculation

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: 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

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

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.

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

clone

public java.lang.Object clone()
Specified by:
clone in interface JRCloneable
Overrides:
clone in class java.lang.Object


© 2001-2006 JasperSoft Corporation www.jaspersoft.com