public class DistinctCountSQLValue extends java.lang.Object implements GroupingSQLValue<DistinctCount>
SQLValue that generates an DistinctCount
This is intended to be used in group by queries in conjunction with
a group-by clause on the nested GroupingSQLValue.
The SQL fragment is therefore the same as the nested value
but the result in wrapped in a DistinctCount| Constructor and Description |
|---|
DistinctCountSQLValue(GroupingSQLValue value) |
| Modifier and Type | Method and Description |
|---|---|
int |
add(java.lang.StringBuilder sb,
boolean qualify)
Add the expression to a StringBuilder
|
int |
addGroup(java.lang.StringBuilder sb,
boolean qualify)
Add the group-by clause to a query.
|
boolean |
checkContentsCanGroup()
return false if this instance is not able to perform grouping.
|
java.util.List<PatternArgument> |
getGroupParameters(java.util.List<PatternArgument> list)
Get the parameters for a group-by clause.
|
java.util.List<PatternArgument> |
getParameters(java.util.List<PatternArgument> list)
Add parameters for this value to a list.
|
SQLFilter |
getRequiredFilter()
Get an SQLFilter required to be added to the filter set.
|
java.lang.Class<DistinctCount> |
getTarget()
Get the type of the returned object as far as it is known.
|
DistinctCount |
makeObject(java.sql.ResultSet rs,
int pos)
Extract a result of the expression from a ResultSet into an object of the specified type.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgroupingIsomorphicpublic DistinctCountSQLValue(GroupingSQLValue value)
public java.lang.Class<DistinctCount> getTarget()
TargettedgetTarget in interface Targetted<DistinctCount>public int add(java.lang.StringBuilder sb,
boolean qualify)
SQLValueadd in interface SQLValue<DistinctCount>sb - StringBuilder to modifyqualify - boolean should fields be qualified with the table namepublic java.util.List<PatternArgument> getParameters(java.util.List<PatternArgument> list)
SQLValuegetParameters in interface SQLValue<DistinctCount>list - to modifypublic DistinctCount makeObject(java.sql.ResultSet rs, int pos) throws DataException, java.sql.SQLException
SQLValuemakeObject in interface SQLValue<DistinctCount>rs - ResultSetDataExceptionjava.sql.SQLExceptionpublic SQLFilter getRequiredFilter()
SQLValuegetRequiredFilter in interface SQLValue<DistinctCount>public int addGroup(java.lang.StringBuilder sb,
boolean qualify)
GroupingSQLValueaddGroup in interface GroupingSQLValue<DistinctCount>public java.util.List<PatternArgument> getGroupParameters(java.util.List<PatternArgument> list)
GroupingSQLValuegetGroupParameters in interface GroupingSQLValue<DistinctCount>public boolean checkContentsCanGroup()
GroupingSQLValuecheckContentsCanGroup in interface GroupingSQLValue<DistinctCount>