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: * A collection_member_declaration.
15: */
16: public class CollectionMemberNode extends Node {
17:
18: private PathNode path;
19: private String identifier;
20:
21: public CollectionMemberNode(PathNode path, String identifier) {
22: this .path = path;
23: this .identifier = identifier;
24: }
25:
26: public PathNode getPath() {
27: return path;
28: }
29:
30: public String getIdentifier() {
31: return identifier;
32: }
33:
34: public Object arrive(NodeVisitor v, Object msg) {
35: return v.arriveCollectionMemberNode(this , msg);
36: }
37:
38: public String toStringImp() {
39: StringBuffer s = new StringBuffer();
40: s.append("IN (");
41: s.append(path);
42: s.append(") AS ");
43: s.append(identifier);
44: return s.toString();
45: }
46:
47: public void resolve(ResolveContext rc) {
48: path.resolve(rc);
49: }
50:
51: }
|