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: /**
14: * Node to represent 'Group By'.
15: */
16: public class GroupingNode extends Node {
17:
18: public Node havingNode;
19:
20: /**
21: * Abstract method to force all nodes to implement visitor pattern
22: */
23: public Field visit(MemVisitor visitor, Object obj) {
24: return null; //To change body of implemented methods use File | Settings | File Templates.
25: }
26:
27: public String toString() {
28: return super .toString() + " HAVING " + (havingNode != null);
29: }
30:
31: public Object accept(NodeVisitor visitor, Object[] results) {
32: return visitor.visitGroupingNode(this , results);
33: }
34:
35: public Object arrive(NodeVisitor v, Object msg) {
36: return v.arriveGroupingNode(this, msg);
37: }
38:
39: }
|