public class CountDistinctFunction extends AbstractFunction implements FieldAggregationFunction
Constructor and Description |
---|
CountDistinctFunction()
DefaultConstructor.
|
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Clones the expression.
|
String |
getCrosstabFilterGroup() |
String |
getField()
Returns the field used by the function.
|
String |
getGroup()
Returns the group name.
|
Expression |
getInstance()
Return a completly separated copy of this function.
|
Object |
getValue()
Return the number of distint values for the given column.
|
void |
groupStarted(ReportEvent event)
Receives notification that a group has started.
|
boolean |
isIgnoreNullValues() |
void |
itemsAdvanced(ReportEvent event)
Receives notification that a row of data is being processed.
|
void |
reportInitialized(ReportEvent event)
Receives notification that report generation initializes the current run.
|
void |
setCrosstabFilterGroup(String crosstabFilterGroup) |
void |
setField(String field)
Sets the field name for the function.
|
void |
setGroup(String name)
Sets the group name.
|
void |
setIgnoreNullValues(boolean ignoreNullValues) |
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 boolean isIgnoreNullValues()
public void setIgnoreNullValues(boolean ignoreNullValues)
public String getGroup()
getGroup
in interface AggregationFunction
public void setGroup(String name)
If a group is defined, the running total is reset to zero at the start of every instance of this group.
setGroup
in interface AggregationFunction
name
- the group name (null permitted).public String getField()
getField
in interface FieldAggregationFunction
public void setField(String field)
setField
in interface FieldAggregationFunction
field
- the field name.public void reportInitialized(ReportEvent event)
The event carries a ReportState.Started state. Use this to initialize the report.
reportInitialized
in interface ReportListener
reportInitialized
in class AbstractFunction
event
- The event.public void groupStarted(ReportEvent event)
groupStarted
in interface ReportListener
groupStarted
in class AbstractFunction
event
- the event.public void itemsAdvanced(ReportEvent event)
itemsAdvanced
in interface ReportListener
itemsAdvanced
in class AbstractFunction
event
- the event.public Object getValue()
getValue
in interface Expression
public void summaryRowSelection(ReportEvent event)
AbstractFunction
summaryRowSelection
in interface ReportListener
summaryRowSelection
in class AbstractFunction
event
- The report event.public Expression getInstance()
getInstance
in interface Expression
getInstance
in class AbstractExpression
public Object clone() throws CloneNotSupportedException
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
CloneNotSupportedException
- this should never happen.public String getCrosstabFilterGroup()
getCrosstabFilterGroup
in interface AggregationFunction
public void setCrosstabFilterGroup(String crosstabFilterGroup)
setCrosstabFilterGroup
in interface AggregationFunction