org.mmbase.storage.search
Interface AggregatedField

All Superinterfaces:
StepField
All Known Implementing Classes:
BasicAggregatedField

public interface AggregatedField
extends StepField

A field in an aggregated query.

Each field in a aggregated query has an aggregation type, which is one of the values listed below. This corresponds to an aggregated field in SQL SELECT-syntax.

Since:
MMBase-1.7
Version:
$Id: AggregatedField.java,v 1.3 2003/03/10 11:50:42 pierre Exp $
Author:
Rob van Maris

Field Summary
static int AGGREGATION_TYPE_COUNT
          Aggregation type, resulting in count of non-null values in this field.
static int AGGREGATION_TYPE_COUNT_DISTINCT
          Aggregation type, resulting in count of distinct non-null values in this field.
static int AGGREGATION_TYPE_GROUP_BY
          Aggregation type, resulting in grouping the results on non-null values of this field.
static int AGGREGATION_TYPE_MAX
          Aggregation type, resulting in maximum value in this field.
static int AGGREGATION_TYPE_MIN
          Aggregation type, resulting in minimum value in this field.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Compares this aggregated field to the specified object.
 int getAggregationType()
          Gets the aggregation type.
 java.lang.String toString()
          Returns a string representation of this AggregatedField.
 
Methods inherited from interface org.mmbase.storage.search.StepField
getAlias, getFieldName, getStep, getType, hashCode
 

Field Detail

AGGREGATION_TYPE_GROUP_BY

public static final int AGGREGATION_TYPE_GROUP_BY
Aggregation type, resulting in grouping the results on non-null values of this field.

See Also:
Constant Field Values

AGGREGATION_TYPE_COUNT

public static final int AGGREGATION_TYPE_COUNT
Aggregation type, resulting in count of non-null values in this field.

See Also:
Constant Field Values

AGGREGATION_TYPE_COUNT_DISTINCT

public static final int AGGREGATION_TYPE_COUNT_DISTINCT
Aggregation type, resulting in count of distinct non-null values in this field.

See Also:
Constant Field Values

AGGREGATION_TYPE_MIN

public static final int AGGREGATION_TYPE_MIN
Aggregation type, resulting in minimum value in this field.

See Also:
Constant Field Values

AGGREGATION_TYPE_MAX

public static final int AGGREGATION_TYPE_MAX
Aggregation type, resulting in maximum value in this field.

See Also:
Constant Field Values
Method Detail

getAggregationType

public int getAggregationType()
Gets the aggregation type.


equals

public boolean equals(java.lang.Object obj)
Compares this aggregated field to the specified object. The result is true if and only if the argument is a non-null AggregatedField object associated with the same field, using the same alias, and having the same aggregation type.

Specified by:
equals in interface StepField
Parameters:
obj - The object to compare with.
Returns:
true if the objects are equal, false otherwise.

toString

public java.lang.String toString()
Returns a string representation of this AggregatedField. The string representation has the form "AggregatedField(step:<step>, fieldname:<fieldname>, alias:<alias>, aggregationtype:<aggregationtype>)" where

Specified by:
toString in interface StepField
Returns:
A string representation of this AggregatedField.


MMBase build 1.7.1.20041002