org.mmbase.storage.search.implementation
Class BasicAggregatedField

java.lang.Object
  extended by org.mmbase.storage.search.implementation.BasicStepField
      extended by org.mmbase.storage.search.implementation.BasicAggregatedField
All Implemented Interfaces:
Serializable, AggregatedField, StepField, SizeMeasurable

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 41982 2010-04-20 14:05:14Z michiel $
Author:
Rob van Maris
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.mmbase.storage.search.implementation.BasicStepField
modifiable
 
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, Field fieldDefs, int aggregationType)
           
 
Method Summary
 boolean equals(Object obj)
          Compares this stepfield 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 StepField.
 
Methods inherited from class org.mmbase.storage.search.implementation.BasicStepField
compareSteps, equalFieldValues, getAlias, getByteSize, getByteSize, getField, getFieldName, getFieldName, getStep, getType, setAlias, setUnmodifiable, testValue
 
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, setUnmodifiable
 

Constructor Detail

BasicAggregatedField

public BasicAggregatedField(Step step,
                            Field fieldDefs,
                            int aggregationType)
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: StepField
Compares this stepfield to the specified object. The result is true if and only if the argument is a non-null StepField object associated with the same field, using the same alias.

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

hashCode

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

toString

public String toString()
Description copied from interface: StepField
Returns a string representation of this StepField. The string representation has the form "StepField(step:<step>, fieldname:<fieldname>, alias:<alias>)" where

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


MMBase 2.0-SNAPSHOT - null