KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > hibernate > hql > ast > tree > AbstractStatement


1 // $Id: AbstractStatement.java,v 1.2 2005/07/15 04:39:40 oneovthafew Exp $
2
package org.hibernate.hql.ast.tree;
3
4 import java.util.Iterator JavaDoc;
5
6 /**
7  * Convenience implementation of Statement to centralize common functionality.
8  *
9  * @author Steve Ebersole
10  */

11 public abstract class AbstractStatement extends HqlSqlWalkerNode implements DisplayableNode, Statement {
12
13     /**
14      * Returns additional display text for the AST node.
15      *
16      * @return String - The additional display text.
17      */

18     public String JavaDoc getDisplayText() {
19         StringBuffer JavaDoc buf = new StringBuffer JavaDoc();
20         if ( getWalker().getQuerySpaces().size() > 0 ) {
21             buf.append( " querySpaces (" );
22             for ( Iterator JavaDoc iterator = getWalker().getQuerySpaces().iterator(); iterator.hasNext(); ) {
23                 buf.append( iterator.next() );
24                 if ( iterator.hasNext() ) {
25                     buf.append( "," );
26                 }
27             }
28             buf.append( ")" );
29         }
30         return buf.toString();
31     }
32 }
33
Popular Tags