KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > versant > core > jdo > query > GroupingNode


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.jdo.query;
13
14 /**
15  * Node to represent 'Group By'.
16  */

17 public class GroupingNode extends Node {
18
19     public Node havingNode;
20
21     /**
22      * Abstract method to force all nodes to implement visitor pattern
23      */

24     public Field visit(MemVisitor visitor, Object JavaDoc obj) {
25         return null; //To change body of implemented methods use File | Settings | File Templates.
26
}
27
28     public String JavaDoc toString() {
29         return super.toString() + " HAVING " + (havingNode != null);
30     }
31
32     public Object JavaDoc accept(NodeVisitor visitor, Object JavaDoc[] results) {
33         return visitor.visitGroupingNode(this, results);
34     }
35
36     public Object JavaDoc arrive(NodeVisitor v, Object JavaDoc msg) {
37         return v.arriveGroupingNode(this, msg);
38     }
39
40 }
41
Popular Tags