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: import com.versant.core.metadata.ClassMetaData;
14: import com.versant.core.common.CmdBitSet;
15:
16: /**
17: * Root of tree navigated through fields starting at a class.
18: */
19: public class NavRoot extends NavBase {
20:
21: private IdentificationVarNode node;
22: private ClassMetaData cmd; // the class starting this navigation
23:
24: public NavRoot(IdentificationVarNode node, ClassMetaData cmd) {
25: this .node = node;
26: this .cmd = cmd;
27: }
28:
29: public String getIdentifier() {
30: return getNode().getIdentifier();
31: }
32:
33: public IdentificationVarNode getNode() {
34: return node;
35: }
36:
37: public NavRoot getRoot() {
38: return this ;
39: }
40:
41: public ClassMetaData getNavClassMetaData() {
42: return cmd;
43: }
44:
45: public String toString() {
46: StringBuffer s = new StringBuffer();
47: s.append(cmd.qname);
48: childrenToString(s);
49: return s.toString();
50: }
51:
52: }
|