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