public class ItemCountFunction extends AbstractFunction implements AggregationFunction
Modifier and Type | Field and Description |
---|---|
static BigDecimal |
ONE |
static BigDecimal |
ZERO |
Constructor and Description |
---|
ItemCountFunction()
Constructs an unnamed function.
|
ItemCountFunction(String name)
Constructs an item count report function.
|
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Clones the expression.
|
String |
getCrosstabFilterGroup() |
String |
getGroup()
Returns the name of the group (possibly null) for this function.
|
ItemCountFunction |
getInstance()
Return a completly separated copy of this function.
|
Object |
getValue()
Returns the number of items counted (so far) by the function.
|
void |
groupStarted(ReportEvent event)
Receives notification that a new group is about to start.
|
void |
itemsAdvanced(ReportEvent event)
Received notification of a move to the next row of data.
|
void |
reportInitialized(ReportEvent event)
Receives notification that a new report is about to start.
|
void |
setCrosstabFilterGroup(String crosstabFilterGroup) |
void |
setGroup(String group)
Setss the name of the group for this function.
|
void |
summaryRowSelection(ReportEvent event)
A crosstab specific event notifying crosstab-aware functions to select the result for the summary row cell that
will be printed next.
|
groupFinished, itemsFinished, itemsStarted, reportDone, reportFinished, reportStarted
getDataRow, getDependencyLevel, getName, getReportConfiguration, getResourceBundleFactory, getRuntime, isActive, isDeepTraversing, isPreserve, setActive, setDependencyLevel, setName, setPreserve, setRuntime
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
groupFinished, itemsFinished, itemsStarted, reportDone, reportFinished, reportStarted
getDataRow, getDependencyLevel, getName, getReportConfiguration, getResourceBundleFactory, getRuntime, isActive, isDeepTraversing, isPreserve, setDependencyLevel, setName, setRuntime
public static final BigDecimal ONE
public static final BigDecimal ZERO
public ItemCountFunction()
This constructor is intended for use by the SAX handler class only.
public ItemCountFunction(String name)
name
- The name of the function.NullPointerException
- if the name is nullpublic void reportInitialized(ReportEvent event)
reportInitialized
in interface ReportListener
reportInitialized
in class AbstractFunction
event
- the event.public String getGroup()
getGroup
in interface AggregationFunction
public void setGroup(String group)
setGroup
in interface AggregationFunction
group
- The group name.public void groupStarted(ReportEvent event)
groupStarted
in interface ReportListener
groupStarted
in class AbstractFunction
event
- Information about the event.public void itemsAdvanced(ReportEvent event)
itemsAdvanced
in interface ReportListener
itemsAdvanced
in class AbstractFunction
event
- Information about the event.public void summaryRowSelection(ReportEvent event)
AbstractFunction
summaryRowSelection
in interface ReportListener
summaryRowSelection
in class AbstractFunction
event
- The report event.public Object getValue()
getValue
in interface Expression
public String getCrosstabFilterGroup()
getCrosstabFilterGroup
in interface AggregationFunction
public void setCrosstabFilterGroup(String crosstabFilterGroup)
setCrosstabFilterGroup
in interface AggregationFunction
public ItemCountFunction getInstance()
AbstractExpression
getInstance
in interface Expression
getInstance
in class AbstractExpression
public Object clone()
AbstractExpression
Expressions maintain no state, cloning is done at the beginning of the report processing to disconnect the expression from any other object space.
clone
in interface Expression
clone
in class AbstractExpression