org.mmbase.storage.search.implementation
Class BasicAggregatedField

java.lang.Object
  extended byorg.mmbase.storage.search.implementation.BasicStepField
      extended byorg.mmbase.storage.search.implementation.BasicAggregatedField
All Implemented Interfaces:
AggregatedField, StepField

public class BasicAggregatedField
extends BasicStepField
implements AggregatedField

Basic implementation. The step alias is equal to the field name, unless it is explicitly set.

Since:
MMBase-1.7
Version:
$Id: BasicAggregatedField.java,v 1.8 2005/05/10 22:58:58 michiel Exp $
Author:
Rob van Maris

Field Summary
 
Fields inherited from interface org.mmbase.storage.search.AggregatedField
AGGREGATION_TYPE_COUNT, AGGREGATION_TYPE_COUNT_DISTINCT, AGGREGATION_TYPE_DESCRIPTIONS, AGGREGATION_TYPE_GROUP_BY, AGGREGATION_TYPE_MAX, AGGREGATION_TYPE_MIN
 
Constructor Summary
BasicAggregatedField(Step step, CoreField fieldDefs, int aggregationType)
          Constructor.
 
Method Summary
 boolean equals(Object obj)
          Compares this aggregated field to the specified object.
 int getAggregationType()
          Gets the aggregation type.
 String getAggregationTypeDescription()
          Gets the aggregation type.
 int hashCode()
           
 BasicAggregatedField setAggregationType(int aggregationType)
          Sets the aggregation type.
 String toString()
          Returns a string representation of this AggregatedField.
 
Methods inherited from class org.mmbase.storage.search.implementation.BasicStepField
getAlias, getField, getFieldName, getFieldName, getStep, getType, setAlias
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.mmbase.storage.search.StepField
getAlias, getFieldName, getStep, getType
 

Constructor Detail

BasicAggregatedField

public BasicAggregatedField(Step step,
                            CoreField fieldDefs,
                            int aggregationType)
Constructor.

Parameters:
step - The associated step.
fieldDefs - The associated fieldDefs.
aggregationType - The aggregation type.
Throws:
IllegalArgumentException - when an invalid argument is supplied.
Method Detail

setAggregationType

public BasicAggregatedField setAggregationType(int aggregationType)
Sets the aggregation type.

Parameters:
aggregationType - The aggregation type.
Returns:
This BasicAggregatedField instance.
Throws:
IllegalArgumentException - when an invalid argument is supplied.

getAggregationType

public int getAggregationType()
Gets the aggregation type.

Specified by:
getAggregationType in interface AggregatedField

getAggregationTypeDescription

public String getAggregationTypeDescription()
Gets the aggregation type.


equals

public boolean equals(Object obj)
Description copied from interface: AggregatedField
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 AggregatedField
Overrides:
equals in class BasicStepField

hashCode

public int hashCode()
Specified by:
hashCode in interface StepField
Overrides:
hashCode in class BasicStepField

toString

public String toString()
Description copied from interface: AggregatedField
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 AggregatedField
Overrides:
toString in class BasicStepField


MMBase build 1.8.1.20060716