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.ejb.query;
12:
13: /**
14: * collection_member_expression.
15: */
16: public class MemberCompNode extends Node {
17:
18: private Node arg;
19: private boolean not;
20: private PathNode path;
21:
22: public MemberCompNode(Node arg, boolean not, PathNode path) {
23: this .arg = arg;
24: this .not = not;
25: this .path = path;
26: }
27:
28: public Node getArg() {
29: return arg;
30: }
31:
32: public boolean isNot() {
33: return not;
34: }
35:
36: public PathNode getPath() {
37: return path;
38: }
39:
40: public Object arrive(NodeVisitor v, Object msg) {
41: return v.arriveMemberCompNode(this , msg);
42: }
43:
44: public String toStringImp() {
45: StringBuffer s = new StringBuffer();
46: s.append(arg);
47: s.append(not ? " NOT MEMBER OF " : " MEMBER OF ");
48: s.append(path);
49: return s.toString();
50: }
51:
52: public void resolve(ResolveContext rc) {
53: arg.resolve(rc);
54: path.resolve(rc);
55: }
56:
57: }
|