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.criteria;
17  
18  import org.seasar.tuigwaa.database.DataTable;
19  import org.seasar.tuigwaa.database.function.aggregation.IProjectionList;
20  import org.seasar.tuigwaa.model.core.TgwEntity;
21  
22  public interface ICriteria {
23  
24  	public TgwEntity getEntity();
25  	
26  	public ICriteria setMaxResult(int maxResult);
27  
28  	public ICriteria setFirstResult(int firstResult);
29  
30  	public ICriteria addEq(String field, Object value);
31  
32  	public ICriteria addLe(String field, Object value);
33  
34  	public ICriteria addGe(String field, Object value);
35  
36  	public ICriteria addLt(String field, Object value);
37  
38  	public ICriteria addGt(String field, Object value);
39  
40  	public ICriteria addNe(String field, Object value);
41  
42  	public ICriteria addBetween(String field, Object value);
43  
44  	public ICriteria addIsNull(String field);
45  	
46  	public ICriteria addIsNotNull(String field);
47  	
48  	public ICriteria addLike(String field, Object value);
49  
50  	public ICriteria createCriteria(String field);
51  
52  	public ICriteria createCriteria(String field, String alias);
53  
54  	public ICriteria setProjection(IProjectionList projectionList);
55  
56  	public DataTable list();
57  
58  	public ICriteria addOrder(String field, boolean isDesc);
59  
60  	public ICriteria disjunction();
61  	
62  	public void setJoinType(int joinType);
63  	
64  }