Class SQLAggregate
- java.lang.Object
-
- net.ontopia.persistence.query.sql.SQLAggregate
-
- All Implemented Interfaces:
SQLAggregateIF
public class SQLAggregate extends Object implements SQLAggregateIF
INTERNAL: Represents an aggregate function in a SQL query.
-
-
Field Summary
Fields Modifier and Type Field Description protected Stringaliasprotected inttypeprotected SQLValueIFvalue-
Fields inherited from interface net.ontopia.persistence.query.sql.SQLAggregateIF
COUNT
-
-
Constructor Summary
Constructors Constructor Description SQLAggregate(SQLValueIF value, int type)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetAlias()INTERNAL: The column alias to use if this value is included in the projection.SQLAggregateIFgetReference()INTERNAL: Returns the referenced aggregate if one exists.intgetType()INTERNAL: Returns the aggregate function type indicated by one of the constants in theSQLAggregateIFinterface.SQLValueIFgetValue()INTERNAL: Returns the SQLValueIF that the aggregate function is to be evaluated against.booleanisReference()INTERNAL: Returns true if this aggregate is a reference to another.voidsetAlias(String alias)INTERNAL: Sets the column alias.voidsetValue(SQLValueIF value)INTERNAL: Sets the SQLValueIF that the aggregate function is to be evaluated against.StringtoString()
-
-
-
Field Detail
-
type
protected int type
-
value
protected SQLValueIF value
-
alias
protected String alias
-
-
Constructor Detail
-
SQLAggregate
public SQLAggregate(SQLValueIF value, int type)
-
-
Method Detail
-
getType
public int getType()
Description copied from interface:SQLAggregateIFINTERNAL: Returns the aggregate function type indicated by one of the constants in theSQLAggregateIFinterface.- Specified by:
getTypein interfaceSQLAggregateIF
-
getValue
public SQLValueIF getValue()
Description copied from interface:SQLAggregateIFINTERNAL: Returns the SQLValueIF that the aggregate function is to be evaluated against.- Specified by:
getValuein interfaceSQLAggregateIF
-
setValue
public void setValue(SQLValueIF value)
Description copied from interface:SQLAggregateIFINTERNAL: Sets the SQLValueIF that the aggregate function is to be evaluated against.- Specified by:
setValuein interfaceSQLAggregateIF
-
getAlias
public String getAlias()
Description copied from interface:SQLAggregateIFINTERNAL: The column alias to use if this value is included in the projection. The SQL select syntax is typically like "select value asfrom foo". - Specified by:
getAliasin interfaceSQLAggregateIF
-
setAlias
public void setAlias(String alias)
Description copied from interface:SQLAggregateIFINTERNAL: Sets the column alias.- Specified by:
setAliasin interfaceSQLAggregateIF
-
isReference
public boolean isReference()
Description copied from interface:SQLAggregateIFINTERNAL: Returns true if this aggregate is a reference to another.- Specified by:
isReferencein interfaceSQLAggregateIF
-
getReference
public SQLAggregateIF getReference()
Description copied from interface:SQLAggregateIFINTERNAL: Returns the referenced aggregate if one exists.- Specified by:
getReferencein interfaceSQLAggregateIF
-
-