1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portal.kernel.dao.orm;
16  
17  import java.util.Collection;
18  import java.util.Map;
19  
20  /**
21   * <a href="RestrictionsFactory.java.html"><b><i>View Source</i></b></a>
22   *
23   * @author Raymond Augé
24   */
25  public interface RestrictionsFactory {
26  
27      public Criterion allEq(Map<String, Criterion> propertyNameValues);
28  
29      public Criterion and(Criterion lhs, Criterion rhs);
30  
31      public Criterion between(String propertyName, Object lo, Object hi);
32  
33      public Conjunction conjunction();
34  
35      public Disjunction disjunction();
36  
37      public Criterion eq(String propertyName, Object value);
38  
39      public Criterion eqProperty(String propertyName, String otherPropertyName);
40  
41      public Criterion ge(String propertyName, Object value);
42  
43      public Criterion geProperty(String propertyName, String otherPropertyName);
44  
45      public Criterion gt(String propertyName, Object value);
46  
47      public Criterion gtProperty(String propertyName, String otherPropertyName);
48  
49      public Criterion ilike(String propertyName, Object value);
50  
51      public Criterion in(String propertyName, Collection<Object> values);
52  
53      public Criterion in(String propertyName, Object[] values);
54  
55      public Criterion isEmpty(String propertyName);
56  
57      public Criterion isNotEmpty(String propertyName);
58  
59      public Criterion isNotNull(String propertyName);
60  
61      public Criterion isNull(String propertyName);
62  
63      public Criterion le(String propertyName, Object value);
64  
65      public Criterion leProperty(String propertyName, String otherPropertyName);
66  
67      public Criterion like(String propertyName, Object value);
68  
69      public Criterion lt(String propertyName, Object value);
70  
71      public Criterion ltProperty(String propertyName, String otherPropertyName);
72  
73      public Criterion ne(String propertyName, Object value);
74  
75      public Criterion neProperty(String propertyName, String otherPropertyName);
76  
77      public Criterion not(Criterion expression);
78  
79      public Criterion or(Criterion lhs, Criterion rhs);
80  
81      public Criterion sizeEq(String propertyName, int size);
82  
83      public Criterion sizeGe(String propertyName, int size);
84  
85      public Criterion sizeGt(String propertyName, int size);
86  
87      public Criterion sizeLe(String propertyName, int size);
88  
89      public Criterion sizeLt(String propertyName, int size);
90  
91      public Criterion sizeNe(String propertyName, int size);
92  
93  }