01: /*
02: * Copyright (c) 1998 - 2005 Versant Corporation
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * Versant Corporation - initial API and implementation
10: */
11: package com.versant.core.jdo.query;
12:
13: import com.versant.core.common.CmdBitSet;
14:
15: /**
16: * This Node is added to the tree to bind 'unbound' variables to the extent
17: * of the variables class.
18: */
19: public class VarBindingNode extends LeafNode {
20:
21: private final VarNode var;
22:
23: public VarBindingNode(VarNode var) {
24: this .var = var;
25: }
26:
27: public VarNode getVar() {
28: return var;
29: }
30:
31: public String toString() {
32: return super .toString() + " " + var;
33: }
34:
35: public void updateEvictionDependency(CmdBitSet bitSet) {
36: var.updateEvictionDependency(bitSet);
37: }
38:
39: public Object accept(NodeVisitor visitor, Object[] results) {
40: return visitor.visitVarBindingNode(this , results);
41: }
42:
43: public Object arrive(NodeVisitor v, Object msg) {
44: return v.arriveVarBindingNode(this, msg);
45: }
46:
47: }
|