001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.dao.orm.hibernate;
016    
017    import com.liferay.portal.kernel.dao.orm.Criterion;
018    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
019    import com.liferay.portal.kernel.dao.orm.Order;
020    import com.liferay.portal.kernel.dao.orm.Projection;
021    import com.liferay.portal.kernel.dao.orm.Property;
022    
023    import java.util.Collection;
024    
025    /**
026     * @author Brian Wing Shun Chan
027     */
028    public class PropertyImpl extends ProjectionImpl implements Property {
029    
030            public PropertyImpl(org.hibernate.criterion.Property property) {
031                    super(property);
032    
033                    _property = property;
034            }
035    
036            public Order asc() {
037                    return new OrderImpl(_property.asc());
038            }
039    
040            public Projection avg() {
041                    return new ProjectionImpl(_property.avg());
042            }
043    
044            public Criterion between(Object min, Object max) {
045                    return new CriterionImpl(_property.between(min, max));
046            }
047    
048            public Projection count() {
049                    return new ProjectionImpl(_property.count());
050            }
051    
052            public Order desc() {
053                    return new OrderImpl(_property.desc());
054            }
055    
056            public Criterion eq(DynamicQuery subselect) {
057                    DynamicQueryImpl dynamicQueryImpl = (DynamicQueryImpl)subselect;
058    
059                    return new CriterionImpl(
060                            _property.eq(dynamicQueryImpl.getDetachedCriteria()));
061            }
062    
063            public Criterion eq(Object value) {
064                    return new CriterionImpl(_property.eq(value));
065            }
066    
067            public Criterion eqAll(DynamicQuery subselect) {
068                    DynamicQueryImpl dynamicQueryImpl = (DynamicQueryImpl)subselect;
069    
070                    return new CriterionImpl(
071                            _property.eqAll(dynamicQueryImpl.getDetachedCriteria()));
072            }
073    
074            public Criterion eqProperty(Property other) {
075                    PropertyImpl propertyImpl = (PropertyImpl)other;
076    
077                    return new CriterionImpl(
078                            _property.eqProperty(propertyImpl.getWrappedProperty()));
079            }
080    
081            public Criterion eqProperty(String other) {
082                    return new CriterionImpl(_property.eqProperty(other));
083            }
084    
085            public Property getProperty(String propertyName) {
086                    return new PropertyImpl(_property.getProperty(propertyName));
087            }
088    
089            public org.hibernate.criterion.Property getWrappedProperty() {
090                    return _property;
091            }
092    
093            public Projection group() {
094                    return new ProjectionImpl(_property.group());
095            }
096    
097            public Criterion ge(DynamicQuery subselect) {
098                    DynamicQueryImpl dynamicQueryImpl = (DynamicQueryImpl)subselect;
099    
100                    return new CriterionImpl(
101                            _property.ge(dynamicQueryImpl.getDetachedCriteria()));
102            }
103    
104            public Criterion ge(Object value) {
105                    return new CriterionImpl(_property.ge(value));
106            }
107    
108            public Criterion geAll(DynamicQuery subselect) {
109                    DynamicQueryImpl dynamicQueryImpl = (DynamicQueryImpl)subselect;
110    
111                    return new CriterionImpl(
112                            _property.geAll(dynamicQueryImpl.getDetachedCriteria()));
113            }
114    
115            public Criterion geProperty(Property other) {
116                    PropertyImpl propertyImpl = (PropertyImpl)other;
117    
118                    return new CriterionImpl(
119                            _property.geProperty(propertyImpl.getWrappedProperty()));
120            }
121    
122            public Criterion geProperty(String other) {
123                    return new CriterionImpl(_property.geProperty(other));
124            }
125    
126            public Criterion geSome(DynamicQuery subselect) {
127                    DynamicQueryImpl dynamicQueryImpl = (DynamicQueryImpl)subselect;
128    
129                    return new CriterionImpl(
130                            _property.geSome(dynamicQueryImpl.getDetachedCriteria()));
131            }
132    
133            public Criterion gt(DynamicQuery subselect) {
134                    DynamicQueryImpl dynamicQueryImpl = (DynamicQueryImpl)subselect;
135    
136                    return new CriterionImpl(
137                            _property.gt(dynamicQueryImpl.getDetachedCriteria()));
138            }
139    
140            public Criterion gt(Object value) {
141                    return new CriterionImpl(_property.gt(value));
142            }
143    
144            public Criterion gtAll(DynamicQuery subselect) {
145                    DynamicQueryImpl dynamicQueryImpl = (DynamicQueryImpl)subselect;
146    
147                    return new CriterionImpl(
148                            _property.gtAll(dynamicQueryImpl.getDetachedCriteria()));
149            }
150    
151            public Criterion gtProperty(Property other) {
152                    PropertyImpl propertyImpl = (PropertyImpl)other;
153    
154                    return new CriterionImpl(
155                            _property.gtProperty(propertyImpl.getWrappedProperty()));
156            }
157    
158            public Criterion gtProperty(String other) {
159                    return new CriterionImpl(_property.gtProperty(other));
160            }
161    
162            public Criterion gtSome(DynamicQuery subselect) {
163                    DynamicQueryImpl dynamicQueryImpl = (DynamicQueryImpl)subselect;
164    
165                    return new CriterionImpl(
166                            _property.gtSome(dynamicQueryImpl.getDetachedCriteria()));
167            }
168    
169            public Criterion in(Collection<Object> values) {
170                    return new CriterionImpl(_property.in(values));
171            }
172    
173            public Criterion in(DynamicQuery subselect) {
174                    DynamicQueryImpl dynamicQueryImpl = (DynamicQueryImpl)subselect;
175    
176                    return new CriterionImpl(
177                            _property.in(dynamicQueryImpl.getDetachedCriteria()));
178            }
179    
180            public Criterion in(Object[] values) {
181                    return new CriterionImpl(_property.in(values));
182            }
183    
184            public Criterion isEmpty() {
185                    return new CriterionImpl(_property.isEmpty());
186            }
187    
188            public Criterion isNotEmpty() {
189                    return new CriterionImpl(_property.isNotEmpty());
190            }
191    
192            public Criterion isNotNull() {
193                    return new CriterionImpl(_property.isNotNull());
194            }
195    
196            public Criterion isNull() {
197                    return new CriterionImpl(_property.isNull());
198            }
199    
200            public Criterion le(DynamicQuery subselect) {
201                    DynamicQueryImpl dynamicQueryImpl = (DynamicQueryImpl)subselect;
202    
203                    return new CriterionImpl(
204                            _property.le(dynamicQueryImpl.getDetachedCriteria()));
205            }
206    
207            public Criterion le(Object value) {
208                    return new CriterionImpl(_property.le(value));
209            }
210    
211            public Criterion leAll(DynamicQuery subselect) {
212                    DynamicQueryImpl dynamicQueryImpl = (DynamicQueryImpl)subselect;
213    
214                    return new CriterionImpl(
215                            _property.leAll(dynamicQueryImpl.getDetachedCriteria()));
216            }
217    
218            public Criterion leProperty(Property other) {
219                    PropertyImpl propertyImpl = (PropertyImpl)other;
220    
221                    return new CriterionImpl(
222                            _property.leProperty(propertyImpl.getWrappedProperty()));
223            }
224    
225            public Criterion leProperty(String other) {
226                    return new CriterionImpl(_property.leProperty(other));
227            }
228    
229            public Criterion leSome(DynamicQuery subselect) {
230                    DynamicQueryImpl dynamicQueryImpl = (DynamicQueryImpl)subselect;
231    
232                    return new CriterionImpl(
233                            _property.leSome(dynamicQueryImpl.getDetachedCriteria()));
234            }
235    
236            public Criterion like(Object value) {
237                    return new CriterionImpl(_property.like(value));
238            }
239    
240            public Criterion lt(DynamicQuery subselect) {
241                    DynamicQueryImpl dynamicQueryImpl = (DynamicQueryImpl)subselect;
242    
243                    return new CriterionImpl(
244                            _property.lt(dynamicQueryImpl.getDetachedCriteria()));
245            }
246    
247            public Criterion lt(Object value) {
248                    return new CriterionImpl(_property.lt(value));
249            }
250    
251            public Criterion ltAll(DynamicQuery subselect) {
252                    DynamicQueryImpl dynamicQueryImpl = (DynamicQueryImpl)subselect;
253    
254                    return new CriterionImpl(
255                            _property.ltAll(dynamicQueryImpl.getDetachedCriteria()));
256            }
257    
258            public Criterion ltProperty(Property other) {
259                    PropertyImpl propertyImpl = (PropertyImpl)other;
260    
261                    return new CriterionImpl(
262                            _property.ltProperty(propertyImpl.getWrappedProperty()));
263            }
264    
265            public Criterion ltProperty(String other) {
266                    return new CriterionImpl(_property.ltProperty(other));
267            }
268    
269            public Criterion ltSome(DynamicQuery subselect) {
270                    DynamicQueryImpl dynamicQueryImpl = (DynamicQueryImpl)subselect;
271    
272                    return new CriterionImpl(
273                            _property.ltSome(dynamicQueryImpl.getDetachedCriteria()));
274            }
275    
276            public Projection max() {
277                    return new ProjectionImpl(_property.max());
278            }
279    
280            public Projection min() {
281                    return new ProjectionImpl(_property.min());
282            }
283    
284            public Criterion ne(DynamicQuery subselect) {
285                    DynamicQueryImpl dynamicQueryImpl = (DynamicQueryImpl)subselect;
286    
287                    return new CriterionImpl(
288                            _property.ne(dynamicQueryImpl.getDetachedCriteria()));
289            }
290    
291            public Criterion ne(Object value) {
292                    return new CriterionImpl(_property.ne(value));
293            }
294    
295            public Criterion neProperty(Property other) {
296                    PropertyImpl propertyImpl = (PropertyImpl)other;
297    
298                    return new CriterionImpl(
299                            _property.neProperty(propertyImpl.getWrappedProperty()));
300            }
301    
302            public Criterion neProperty(String other) {
303                    return new CriterionImpl(_property.neProperty(other));
304            }
305    
306            public Criterion notIn(DynamicQuery subselect) {
307                    DynamicQueryImpl dynamicQueryImpl = (DynamicQueryImpl)subselect;
308    
309                    return new CriterionImpl(
310                            _property.notIn(dynamicQueryImpl.getDetachedCriteria()));
311            }
312    
313            private org.hibernate.criterion.Property _property;
314    
315    }