KickJava   Java API By Example, From Geeks To Geeks.

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


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 import com.versant.core.metadata.ClassMetaData;
15
16 /**
17  * COUNT(*).
18  */

19 public class AggregateCountStarNode extends AggregateNode {
20
21     public AggregateCountStarNode(Node parent) {
22         this.parent = parent;
23     }
24
25     public AggregateCountStarNode() {
26     }
27
28     /**
29      * Resolve field refs and so on relative to the compiler. This must
30      * recursively resolve any child nodes.
31      */

32     public void resolve(QueryParser comp, ClassMetaData cmd, boolean ordering) {
33     }
34
35     /**
36      * Simplify this node tree as much as possible.
37      */

38     protected void normalizeImp() {
39     }
40
41     public String JavaDoc toString() {
42         return super.toString() + "Type = count(*)";
43     }
44
45     public Object JavaDoc accept(NodeVisitor visitor, Object JavaDoc[] results) {
46         return visitor.visitAggregateCountStarNode(this, results);
47     }
48
49     public Object JavaDoc arrive(NodeVisitor v, Object JavaDoc msg) {
50         return v.arriveAggregateCountStarNode(this, msg);
51     }
52
53 }
54
Popular Tags