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