View Javadoc

1   /*
2    * Copyright 2004-2006 the Seasar Foundation and the Others.
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *     http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 
13   * either express or implied. See the License for the specific language
14   * governing permissions and limitations under the License.
15   */
16  package org.seasar.tuigwaa.database.function.aggregation;
17  
18  import java.util.ArrayList;
19  import java.util.List;
20  
21  import com.isenshi.util.functor.BinaryFunction;
22  
23  public class DataTableProjectionList implements IProjectionList{
24  
25  	private List aliases = new ArrayList(); 
26  	
27  	public List getAliases() {
28  		return aliases;
29  	}
30  
31  	public boolean hasAlias(String alias) {
32  		return aliases.contains(alias);
33  	}
34  	
35  	public IProjectionList addMax(String field, String alias) {
36  		aliases.add(alias);
37  		return null;
38  	}
39  
40  	public IProjectionList addMin(String field, String alias) {
41  		// TODO Auto-generated method stub
42  		return null;
43  	}
44  
45  	public IProjectionList addAvg(String field, String alias) {
46  		// TODO Auto-generated method stub
47  		return null;
48  	}
49  
50  	public IProjectionList addSum(String field, String alias) {
51  		// TODO Auto-generated method stub
52  		return null;
53  	}
54  
55  	public IProjectionList addGroupProperty(String field, String alias) {
56  		// TODO Auto-generated method stub
57  		return null;
58  	}
59  
60  	public IProjectionList addRowCount(String alias) {
61  		// TODO Auto-generated method stub
62  		return null;
63  	}
64  
65  	public class AggOp{
66  		
67  		private String field;
68  		
69  		private BinaryFunction function;
70  		
71  		AggOp(String field, BinaryFunction function){
72  			this.field = field;
73  			this.function = function;
74  		}
75  		
76  		public String getField() {
77  			return field;
78  		}
79  		
80  		public BinaryFunction getFunction() {
81  			return function;
82  		}
83  	}
84  
85  	public IProjectionList addCountProjection(String field, String alias) {
86  		// TODO Auto-generated method stub
87  		return null;
88  	}
89  }