|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.openjpa.jdbc.kernel.exps.AbstractVal
org.apache.openjpa.jdbc.kernel.exps.UnaryOp
org.apache.openjpa.jdbc.kernel.exps.Count
class Count
Count non-null values.
| Field Summary |
|---|
| Fields inherited from class org.apache.openjpa.jdbc.kernel.exps.AbstractVal |
|---|
FALSE, TRUE |
| Fields inherited from interface org.apache.openjpa.jdbc.kernel.exps.Val |
|---|
ABS_VAL, ARGS_VAL, CMP_EQUAL, COALESCE_VAL, CONCAT_VAL, FORCE_OUTER, GENERALCASE_VAL, INDEXOF_VAL, JOIN_REL, LENGTH_VAL, LOCATE_VAL, LOWER_VAL, MATH_VAL, NULL_CMP, NULLIF_VAL, SIMPLECASE_VAL, SQRT_VAL, SUBSTRING_VAL, TRIM_VAL, UPPER_VAL, VAL, WHENCONDITION_VAL, WHENSCALAR_VAL |
| Constructor Summary | |
|---|---|
Count(Val val)
Constructor. |
|
| Method Summary | |
|---|---|
void |
appendTo(Select sel,
ExpContext ctx,
ExpState state,
SQLBuffer sql,
int index)
Overrides SQL formation by replacing COUNT(column) by COUNT(*) when specific conditions are met and DBDictionary configuration useWildCardForCount is set. |
protected String |
getOperator()
Return the name of this operator. |
protected Class |
getType(Class c)
Return the type of this value based on the argument type. |
ExpState |
initialize(Select sel,
ExpContext ctx,
int flags)
Initialize the value. |
boolean |
isAggregate()
Return true if this value is an aggregate. |
boolean |
isCountDistinctMultiCols()
|
| Methods inherited from class org.apache.openjpa.jdbc.kernel.exps.UnaryOp |
|---|
acceptVisit, calculateValue, getMetaData, getNoParen, getType, getValue, groupBy, initializeValue, length, load, orderBy, select, selectColumns, setImplicitType, setMetaData |
| Methods inherited from class org.apache.openjpa.jdbc.kernel.exps.AbstractVal |
|---|
appendIndex, appendIsEmpty, appendIsNotEmpty, appendIsNotNull, appendIsNull, appendSize, appendType, getAlias, getId, getName, getPath, getSelectAs, isVariable, isXPath, setAlias, toDataStoreValue |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Count(Val val)
| Method Detail |
|---|
public ExpState initialize(Select sel,
ExpContext ctx,
int flags)
Val
initialize in interface Valinitialize in class UnaryOpprotected Class getType(Class c)
UnaryOp
getType in class UnaryOpprotected String getOperator()
UnaryOp
getOperator in class UnaryOppublic boolean isAggregate()
Value
isAggregate in interface ValueisAggregate in class AbstractValpublic boolean isCountDistinctMultiCols()
public void appendTo(Select sel,
ExpContext ctx,
ExpState state,
SQLBuffer sql,
int index)
useWildCardForCount is set.
appendTo in interface ValappendTo in class UnaryOp
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||