org.mmbase.storage.search
Interface Step

All Known Subinterfaces:
RelationStep
All Known Implementing Classes:
BasicRelationStep, BasicStep

public interface Step

A step refers to a table in a search request. Several steps may refer to the same table, therefore each step has an unique alias to identify it.

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

Since:
MMBase-1.7
Version:
$Id: Step.java 41989 2010-04-20 16:45:39Z michiel $
Author:
Rob van Maris

Method Summary
 Step addNode(int nodeNumber)
          Adds node to nodes.
 boolean equals(Object obj)
          Compares this step to the specified object.
 String getAlias()
          Gets the alias associated with this step.
 SortedSet<Integer> getNodes()
          Gets nodenumbers for nodes that must be included in this step.
 String getTableName()
          Gets the name of the table referred to by this step.
 int hashCode()
           
 void setUnmodifiable()
           
 String toString()
          Returns a string representation of this Step.
 

Method Detail

getTableName

String getTableName()
Gets the name of the table referred to by this step.

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


getAlias

String getAlias()
Gets the alias associated with this step.

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


getNodes

SortedSet<Integer> getNodes()
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.


addNode

Step addNode(int nodeNumber)
Adds node to nodes.

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

equals

boolean equals(Object obj)
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.

Overrides:
equals in class Object
Parameters:
obj - The object to compare with.
Returns:
true if the objects are equal, false otherwise.
See Also:
RelationStep.equals(java.lang.Object)

hashCode

int hashCode()
Overrides:
hashCode in class Object

toString

String toString()
Returns a string representation of this Step. The string representation has the form "Step(tablename:<tablename>, alias:<alias>, nodes:<nodes>)" where

Overrides:
toString in class Object
Returns:
A string representation of this Step.

setUnmodifiable

void setUnmodifiable()
Since:
MMBase-1.9.2


MMBase 2.0-SNAPSHOT - null