1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portal.kernel.dao.orm;
24  
25  import java.util.Collection;
26  import java.util.Map;
27  
28  /**
29   * <a href="RestrictionsFactory.java.html"><b><i>View Source</i></b></a>
30   *
31   * @author Raymond Augé
32   */
33  public interface RestrictionsFactory {
34  
35      public Criterion allEq(Map propertyNameValues);
36  
37      public Criterion and(Criterion lhs, Criterion rhs);
38  
39      public Criterion between(String propertyName, Object lo, Object hi);
40  
41      public Conjunction conjunction();
42  
43      public Disjunction disjunction();
44  
45      public Criterion eq(String propertyName, Object value);
46  
47      public Criterion eqProperty(String propertyName, String otherPropertyName);
48  
49      public Criterion ge(String propertyName, Object value);
50  
51      public Criterion geProperty(String propertyName, String otherPropertyName);
52  
53      public Criterion gt(String propertyName, Object value);
54  
55      public Criterion gtProperty(String propertyName, String otherPropertyName);
56  
57      public Criterion ilike(String propertyName, Object value);
58  
59      public Criterion in(String propertyName, Collection values);
60  
61      public Criterion in(String propertyName, Object[] values);
62  
63      public Criterion isEmpty(String propertyName);
64  
65      public Criterion isNotEmpty(String propertyName);
66  
67      public Criterion isNotNull(String propertyName);
68  
69      public Criterion isNull(String propertyName);
70  
71      public Criterion le(String propertyName, Object value);
72  
73      public Criterion leProperty(String propertyName, String otherPropertyName);
74  
75      public Criterion like(String propertyName, Object value);
76  
77      public Criterion lt(String propertyName, Object value);
78  
79      public Criterion ltProperty(String propertyName, String otherPropertyName);
80  
81      public Criterion ne(String propertyName, Object value);
82  
83      public Criterion neProperty(String propertyName, String otherPropertyName);
84  
85      public Criterion not(Criterion expression);
86  
87      public Criterion or(Criterion lhs, Criterion rhs);
88  
89      public Criterion sizeEq(String propertyName, int size);
90  
91      public Criterion sizeGe(String propertyName, int size);
92  
93      public Criterion sizeGt(String propertyName, int size);
94  
95      public Criterion sizeLe(String propertyName, int size);
96  
97      public Criterion sizeLt(String propertyName, int size);
98  
99      public Criterion sizeNe(String propertyName, int size);
100 
101 }