org.mmbase.storage.search.implementation
Class BasicAggregatedField
java.lang.Object
org.mmbase.storage.search.implementation.BasicStepField
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
| Methods inherited from class org.mmbase.storage.search.implementation.BasicStepField |
compareSteps, equalFieldValues, getAlias, getByteSize, getByteSize, getField, getFieldName, getFieldName, getStep, getType, setAlias, setUnmodifiable, testValue |
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.
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
- <step> is the step alias returned by
getStep().getAlias() or,
when the step alias is null, the step tablename
returned by getStep().getTableName().
- <fieldname> is the fieldname returned by
getFieldName()
- <alias> is the alias returned by
getAlias()
- 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