net.ontopia.persistence.query.sql
Class SQLAggregate

java.lang.Object
  extended by net.ontopia.persistence.query.sql.SQLAggregate
All Implemented Interfaces:
SQLAggregateIF

public class SQLAggregate
extends java.lang.Object
implements SQLAggregateIF

INTERNAL: Represents an aggregate function in a SQL query.


Field Summary
protected  java.lang.String alias
           
protected  int type
           
protected  SQLValueIF value
           
 
Fields inherited from interface net.ontopia.persistence.query.sql.SQLAggregateIF
COUNT
 
Constructor Summary
SQLAggregate(SQLValueIF value, int type)
           
 
Method Summary
 java.lang.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 the SQLAggregateIF 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(java.lang.String alias)
          INTERNAL: Sets the column alias.
 void setValue(SQLValueIF value)
          INTERNAL: Sets the SQLValueIF that the aggregate function is to be evaluated against.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

type

protected int type

value

protected SQLValueIF value

alias

protected java.lang.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 the SQLAggregateIF interface.

Specified by:
getType in interface SQLAggregateIF

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 interface SQLAggregateIF

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 interface SQLAggregateIF

getAlias

public java.lang.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 as from foo".

Specified by:
getAlias in interface SQLAggregateIF

setAlias

public void setAlias(java.lang.String alias)
Description copied from interface: SQLAggregateIF
INTERNAL: Sets the column alias.

Specified by:
setAlias in interface SQLAggregateIF

isReference

public boolean isReference()
Description copied from interface: SQLAggregateIF
INTERNAL: Returns true if this aggregate is a reference to another.

Specified by:
isReference in interface SQLAggregateIF

getReference

public SQLAggregateIF getReference()
Description copied from interface: SQLAggregateIF
INTERNAL: Returns the referenced aggregate if one exists.

Specified by:
getReference in interface SQLAggregateIF

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2000-2012 Ontopia.