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.dao.orm.hibernate;
24  
25  import com.liferay.portal.kernel.dao.orm.Criterion;
26  import com.liferay.portal.kernel.dao.orm.DynamicQuery;
27  import com.liferay.portal.kernel.dao.orm.Order;
28  import com.liferay.portal.kernel.dao.orm.Projection;
29  import com.liferay.portal.kernel.dao.orm.Property;
30  
31  import java.util.Collection;
32  
33  /**
34   * <a href="PropertyImpl.java.html"><b><i>View Source</i></b></a>
35   *
36   * @author Brian Wing Shun Chan
37   *
38   */
39  public class PropertyImpl extends ProjectionImpl implements Property {
40  
41      public PropertyImpl(org.hibernate.criterion.Property property) {
42          super(property);
43  
44          _property = property;
45      }
46  
47      public Order asc() {
48          return new OrderImpl(_property.asc());
49      }
50  
51      public Projection avg() {
52          return new ProjectionImpl(_property.avg());
53      }
54  
55      public Criterion between(Object min, Object max) {
56          return new CriterionImpl(_property.between(min, max));
57      }
58  
59      public Projection count() {
60          return new ProjectionImpl(_property.count());
61      }
62  
63      public Order desc() {
64          return new OrderImpl(_property.desc());
65      }
66  
67      public Criterion eq(DynamicQuery subselect) {
68          DynamicQueryImpl dynamicQueryImpl = (DynamicQueryImpl)subselect;
69  
70          return new CriterionImpl(
71              _property.eq(dynamicQueryImpl.getDetachedCriteria()));
72      }
73  
74      public Criterion eq(Object value) {
75          return new CriterionImpl(_property.eq(value));
76      }
77  
78      public Criterion eqAll(DynamicQuery subselect) {
79          DynamicQueryImpl dynamicQueryImpl = (DynamicQueryImpl)subselect;
80  
81          return new CriterionImpl(
82              _property.eqAll(dynamicQueryImpl.getDetachedCriteria()));
83      }
84  
85      public Criterion eqProperty(Property other) {
86          PropertyImpl propertyImpl = (PropertyImpl)other;
87  
88          return new CriterionImpl(
89              _property.eqProperty(propertyImpl.getWrappedProperty()));
90      }
91  
92      public Criterion eqProperty(String other) {
93          return new CriterionImpl(_property.eqProperty(other));
94      }
95  
96      public Property getProperty(String propertyName) {
97          return new PropertyImpl(_property.getProperty(propertyName));
98      }
99  
100     public org.hibernate.criterion.Property getWrappedProperty() {
101         return _property;
102     }
103 
104     public Projection group() {
105         return new ProjectionImpl(_property.group());
106     }
107 
108     public Criterion ge(DynamicQuery subselect) {
109         DynamicQueryImpl dynamicQueryImpl = (DynamicQueryImpl)subselect;
110 
111         return new CriterionImpl(
112             _property.ge(dynamicQueryImpl.getDetachedCriteria()));
113     }
114 
115     public Criterion ge(Object value) {
116         return new CriterionImpl(_property.ge(value));
117     }
118 
119     public Criterion geAll(DynamicQuery subselect) {
120         DynamicQueryImpl dynamicQueryImpl = (DynamicQueryImpl)subselect;
121 
122         return new CriterionImpl(
123             _property.geAll(dynamicQueryImpl.getDetachedCriteria()));
124     }
125 
126     public Criterion geProperty(Property other) {
127         PropertyImpl propertyImpl = (PropertyImpl)other;
128 
129         return new CriterionImpl(
130             _property.geProperty(propertyImpl.getWrappedProperty()));
131     }
132 
133     public Criterion geProperty(String other) {
134         return new CriterionImpl(_property.geProperty(other));
135     }
136 
137     public Criterion geSome(DynamicQuery subselect) {
138         DynamicQueryImpl dynamicQueryImpl = (DynamicQueryImpl)subselect;
139 
140         return new CriterionImpl(
141             _property.geSome(dynamicQueryImpl.getDetachedCriteria()));
142     }
143 
144     public Criterion gt(DynamicQuery subselect) {
145         DynamicQueryImpl dynamicQueryImpl = (DynamicQueryImpl)subselect;
146 
147         return new CriterionImpl(
148             _property.gt(dynamicQueryImpl.getDetachedCriteria()));
149     }
150 
151     public Criterion gt(Object value) {
152         return new CriterionImpl(_property.gt(value));
153     }
154 
155     public Criterion gtAll(DynamicQuery subselect) {
156         DynamicQueryImpl dynamicQueryImpl = (DynamicQueryImpl)subselect;
157 
158         return new CriterionImpl(
159             _property.gtAll(dynamicQueryImpl.getDetachedCriteria()));
160     }
161 
162     public Criterion gtProperty(Property other) {
163         PropertyImpl propertyImpl = (PropertyImpl)other;
164 
165         return new CriterionImpl(
166             _property.gtProperty(propertyImpl.getWrappedProperty()));
167     }
168 
169     public Criterion gtProperty(String other) {
170         return new CriterionImpl(_property.gtProperty(other));
171     }
172 
173     public Criterion gtSome(DynamicQuery subselect) {
174         DynamicQueryImpl dynamicQueryImpl = (DynamicQueryImpl)subselect;
175 
176         return new CriterionImpl(
177             _property.gtSome(dynamicQueryImpl.getDetachedCriteria()));
178     }
179 
180     public Criterion in(Collection values) {
181         return new CriterionImpl(_property.in(values));
182     }
183 
184     public Criterion in(DynamicQuery subselect) {
185         DynamicQueryImpl dynamicQueryImpl = (DynamicQueryImpl)subselect;
186 
187         return new CriterionImpl(
188             _property.in(dynamicQueryImpl.getDetachedCriteria()));
189     }
190 
191     public Criterion in(Object[] values) {
192         return new CriterionImpl(_property.in(values));
193     }
194 
195     public Criterion isEmpty() {
196         return new CriterionImpl(_property.isEmpty());
197     }
198 
199     public Criterion isNotEmpty() {
200         return new CriterionImpl(_property.isNotEmpty());
201     }
202 
203     public Criterion isNotNull() {
204         return new CriterionImpl(_property.isNotNull());
205     }
206 
207     public Criterion isNull() {
208         return new CriterionImpl(_property.isNull());
209     }
210 
211     public Criterion le(DynamicQuery subselect) {
212         DynamicQueryImpl dynamicQueryImpl = (DynamicQueryImpl)subselect;
213 
214         return new CriterionImpl(
215             _property.le(dynamicQueryImpl.getDetachedCriteria()));
216     }
217 
218     public Criterion le(Object value) {
219         return new CriterionImpl(_property.le(value));
220     }
221 
222     public Criterion leAll(DynamicQuery subselect) {
223         DynamicQueryImpl dynamicQueryImpl = (DynamicQueryImpl)subselect;
224 
225         return new CriterionImpl(
226             _property.leAll(dynamicQueryImpl.getDetachedCriteria()));
227     }
228 
229     public Criterion leProperty(Property other) {
230         PropertyImpl propertyImpl = (PropertyImpl)other;
231 
232         return new CriterionImpl(
233             _property.leProperty(propertyImpl.getWrappedProperty()));
234     }
235 
236     public Criterion leProperty(String other) {
237         return new CriterionImpl(_property.leProperty(other));
238     }
239 
240     public Criterion leSome(DynamicQuery subselect) {
241         DynamicQueryImpl dynamicQueryImpl = (DynamicQueryImpl)subselect;
242 
243         return new CriterionImpl(
244             _property.leSome(dynamicQueryImpl.getDetachedCriteria()));
245     }
246 
247     public Criterion like(Object value) {
248         return new CriterionImpl(_property.like(value));
249     }
250 
251     public Criterion lt(DynamicQuery subselect) {
252         DynamicQueryImpl dynamicQueryImpl = (DynamicQueryImpl)subselect;
253 
254         return new CriterionImpl(
255             _property.lt(dynamicQueryImpl.getDetachedCriteria()));
256     }
257 
258     public Criterion lt(Object value) {
259         return new CriterionImpl(_property.lt(value));
260     }
261 
262     public Criterion ltAll(DynamicQuery subselect) {
263         DynamicQueryImpl dynamicQueryImpl = (DynamicQueryImpl)subselect;
264 
265         return new CriterionImpl(
266             _property.ltAll(dynamicQueryImpl.getDetachedCriteria()));
267     }
268 
269     public Criterion ltProperty(Property other) {
270         PropertyImpl propertyImpl = (PropertyImpl)other;
271 
272         return new CriterionImpl(
273             _property.ltProperty(propertyImpl.getWrappedProperty()));
274     }
275 
276     public Criterion ltProperty(String other) {
277         return new CriterionImpl(_property.ltProperty(other));
278     }
279 
280     public Criterion ltSome(DynamicQuery subselect) {
281         DynamicQueryImpl dynamicQueryImpl = (DynamicQueryImpl)subselect;
282 
283         return new CriterionImpl(
284             _property.ltSome(dynamicQueryImpl.getDetachedCriteria()));
285     }
286 
287     public Projection max() {
288         return new ProjectionImpl(_property.max());
289     }
290 
291     public Projection min() {
292         return new ProjectionImpl(_property.min());
293     }
294 
295     public Criterion ne(DynamicQuery subselect) {
296         DynamicQueryImpl dynamicQueryImpl = (DynamicQueryImpl)subselect;
297 
298         return new CriterionImpl(
299             _property.ne(dynamicQueryImpl.getDetachedCriteria()));
300     }
301 
302     public Criterion ne(Object value) {
303         return new CriterionImpl(_property.ne(value));
304     }
305 
306     public Criterion neProperty(Property other) {
307         PropertyImpl propertyImpl = (PropertyImpl)other;
308 
309         return new CriterionImpl(
310             _property.neProperty(propertyImpl.getWrappedProperty()));
311     }
312 
313     public Criterion neProperty(String other) {
314         return new CriterionImpl(_property.neProperty(other));
315     }
316 
317     public Criterion notIn(DynamicQuery subselect) {
318         DynamicQueryImpl dynamicQueryImpl = (DynamicQueryImpl)subselect;
319 
320         return new CriterionImpl(
321             _property.notIn(dynamicQueryImpl.getDetachedCriteria()));
322     }
323 
324     private org.hibernate.criterion.Property _property;
325 
326 }