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.portlet.expando.service.persistence;
24  
25  /**
26   * <a href="ExpandoValueUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * @author Brian Wing Shun Chan
29   *
30   */
31  public class ExpandoValueUtil {
32      public static com.liferay.portlet.expando.model.ExpandoValue create(
33          long valueId) {
34          return getPersistence().create(valueId);
35      }
36  
37      public static com.liferay.portlet.expando.model.ExpandoValue remove(
38          long valueId)
39          throws com.liferay.portal.SystemException,
40              com.liferay.portlet.expando.NoSuchValueException {
41          return getPersistence().remove(valueId);
42      }
43  
44      public static com.liferay.portlet.expando.model.ExpandoValue remove(
45          com.liferay.portlet.expando.model.ExpandoValue expandoValue)
46          throws com.liferay.portal.SystemException {
47          return getPersistence().remove(expandoValue);
48      }
49  
50      /**
51       * @deprecated Use <code>update(ExpandoValue expandoValue, boolean merge)</code>.
52       */
53      public static com.liferay.portlet.expando.model.ExpandoValue update(
54          com.liferay.portlet.expando.model.ExpandoValue expandoValue)
55          throws com.liferay.portal.SystemException {
56          return getPersistence().update(expandoValue);
57      }
58  
59      /**
60       * Add, update, or merge, the entity. This method also calls the model
61       * listeners to trigger the proper events associated with adding, deleting,
62       * or updating an entity.
63       *
64       * @param        expandoValue the entity to add, update, or merge
65       * @param        merge boolean value for whether to merge the entity. The
66       *                default value is false. Setting merge to true is more
67       *                expensive and should only be true when expandoValue is
68       *                transient. See LEP-5473 for a detailed discussion of this
69       *                method.
70       * @return        true if the portlet can be displayed via Ajax
71       */
72      public static com.liferay.portlet.expando.model.ExpandoValue update(
73          com.liferay.portlet.expando.model.ExpandoValue expandoValue,
74          boolean merge) throws com.liferay.portal.SystemException {
75          return getPersistence().update(expandoValue, merge);
76      }
77  
78      public static com.liferay.portlet.expando.model.ExpandoValue updateImpl(
79          com.liferay.portlet.expando.model.ExpandoValue expandoValue,
80          boolean merge) throws com.liferay.portal.SystemException {
81          return getPersistence().updateImpl(expandoValue, merge);
82      }
83  
84      public static com.liferay.portlet.expando.model.ExpandoValue findByPrimaryKey(
85          long valueId)
86          throws com.liferay.portal.SystemException,
87              com.liferay.portlet.expando.NoSuchValueException {
88          return getPersistence().findByPrimaryKey(valueId);
89      }
90  
91      public static com.liferay.portlet.expando.model.ExpandoValue fetchByPrimaryKey(
92          long valueId) throws com.liferay.portal.SystemException {
93          return getPersistence().fetchByPrimaryKey(valueId);
94      }
95  
96      public static java.util.List<com.liferay.portlet.expando.model.ExpandoValue> findByTableId(
97          long tableId) throws com.liferay.portal.SystemException {
98          return getPersistence().findByTableId(tableId);
99      }
100 
101     public static java.util.List<com.liferay.portlet.expando.model.ExpandoValue> findByTableId(
102         long tableId, int start, int end)
103         throws com.liferay.portal.SystemException {
104         return getPersistence().findByTableId(tableId, start, end);
105     }
106 
107     public static java.util.List<com.liferay.portlet.expando.model.ExpandoValue> findByTableId(
108         long tableId, int start, int end,
109         com.liferay.portal.kernel.util.OrderByComparator obc)
110         throws com.liferay.portal.SystemException {
111         return getPersistence().findByTableId(tableId, start, end, obc);
112     }
113 
114     public static com.liferay.portlet.expando.model.ExpandoValue findByTableId_First(
115         long tableId, com.liferay.portal.kernel.util.OrderByComparator obc)
116         throws com.liferay.portal.SystemException,
117             com.liferay.portlet.expando.NoSuchValueException {
118         return getPersistence().findByTableId_First(tableId, obc);
119     }
120 
121     public static com.liferay.portlet.expando.model.ExpandoValue findByTableId_Last(
122         long tableId, com.liferay.portal.kernel.util.OrderByComparator obc)
123         throws com.liferay.portal.SystemException,
124             com.liferay.portlet.expando.NoSuchValueException {
125         return getPersistence().findByTableId_Last(tableId, obc);
126     }
127 
128     public static com.liferay.portlet.expando.model.ExpandoValue[] findByTableId_PrevAndNext(
129         long valueId, long tableId,
130         com.liferay.portal.kernel.util.OrderByComparator obc)
131         throws com.liferay.portal.SystemException,
132             com.liferay.portlet.expando.NoSuchValueException {
133         return getPersistence().findByTableId_PrevAndNext(valueId, tableId, obc);
134     }
135 
136     public static java.util.List<com.liferay.portlet.expando.model.ExpandoValue> findByColumnId(
137         long columnId) throws com.liferay.portal.SystemException {
138         return getPersistence().findByColumnId(columnId);
139     }
140 
141     public static java.util.List<com.liferay.portlet.expando.model.ExpandoValue> findByColumnId(
142         long columnId, int start, int end)
143         throws com.liferay.portal.SystemException {
144         return getPersistence().findByColumnId(columnId, start, end);
145     }
146 
147     public static java.util.List<com.liferay.portlet.expando.model.ExpandoValue> findByColumnId(
148         long columnId, int start, int end,
149         com.liferay.portal.kernel.util.OrderByComparator obc)
150         throws com.liferay.portal.SystemException {
151         return getPersistence().findByColumnId(columnId, start, end, obc);
152     }
153 
154     public static com.liferay.portlet.expando.model.ExpandoValue findByColumnId_First(
155         long columnId, com.liferay.portal.kernel.util.OrderByComparator obc)
156         throws com.liferay.portal.SystemException,
157             com.liferay.portlet.expando.NoSuchValueException {
158         return getPersistence().findByColumnId_First(columnId, obc);
159     }
160 
161     public static com.liferay.portlet.expando.model.ExpandoValue findByColumnId_Last(
162         long columnId, com.liferay.portal.kernel.util.OrderByComparator obc)
163         throws com.liferay.portal.SystemException,
164             com.liferay.portlet.expando.NoSuchValueException {
165         return getPersistence().findByColumnId_Last(columnId, obc);
166     }
167 
168     public static com.liferay.portlet.expando.model.ExpandoValue[] findByColumnId_PrevAndNext(
169         long valueId, long columnId,
170         com.liferay.portal.kernel.util.OrderByComparator obc)
171         throws com.liferay.portal.SystemException,
172             com.liferay.portlet.expando.NoSuchValueException {
173         return getPersistence()
174                    .findByColumnId_PrevAndNext(valueId, columnId, obc);
175     }
176 
177     public static java.util.List<com.liferay.portlet.expando.model.ExpandoValue> findByRowId(
178         long rowId) throws com.liferay.portal.SystemException {
179         return getPersistence().findByRowId(rowId);
180     }
181 
182     public static java.util.List<com.liferay.portlet.expando.model.ExpandoValue> findByRowId(
183         long rowId, int start, int end)
184         throws com.liferay.portal.SystemException {
185         return getPersistence().findByRowId(rowId, start, end);
186     }
187 
188     public static java.util.List<com.liferay.portlet.expando.model.ExpandoValue> findByRowId(
189         long rowId, int start, int end,
190         com.liferay.portal.kernel.util.OrderByComparator obc)
191         throws com.liferay.portal.SystemException {
192         return getPersistence().findByRowId(rowId, start, end, obc);
193     }
194 
195     public static com.liferay.portlet.expando.model.ExpandoValue findByRowId_First(
196         long rowId, com.liferay.portal.kernel.util.OrderByComparator obc)
197         throws com.liferay.portal.SystemException,
198             com.liferay.portlet.expando.NoSuchValueException {
199         return getPersistence().findByRowId_First(rowId, obc);
200     }
201 
202     public static com.liferay.portlet.expando.model.ExpandoValue findByRowId_Last(
203         long rowId, com.liferay.portal.kernel.util.OrderByComparator obc)
204         throws com.liferay.portal.SystemException,
205             com.liferay.portlet.expando.NoSuchValueException {
206         return getPersistence().findByRowId_Last(rowId, obc);
207     }
208 
209     public static com.liferay.portlet.expando.model.ExpandoValue[] findByRowId_PrevAndNext(
210         long valueId, long rowId,
211         com.liferay.portal.kernel.util.OrderByComparator obc)
212         throws com.liferay.portal.SystemException,
213             com.liferay.portlet.expando.NoSuchValueException {
214         return getPersistence().findByRowId_PrevAndNext(valueId, rowId, obc);
215     }
216 
217     public static java.util.List<com.liferay.portlet.expando.model.ExpandoValue> findByT_R(
218         long tableId, long rowId) throws com.liferay.portal.SystemException {
219         return getPersistence().findByT_R(tableId, rowId);
220     }
221 
222     public static java.util.List<com.liferay.portlet.expando.model.ExpandoValue> findByT_R(
223         long tableId, long rowId, int start, int end)
224         throws com.liferay.portal.SystemException {
225         return getPersistence().findByT_R(tableId, rowId, start, end);
226     }
227 
228     public static java.util.List<com.liferay.portlet.expando.model.ExpandoValue> findByT_R(
229         long tableId, long rowId, int start, int end,
230         com.liferay.portal.kernel.util.OrderByComparator obc)
231         throws com.liferay.portal.SystemException {
232         return getPersistence().findByT_R(tableId, rowId, start, end, obc);
233     }
234 
235     public static com.liferay.portlet.expando.model.ExpandoValue findByT_R_First(
236         long tableId, long rowId,
237         com.liferay.portal.kernel.util.OrderByComparator obc)
238         throws com.liferay.portal.SystemException,
239             com.liferay.portlet.expando.NoSuchValueException {
240         return getPersistence().findByT_R_First(tableId, rowId, obc);
241     }
242 
243     public static com.liferay.portlet.expando.model.ExpandoValue findByT_R_Last(
244         long tableId, long rowId,
245         com.liferay.portal.kernel.util.OrderByComparator obc)
246         throws com.liferay.portal.SystemException,
247             com.liferay.portlet.expando.NoSuchValueException {
248         return getPersistence().findByT_R_Last(tableId, rowId, obc);
249     }
250 
251     public static com.liferay.portlet.expando.model.ExpandoValue[] findByT_R_PrevAndNext(
252         long valueId, long tableId, long rowId,
253         com.liferay.portal.kernel.util.OrderByComparator obc)
254         throws com.liferay.portal.SystemException,
255             com.liferay.portlet.expando.NoSuchValueException {
256         return getPersistence()
257                    .findByT_R_PrevAndNext(valueId, tableId, rowId, obc);
258     }
259 
260     public static com.liferay.portlet.expando.model.ExpandoValue findByC_R(
261         long columnId, long rowId)
262         throws com.liferay.portal.SystemException,
263             com.liferay.portlet.expando.NoSuchValueException {
264         return getPersistence().findByC_R(columnId, rowId);
265     }
266 
267     public static com.liferay.portlet.expando.model.ExpandoValue fetchByC_R(
268         long columnId, long rowId) throws com.liferay.portal.SystemException {
269         return getPersistence().fetchByC_R(columnId, rowId);
270     }
271 
272     public static java.util.List<com.liferay.portlet.expando.model.ExpandoValue> findByC_C(
273         long classNameId, long classPK)
274         throws com.liferay.portal.SystemException {
275         return getPersistence().findByC_C(classNameId, classPK);
276     }
277 
278     public static java.util.List<com.liferay.portlet.expando.model.ExpandoValue> findByC_C(
279         long classNameId, long classPK, int start, int end)
280         throws com.liferay.portal.SystemException {
281         return getPersistence().findByC_C(classNameId, classPK, start, end);
282     }
283 
284     public static java.util.List<com.liferay.portlet.expando.model.ExpandoValue> findByC_C(
285         long classNameId, long classPK, int start, int end,
286         com.liferay.portal.kernel.util.OrderByComparator obc)
287         throws com.liferay.portal.SystemException {
288         return getPersistence().findByC_C(classNameId, classPK, start, end, obc);
289     }
290 
291     public static com.liferay.portlet.expando.model.ExpandoValue findByC_C_First(
292         long classNameId, long classPK,
293         com.liferay.portal.kernel.util.OrderByComparator obc)
294         throws com.liferay.portal.SystemException,
295             com.liferay.portlet.expando.NoSuchValueException {
296         return getPersistence().findByC_C_First(classNameId, classPK, obc);
297     }
298 
299     public static com.liferay.portlet.expando.model.ExpandoValue findByC_C_Last(
300         long classNameId, long classPK,
301         com.liferay.portal.kernel.util.OrderByComparator obc)
302         throws com.liferay.portal.SystemException,
303             com.liferay.portlet.expando.NoSuchValueException {
304         return getPersistence().findByC_C_Last(classNameId, classPK, obc);
305     }
306 
307     public static com.liferay.portlet.expando.model.ExpandoValue[] findByC_C_PrevAndNext(
308         long valueId, long classNameId, long classPK,
309         com.liferay.portal.kernel.util.OrderByComparator obc)
310         throws com.liferay.portal.SystemException,
311             com.liferay.portlet.expando.NoSuchValueException {
312         return getPersistence()
313                    .findByC_C_PrevAndNext(valueId, classNameId, classPK, obc);
314     }
315 
316     public static com.liferay.portlet.expando.model.ExpandoValue findByT_C_R(
317         long tableId, long columnId, long rowId)
318         throws com.liferay.portal.SystemException,
319             com.liferay.portlet.expando.NoSuchValueException {
320         return getPersistence().findByT_C_R(tableId, columnId, rowId);
321     }
322 
323     public static com.liferay.portlet.expando.model.ExpandoValue fetchByT_C_R(
324         long tableId, long columnId, long rowId)
325         throws com.liferay.portal.SystemException {
326         return getPersistence().fetchByT_C_R(tableId, columnId, rowId);
327     }
328 
329     public static java.util.List<com.liferay.portlet.expando.model.ExpandoValue> findByT_C_C_C(
330         long tableId, long columnId, long classNameId, long classPK)
331         throws com.liferay.portal.SystemException {
332         return getPersistence()
333                    .findByT_C_C_C(tableId, columnId, classNameId, classPK);
334     }
335 
336     public static java.util.List<com.liferay.portlet.expando.model.ExpandoValue> findByT_C_C_C(
337         long tableId, long columnId, long classNameId, long classPK, int start,
338         int end) throws com.liferay.portal.SystemException {
339         return getPersistence()
340                    .findByT_C_C_C(tableId, columnId, classNameId, classPK,
341             start, end);
342     }
343 
344     public static java.util.List<com.liferay.portlet.expando.model.ExpandoValue> findByT_C_C_C(
345         long tableId, long columnId, long classNameId, long classPK, int start,
346         int end, com.liferay.portal.kernel.util.OrderByComparator obc)
347         throws com.liferay.portal.SystemException {
348         return getPersistence()
349                    .findByT_C_C_C(tableId, columnId, classNameId, classPK,
350             start, end, obc);
351     }
352 
353     public static com.liferay.portlet.expando.model.ExpandoValue findByT_C_C_C_First(
354         long tableId, long columnId, long classNameId, long classPK,
355         com.liferay.portal.kernel.util.OrderByComparator obc)
356         throws com.liferay.portal.SystemException,
357             com.liferay.portlet.expando.NoSuchValueException {
358         return getPersistence()
359                    .findByT_C_C_C_First(tableId, columnId, classNameId,
360             classPK, obc);
361     }
362 
363     public static com.liferay.portlet.expando.model.ExpandoValue findByT_C_C_C_Last(
364         long tableId, long columnId, long classNameId, long classPK,
365         com.liferay.portal.kernel.util.OrderByComparator obc)
366         throws com.liferay.portal.SystemException,
367             com.liferay.portlet.expando.NoSuchValueException {
368         return getPersistence()
369                    .findByT_C_C_C_Last(tableId, columnId, classNameId, classPK,
370             obc);
371     }
372 
373     public static com.liferay.portlet.expando.model.ExpandoValue[] findByT_C_C_C_PrevAndNext(
374         long valueId, long tableId, long columnId, long classNameId,
375         long classPK, com.liferay.portal.kernel.util.OrderByComparator obc)
376         throws com.liferay.portal.SystemException,
377             com.liferay.portlet.expando.NoSuchValueException {
378         return getPersistence()
379                    .findByT_C_C_C_PrevAndNext(valueId, tableId, columnId,
380             classNameId, classPK, obc);
381     }
382 
383     public static java.util.List<Object> findWithDynamicQuery(
384         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
385         throws com.liferay.portal.SystemException {
386         return getPersistence().findWithDynamicQuery(dynamicQuery);
387     }
388 
389     public static java.util.List<Object> findWithDynamicQuery(
390         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
391         int end) throws com.liferay.portal.SystemException {
392         return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
393     }
394 
395     public static java.util.List<com.liferay.portlet.expando.model.ExpandoValue> findAll()
396         throws com.liferay.portal.SystemException {
397         return getPersistence().findAll();
398     }
399 
400     public static java.util.List<com.liferay.portlet.expando.model.ExpandoValue> findAll(
401         int start, int end) throws com.liferay.portal.SystemException {
402         return getPersistence().findAll(start, end);
403     }
404 
405     public static java.util.List<com.liferay.portlet.expando.model.ExpandoValue> findAll(
406         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
407         throws com.liferay.portal.SystemException {
408         return getPersistence().findAll(start, end, obc);
409     }
410 
411     public static void removeByTableId(long tableId)
412         throws com.liferay.portal.SystemException {
413         getPersistence().removeByTableId(tableId);
414     }
415 
416     public static void removeByColumnId(long columnId)
417         throws com.liferay.portal.SystemException {
418         getPersistence().removeByColumnId(columnId);
419     }
420 
421     public static void removeByRowId(long rowId)
422         throws com.liferay.portal.SystemException {
423         getPersistence().removeByRowId(rowId);
424     }
425 
426     public static void removeByT_R(long tableId, long rowId)
427         throws com.liferay.portal.SystemException {
428         getPersistence().removeByT_R(tableId, rowId);
429     }
430 
431     public static void removeByC_R(long columnId, long rowId)
432         throws com.liferay.portal.SystemException,
433             com.liferay.portlet.expando.NoSuchValueException {
434         getPersistence().removeByC_R(columnId, rowId);
435     }
436 
437     public static void removeByC_C(long classNameId, long classPK)
438         throws com.liferay.portal.SystemException {
439         getPersistence().removeByC_C(classNameId, classPK);
440     }
441 
442     public static void removeByT_C_R(long tableId, long columnId, long rowId)
443         throws com.liferay.portal.SystemException,
444             com.liferay.portlet.expando.NoSuchValueException {
445         getPersistence().removeByT_C_R(tableId, columnId, rowId);
446     }
447 
448     public static void removeByT_C_C_C(long tableId, long columnId,
449         long classNameId, long classPK)
450         throws com.liferay.portal.SystemException {
451         getPersistence().removeByT_C_C_C(tableId, columnId, classNameId, classPK);
452     }
453 
454     public static void removeAll() throws com.liferay.portal.SystemException {
455         getPersistence().removeAll();
456     }
457 
458     public static int countByTableId(long tableId)
459         throws com.liferay.portal.SystemException {
460         return getPersistence().countByTableId(tableId);
461     }
462 
463     public static int countByColumnId(long columnId)
464         throws com.liferay.portal.SystemException {
465         return getPersistence().countByColumnId(columnId);
466     }
467 
468     public static int countByRowId(long rowId)
469         throws com.liferay.portal.SystemException {
470         return getPersistence().countByRowId(rowId);
471     }
472 
473     public static int countByT_R(long tableId, long rowId)
474         throws com.liferay.portal.SystemException {
475         return getPersistence().countByT_R(tableId, rowId);
476     }
477 
478     public static int countByC_R(long columnId, long rowId)
479         throws com.liferay.portal.SystemException {
480         return getPersistence().countByC_R(columnId, rowId);
481     }
482 
483     public static int countByC_C(long classNameId, long classPK)
484         throws com.liferay.portal.SystemException {
485         return getPersistence().countByC_C(classNameId, classPK);
486     }
487 
488     public static int countByT_C_R(long tableId, long columnId, long rowId)
489         throws com.liferay.portal.SystemException {
490         return getPersistence().countByT_C_R(tableId, columnId, rowId);
491     }
492 
493     public static int countByT_C_C_C(long tableId, long columnId,
494         long classNameId, long classPK)
495         throws com.liferay.portal.SystemException {
496         return getPersistence()
497                    .countByT_C_C_C(tableId, columnId, classNameId, classPK);
498     }
499 
500     public static int countAll() throws com.liferay.portal.SystemException {
501         return getPersistence().countAll();
502     }
503 
504     public static ExpandoValuePersistence getPersistence() {
505         return _persistence;
506     }
507 
508     public void setPersistence(ExpandoValuePersistence persistence) {
509         _persistence = persistence;
510     }
511 
512     private static ExpandoValuePersistence _persistence;
513 }