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: import com.versant.core.metadata.ClassMetaData;
14:
15: /**
16: * COUNT(*).
17: */
18: public class AggregateCountStarNode extends AggregateNode {
19:
20: public AggregateCountStarNode(Node parent) {
21: this .parent = parent;
22: }
23:
24: public AggregateCountStarNode() {
25: }
26:
27: /**
28: * Resolve field refs and so on relative to the compiler. This must
29: * recursively resolve any child nodes.
30: */
31: public void resolve(QueryParser comp, ClassMetaData cmd,
32: boolean ordering) {
33: }
34:
35: /**
36: * Simplify this node tree as much as possible.
37: */
38: protected void normalizeImp() {
39: }
40:
41: public String toString() {
42: return super .toString() + "Type = count(*)";
43: }
44:
45: public Object accept(NodeVisitor visitor, Object[] results) {
46: return visitor.visitAggregateCountStarNode(this , results);
47: }
48:
49: public Object arrive(NodeVisitor v, Object msg) {
50: return v.arriveAggregateCountStarNode(this, msg);
51: }
52:
53: }
|