Ontimize 5.2072EN

com.ontimize.report
Class ItemMinFunction

java.lang.Object
  extended byorg.jfree.report.function.AbstractFunction
      extended bycom.ontimize.report.ItemMinFunction
All Implemented Interfaces:
java.lang.Cloneable, java.util.EventListener, org.jfree.report.function.Expression, org.jfree.report.function.Function, org.jfree.report.event.ReportListener, java.io.Serializable

public class ItemMinFunction
extends org.jfree.report.function.AbstractFunction
implements java.io.Serializable

See Also:
Serialized Form

Field Summary
static java.lang.String FIELD_PROPERTY
          Literal text for the 'field' property.
static java.lang.String GROUP_PROPERTY
          Literal text for the 'group' property.
 
Fields inherited from interface org.jfree.report.function.Expression
AUTOACTIVATE_PROPERTY
 
Constructor Summary
ItemMinFunction()
          Constructs an unnamed function.
ItemMinFunction(java.lang.String name)
          Constructs a named function.
 
Method Summary
 java.lang.String getField()
          Returns the field used by the function.
 java.lang.String getGroup()
          Returns the group name.
 org.jfree.report.function.Expression getInstance()
          Return a completely separated copy of this function.
 java.lang.Object getValue()
          Returns the function value, in this case the running total of a specific column in the report's TableModel.
 void groupStarted(org.jfree.report.event.ReportEvent event)
          Receives notification that a new group is about to start.
 void initialize()
          Initiates the function and tests that all required properties are set.
 void itemsAdvanced(org.jfree.report.event.ReportEvent event)
          Receives notification that a row of data is being processed.
 void reportInitialized(org.jfree.report.event.ReportEvent event)
          Receives notification that a new report is about to start.
 void setField(java.lang.String field)
          Sets the field name for the function.
 void setGroup(java.lang.String name)
          Sets the group name.
 
Methods inherited from class org.jfree.report.function.AbstractFunction
clone, getDataRow, getDependencyLevel, getName, getProperties, getProperty, getProperty, groupFinished, isActive, itemsFinished, itemsStarted, reportDone, reportFinished, reportStarted, setDataRow, setDependencyLevel, setName, setProperties, setProperty
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GROUP_PROPERTY

public static final java.lang.String GROUP_PROPERTY
Literal text for the 'group' property.

See Also:
Constant Field Values

FIELD_PROPERTY

public static final java.lang.String FIELD_PROPERTY
Literal text for the 'field' property.

See Also:
Constant Field Values
Constructor Detail

ItemMinFunction

public ItemMinFunction()
Constructs an unnamed function. Make sure to set a Name or function initialization will fail.


ItemMinFunction

public ItemMinFunction(java.lang.String name)
Constructs a named function.

The field must be defined before using the function.

Parameters:
name - The function name.
Method Detail

reportInitialized

public void reportInitialized(org.jfree.report.event.ReportEvent event)
Receives notification that a new report is about to start.

Does nothing.

Specified by:
reportInitialized in interface org.jfree.report.event.ReportListener
Parameters:
event - Information about the event.

groupStarted

public void groupStarted(org.jfree.report.event.ReportEvent event)
Receives notification that a new group is about to start. If this is the group defined for the function, then the minimum value is reset to zero.

Specified by:
groupStarted in interface org.jfree.report.event.ReportListener
Parameters:
event - Information about the event.

getGroup

public java.lang.String getGroup()
Returns the group name.

Returns:
The group name.

setGroup

public void setGroup(java.lang.String name)
Sets the group name.

If a group is defined, the minimum value is reset to zero at the start of every instance of this group.

Parameters:
name - The group name (null permitted).

getField

public java.lang.String getField()
Returns the field used by the function.

The field name corresponds to a column name in the report's TableModel.

Returns:
The field name.

setField

public void setField(java.lang.String field)
Sets the field name for the function.

The field name corresponds to a column name in the report's TableModel.

Parameters:
field - the field name (null not permitted).

itemsAdvanced

public void itemsAdvanced(org.jfree.report.event.ReportEvent event)
Receives notification that a row of data is being processed. Reads the data from the field defined for this function and performs the minimum value comparison with its old value.

Specified by:
itemsAdvanced in interface org.jfree.report.event.ReportListener
Parameters:
event - Information about the event.

getValue

public java.lang.Object getValue()
Returns the function value, in this case the running total of a specific column in the report's TableModel.

Specified by:
getValue in interface org.jfree.report.function.Expression
Returns:
The function value.

initialize

public void initialize()
                throws org.jfree.report.function.FunctionInitializeException
Initiates the function and tests that all required properties are set. If the required field property is not set, a FunctionInitializeException is thrown.

Specified by:
initialize in interface org.jfree.report.function.Expression
Throws:
org.jfree.report.function.FunctionInitializeException - when no field is set.

getInstance

public org.jfree.report.function.Expression getInstance()
Return a completely separated copy of this function. The copy does no longer share any changeable objects with the original function.

Specified by:
getInstance in interface org.jfree.report.function.Expression
Returns:
a copy of this function.

Ontimize