|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.pentaho.reporting.engine.classic.core.function.AbstractExpression
org.pentaho.reporting.engine.classic.core.function.AbstractFunction
org.pentaho.reporting.engine.classic.core.function.CountDistinctFunction
public class CountDistinctFunction
Counts the distinct occurences of an certain value of an column. This functionality is similiar to the SQL distinct() function.
Constructor Summary | |
---|---|
CountDistinctFunction()
DefaultConstructor. |
Method Summary | |
---|---|
Object |
clone()
Clones the expression. |
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. |
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 |
setField(String field)
Sets the field name for the function. |
void |
setGroup(String name)
Sets the group name. |
Methods inherited from class org.pentaho.reporting.engine.classic.core.function.AbstractFunction |
---|
groupFinished, itemsFinished, itemsStarted, reportDone, reportFinished, reportStarted |
Methods inherited from class org.pentaho.reporting.engine.classic.core.function.AbstractExpression |
---|
getDataRow, getDependencyLevel, getName, getReportConfiguration, getResourceBundleFactory, getRuntime, isActive, isDeepTraversing, isPreserve, setActive, setDependencyLevel, setName, setPreserve, setRuntime |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.pentaho.reporting.engine.classic.core.event.ReportListener |
---|
groupFinished, itemsFinished, itemsStarted, reportDone, reportFinished, reportStarted |
Methods inherited from interface org.pentaho.reporting.engine.classic.core.function.Expression |
---|
getDataRow, getDependencyLevel, getName, getReportConfiguration, getResourceBundleFactory, getRuntime, isActive, isDeepTraversing, isPreserve, setDependencyLevel, setName, setRuntime |
Constructor Detail |
---|
public CountDistinctFunction()
Method Detail |
---|
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 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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |