|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jfree.report.function.AbstractFunction
org.jfree.report.function.CountDistinctFunction
Counts the distinct occurences of an certain value of an column. This functionality is similiar to the SQL distinct() function.
| 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 | |
CountDistinctFunction()
DefaultConstructor. |
|
| Method Summary | |
java.lang.String |
getField()
Returns the field used by the function. |
java.lang.String |
getGroup()
Returns the group name. |
java.lang.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(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, getInstance, getName, getProperties, getProperty, getProperty, groupFinished, initialize, 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 |
public static final java.lang.String GROUP_PROPERTY
public static final java.lang.String FIELD_PROPERTY
| Constructor Detail |
public CountDistinctFunction()
| Method Detail |
public java.lang.String getGroup()
public void setGroup(java.lang.String name)
If a group is defined, the running total is reset to zero at the start of every instance of this group.
name - the group name (null permitted).public java.lang.String getField()
The field name corresponds to a column name in the report's TableModel.
public void setField(java.lang.String field)
The field name corresponds to a column name in the report's TableModel.
field - the field name (null not permitted).public void reportInitialized(ReportEvent event)
The event carries a ReportState.Started state. Use this to initialize the report.
reportInitialized in interface ReportListenerreportInitialized in class AbstractFunctionevent - The event.public void groupStarted(ReportEvent event)
groupStarted in interface ReportListenergroupStarted in class AbstractFunctionevent - the event.public void itemsAdvanced(ReportEvent event)
itemsAdvanced in interface ReportListeneritemsAdvanced in class AbstractFunctionevent - the event.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 | |||||||||