|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.jrefinery.report.function.AbstractFunction | +--com.jrefinery.report.function.GroupCountFunction
A report function that counts groups in a report. If a null-groupname is given, all groups are counted.
A group can be defined using the property "group". If the group property is not set, all group starts get counted.
Field Summary | |
static java.lang.String |
GROUP_PROPERTY
Literal text for the 'group' property. |
Fields inherited from interface com.jrefinery.report.function.Expression |
AUTOACTIVATE_PROPERTY |
Constructor Summary | |
GroupCountFunction()
Default constructor. |
|
GroupCountFunction(java.lang.String name,
java.lang.String group)
Constructs a report function for counting groups. |
Method Summary | |
java.lang.String |
getGroup()
Returns the name of the group to be counted. |
java.lang.Object |
getValue()
Returns the number of groups processed so far (including the current group). |
void |
groupStarted(ReportEvent event)
Receives notification that a new group is about to start. |
void |
reportInitialized(ReportEvent event)
Receives notification that a new report is about to start. |
void |
setGroup(java.lang.String group)
defines the name of the group to be counted. |
Methods inherited from class com.jrefinery.report.function.AbstractFunction |
clone, getDataRow, getDependencyLevel, getInstance, getName, getProperties, getProperty, getProperty, groupFinished, initialize, isActive, itemsAdvanced, itemsFinished, itemsStarted, pageFinished, pageStarted, 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 |
public static final java.lang.String GROUP_PROPERTY
Constructor Detail |
public GroupCountFunction()
public GroupCountFunction(java.lang.String name, java.lang.String group)
name
- The function name.group
- The group name.
java.lang.NullPointerException
- if the given name is nullMethod Detail |
public java.lang.String getGroup()
public void setGroup(java.lang.String group)
group
- the name of the group to be counted.public void reportInitialized(ReportEvent event)
reportInitialized
in interface ReportListener
reportInitialized
in class AbstractFunction
event
- the current report event received.public void groupStarted(ReportEvent event)
groupStarted
in interface ReportListener
groupStarted
in class AbstractFunction
event
- the current report event received.public java.lang.Object getValue()
getValue
in interface Expression
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |