org.mmbase.storage.search.implementation
Class BasicStep

java.lang.Object
  extended byorg.mmbase.storage.search.implementation.BasicStep
All Implemented Interfaces:
Step
Direct Known Subclasses:
BasicRelationStep

public class BasicStep
extends java.lang.Object
implements Step

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

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

Method Summary
 BasicStep addNode(int nodeNumber)
          Adds node to nodes.
 boolean equals(java.lang.Object obj)
          Compares this step to the specified object.
 java.lang.String getAlias()
          Gets the alias associated with this step.
 MMObjectBuilder getBuilder()
          Gets the associated builder.
 java.util.SortedSet getNodes()
          Gets nodenumbers for nodes that must be included in this step.
 java.lang.String getTableName()
          Gets the name of the table referred to by this step.
 int hashCode()
           
 BasicStep setAlias(java.lang.String alias)
          Sets alias property.
 java.lang.String toString()
          Returns a string representation of this Step.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

setAlias

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

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

addNode

public BasicStep addNode(int nodeNumber)
Adds node to nodes.

Parameters:
nodeNumber - The nodenumber of the node.
Returns:
This BasicStep instance.
Throws:
java.lang.IllegalArgumentException - when an invalid argument is supplied.

getBuilder

public MMObjectBuilder getBuilder()
Gets the associated builder.

Returns:
The builder.

getTableName

public java.lang.String getTableName()
Description copied from interface: Step
Gets the name of the table referred to by this step.

This corresponds to a table name in SQL SELECT-syntax.

Specified by:
getTableName in interface Step

getAlias

public java.lang.String getAlias()
Description copied from interface: Step
Gets the alias associated with this step.

This corresponds to a table alias in SQL SELECT-syntax.

Specified by:
getAlias in interface Step

getNodes

public java.util.SortedSet getNodes()
Description copied from interface: Step
Gets nodenumbers for nodes that must be included in this step. A null value indicates that no such constraint is applied.

This corresponds to a "number IN (....)" constraint in SQL SELECT syntax.

Note that this can also be achieved by using a FieldValueInConstraint on the "number" field.

Specified by:
getNodes in interface Step

equals

public boolean equals(java.lang.Object obj)
Description copied from interface: Step
Compares this step to the specified object. The result is true if and only if the argument is a non-null Step, but not RelationStep, object associated with the same tablename, using the same alias and including the same nodes.

Specified by:
equals in interface Step

hashCode

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

toString

public java.lang.String toString()
Description copied from interface: Step
Returns a string representation of this Step. The string representation has the form "Step(tablename:<tablename>, alias:<alias>, nodes:<nodes>)" where

Specified by:
toString in interface Step


MMBase build 1.7.1.20041002