org.mmbase.storage.search.implementation
Class BasicStepField

java.lang.Object
  extended byorg.mmbase.storage.search.implementation.BasicStepField
All Implemented Interfaces:
StepField
Direct Known Subclasses:
BasicAggregatedField

public class BasicStepField
extends java.lang.Object
implements StepField

Basic implementation. The field alias is not set on default.

Since:
MMBase-1.7
Version:
$Id: BasicStepField.java,v 1.9 2004/03/15 14:54:26 robmaris Exp $
Author:
Rob van Maris

Constructor Summary
BasicStepField(Step step, FieldDefs fieldDefs)
          Constructor.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Compares this stepfield to the specified object.
 java.lang.String getAlias()
          Gets the alias for the associated field.
 FieldDefs getFieldDefs()
          Gets the associated fieldDefs.
 java.lang.String getFieldName()
          Gets the name of the associated field (without prefix).
 Step getStep()
          Gets the step associated with this fieldstep.
 int getType()
          Gets the type of the associated field.
 int hashCode()
           
 BasicStepField setAlias(java.lang.String alias)
          Sets alias property.
 java.lang.String toString()
          Returns a string representation of this StepField.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BasicStepField

public BasicStepField(Step step,
                      FieldDefs fieldDefs)
Constructor.

Parameters:
step - The associated step.
fieldDefs - The associated fieldDefs.
Throws:
java.lang.IllegalArgumentException - when an invalid argument is supplied.
Method Detail

setAlias

public BasicStepField setAlias(java.lang.String alias)
Sets alias property.

Parameters:
alias - The alias property.
Returns:
This BasicStepField instance.
Throws:
java.lang.IllegalArgumentException - when an invalid argument is supplied.

getFieldDefs

public FieldDefs getFieldDefs()
Gets the associated fieldDefs.

Returns:
The fieldDefs.

getFieldName

public java.lang.String getFieldName()
Description copied from interface: StepField
Gets the name of the associated field (without prefix).

This corresponds to the fieldname in SQL SELECT-syntax.

Specified by:
getFieldName in interface StepField

getAlias

public java.lang.String getAlias()
Description copied from interface: StepField
Gets the alias for the associated field.

This corresponds to the field alias in SQL SELECT-syntax.

Specified by:
getAlias in interface StepField

getStep

public Step getStep()
Description copied from interface: StepField
Gets the step associated with this fieldstep.

Specified by:
getStep in interface StepField

getType

public int getType()
Description copied from interface: StepField
Gets the type of the associated field. This is one of the values defined in FieldDefs.

Specified by:
getType in interface StepField

equals

public boolean equals(java.lang.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 StepField

hashCode

public int hashCode()
Specified by:
hashCode in interface StepField

toString

public java.lang.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 StepField


MMBase build 1.7.1.20041002