1 package pl.aislib.tools.mapping.structure;
2
3 public class Aggregate extends Operation {
4
5 private boolean multipleRows;
6
7 public Aggregate(boolean multipleRows) {
8 this.multipleRows = multipleRows;
9 }
10
11 public boolean isMultipleRows() {
12 return multipleRows;
13 }
14
15 public String createReturnType() {
16 if (isMultipleRows()) {
17 return "List";
18 } else {
19 return getJavaMethod().getReturnType();
20 }
21 }
22
23 public String createReturnForJavadoc() {
24 String returnType = getJavaMethod().getReturnType();
25 if (isMultipleRows()) {
26 return "a List of <code>" + returnType + "</code> objects " +
27 "(first column of all returned rows, NULL values are omitted)";
28 } else {
29 return "result of query (first column of first returned row)";
30 }
31 }
32
33 }
34
35 /***
36 * $Log: Aggregate.java,v $
37 * Revision 1.4 2004/09/10 16:08:51 milosz
38 * All Operaations children now extend Operation class.
39 *
40 */