KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > ojb > jdo > jdoql > QueryTreeNode


1 package org.apache.ojb.jdo.jdoql;
2
3 /* Copyright 2003-2005 The Apache Software Foundation
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */

17
18 /**
19  * Base class for nodes of the query trees.
20  *
21  * @author <a HREF="mailto:tomdz@apache.org">Thomas Dudziak</a>
22  */

23 public abstract class QueryTreeNode implements Acceptor
24 {
25     /** The line where the source of this node started. */
26     private int _line = 0;
27     /** The column where the source of this node started. */
28     private int _column = 0;
29
30     /**
31      * Sets the position of this node in the source.
32      *
33      * @param line The line
34      * @param column The column
35      */

36     public void setPosition(int line, int column)
37     {
38         _line = line;
39         _column = column;
40     }
41     
42     /**
43      * Returns the column where the source of this node started.
44      *
45      * @return The column
46      */

47     public int getColumn()
48     {
49         return _column;
50     }
51
52     /**
53      * Returns the line where the source of this node started.
54      *
55      * @return The line
56      */

57     public int getLine()
58     {
59         return _line;
60     }
61 }
62
Popular Tags