KickJava   Java API By Example, From Geeks To Geeks.

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


1 // $Id: SqlNode.java,v 1.1 2005/07/12 20:27:17 steveebersole Exp $
2
package org.hibernate.hql.ast.tree;
3
4 import org.hibernate.type.Type;
5
6 /**
7  * A base AST node for the intermediate tree.
8  * User: josh
9  * Date: Dec 6, 2003
10  * Time: 10:29:14 AM
11  */

12 public class SqlNode extends antlr.CommonAST {
13     /**
14      * The original text for the node, mostly for debugging.
15      */

16     private String JavaDoc originalText;
17     /**
18      * The data type of this node. Null for 'no type'.
19      */

20     private Type dataType;
21
22     public void setText(String JavaDoc s) {
23         super.setText( s );
24         if ( s != null && s.length() > 0 && originalText == null ) {
25             originalText = s;
26         }
27     }
28
29     public String JavaDoc getOriginalText() {
30         return originalText;
31     }
32
33     public Type getDataType() {
34         return dataType;
35     }
36
37     public void setDataType(Type dataType) {
38         this.dataType = dataType;
39     }
40
41 }
42
Popular Tags