KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > versant > core > ejb > query > CollectionMemberNode


1
2 /*
3  * Copyright (c) 1998 - 2005 Versant Corporation
4  * All rights reserved. This program and the accompanying materials
5  * are made available under the terms of the Eclipse Public License v1.0
6  * which accompanies this distribution, and is available at
7  * http://www.eclipse.org/legal/epl-v10.html
8  *
9  * Contributors:
10  * Versant Corporation - initial API and implementation
11  */

12 package com.versant.core.ejb.query;
13
14 /**
15  * A collection_member_declaration.
16  */

17 public class CollectionMemberNode extends Node {
18
19     private PathNode path;
20     private String JavaDoc identifier;
21
22     public CollectionMemberNode(PathNode path, String JavaDoc identifier) {
23         this.path = path;
24         this.identifier = identifier;
25     }
26
27     public PathNode getPath() {
28         return path;
29     }
30
31     public String JavaDoc getIdentifier() {
32         return identifier;
33     }
34
35     public Object JavaDoc arrive(NodeVisitor v, Object JavaDoc msg) {
36         return v.arriveCollectionMemberNode(this, msg);
37     }
38
39     public String JavaDoc toStringImp() {
40         StringBuffer JavaDoc s = new StringBuffer JavaDoc();
41         s.append("IN (");
42         s.append(path);
43         s.append(") AS ");
44         s.append(identifier);
45         return s.toString();
46     }
47
48     public void resolve(ResolveContext rc) {
49         path.resolve(rc);
50     }
51
52 }
53
54
Popular Tags