01: package org.apache.ojb.jdo.jdoql;
02:
03: /* Copyright 2003-2005 The Apache Software Foundation
04: *
05: * Licensed under the Apache License, Version 2.0 (the "License");
06: * you may not use this file except in compliance with the License.
07: * You may obtain a copy of the License at
08: *
09: * 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: /** The line where the source of this node started. */
25: private int _line = 0;
26: /** The column where the source of this node started. */
27: private int _column = 0;
28:
29: /**
30: * Sets the position of this node in the source.
31: *
32: * @param line The line
33: * @param column The column
34: */
35: public void setPosition(int line, int column) {
36: _line = line;
37: _column = column;
38: }
39:
40: /**
41: * Returns the column where the source of this node started.
42: *
43: * @return The column
44: */
45: public int getColumn() {
46: return _column;
47: }
48:
49: /**
50: * Returns the line where the source of this node started.
51: *
52: * @return The line
53: */
54: public int getLine() {
55: return _line;
56: }
57: }
|