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 String
alias
protected int
type
protected SQLValueIF
value
-
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 String
getAlias()
INTERNAL: The column alias to use if this value is included in the projection.SQLAggregateIF
getReference()
INTERNAL: Returns the referenced aggregate if one exists.int
getType()
INTERNAL: Returns the aggregate function type indicated by one of the constants in theSQLAggregateIF
interface.SQLValueIF
getValue()
INTERNAL: Returns the SQLValueIF that the aggregate function is to be evaluated against.boolean
isReference()
INTERNAL: Returns true if this aggregate is a reference to another.void
setAlias(String alias)
INTERNAL: Sets the column alias.void
setValue(SQLValueIF value)
INTERNAL: Sets the SQLValueIF that the aggregate function is to be evaluated against.String
toString()
-
-
-
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:SQLAggregateIF
INTERNAL: Returns the aggregate function type indicated by one of the constants in theSQLAggregateIF
interface.- Specified by:
getType
in interfaceSQLAggregateIF
-
getValue
public SQLValueIF getValue()
Description copied from interface:SQLAggregateIF
INTERNAL: Returns the SQLValueIF that the aggregate function is to be evaluated against.- Specified by:
getValue
in interfaceSQLAggregateIF
-
setValue
public void setValue(SQLValueIF value)
Description copied from interface:SQLAggregateIF
INTERNAL: Sets the SQLValueIF that the aggregate function is to be evaluated against.- Specified by:
setValue
in interfaceSQLAggregateIF
-
getAlias
public String getAlias()
Description copied from interface:SQLAggregateIF
INTERNAL: 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:
getAlias
in interfaceSQLAggregateIF
-
setAlias
public void setAlias(String alias)
Description copied from interface:SQLAggregateIF
INTERNAL: Sets the column alias.- Specified by:
setAlias
in interfaceSQLAggregateIF
-
isReference
public boolean isReference()
Description copied from interface:SQLAggregateIF
INTERNAL: Returns true if this aggregate is a reference to another.- Specified by:
isReference
in interfaceSQLAggregateIF
-
getReference
public SQLAggregateIF getReference()
Description copied from interface:SQLAggregateIF
INTERNAL: Returns the referenced aggregate if one exists.- Specified by:
getReference
in interfaceSQLAggregateIF
-
-