KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > mmbase > storage > search > Step


1 /*
2
3 This software is OSI Certified Open Source Software.
4 OSI Certified is a certification mark of the Open Source Initiative.
5
6 The license (Mozilla version 1.0) can be read at the MMBase site.
7 See http://www.MMBase.org/license
8
9 */

10 package org.mmbase.storage.search;
11
12 import java.util.*;
13
14 /**
15  * 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.
16  * <p>
17  * This corresponds to a table name and alias in SQL SELECT-syntax.
18  *
19  * @author Rob van Maris
20  * @version $Id: Step.java,v 1.2 2003/03/10 11:50:51 pierre Exp $
21  * @since MMBase-1.7
22  */

23 public interface Step {
24     /**
25      * Gets the name of the table referred to by this step.
26      * <p>
27      * This corresponds to a table name in SQL SELECT-syntax.
28      */

29     String JavaDoc getTableName();
30
31     /**
32      * Gets the alias associated with this step.
33      * <p>
34      * This corresponds to a table alias in SQL SELECT-syntax.
35      */

36     String JavaDoc getAlias();
37
38     /**
39      * Gets nodenumbers for nodes that must be included in this step.
40      * A null value indicates that no such constraint is applied.
41      * <p>
42      * This corresponds to a "number IN (....)" constraint in SQL SELECT syntax.
43      * <p>
44      * Note that this can also be achieved by using a FieldValueInConstraint on the "number" field.
45      */

46     SortedSet getNodes();
47
48     /**
49      * Compares this step to the specified object. The result is
50      * <code>true</code> if and only if the argument is a non-null
51      * Step, but not RelationStep, object associated with the same tablename,
52      * using the same alias and including the same nodes.
53      *
54      * @param obj The object to compare with.
55      * @return <code>true</code> if the objects are equal,
56      * <code>false</code> otherwise.
57      * @see RelationStep#equals
58      */

59     public boolean equals(Object JavaDoc obj);
60     
61     // javadoc is inherited
62
public int hashCode();
63     
64     /**
65      * Returns a string representation of this Step.
66      * The string representation has the form
67      * "Step(tablename:&lt;tablename&gt;, alias:&lt;alias&gt;, nodes:&lt;nodes&gt;)"
68      * where
69      * <ul>
70      * <li><em>&lt;tablename&gt;</em> is the tablename returnedby
71      * {@link #getTableName getTableName()}
72      * <li><em>&lt;alias&gt;</em> is the alias returned by {@link #getAlias getAlias()}
73      * <li><em>&lt;nodes&gt;</em> is the string representation of the ordered list
74      * of nodenumbers returned by {@link #getNodes getNodes()}
75      * </ul>
76      *
77      * @return A string representation of this Step.
78      */

79     public String JavaDoc toString();
80
81     /** @link dependency
82      * @clientRole **/

83     /*#SearchQuery lnkSearchQuery;*/
84 }
85
Popular Tags