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.portlet.messageboards.service.persistence;
16  
17  import com.liferay.portal.SystemException;
18  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
19  import com.liferay.portal.kernel.dao.orm.DynamicQuery;
20  import com.liferay.portal.kernel.util.ReferenceRegistry;
21  
22  import com.liferay.portlet.messageboards.model.MBThread;
23  
24  import java.util.List;
25  
26  /**
27   * <a href="MBThreadUtil.java.html"><b><i>View Source</i></b></a>
28   *
29   * <p>
30   * ServiceBuilder generated this class. Modifications in this class will be
31   * overwritten the next time is generated.
32   * </p>
33   *
34   * @author    Brian Wing Shun Chan
35   * @see       MBThreadPersistence
36   * @see       MBThreadPersistenceImpl
37   * @generated
38   */
39  public class MBThreadUtil {
40      /**
41       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
42       */
43      public static void clearCache() {
44          getPersistence().clearCache();
45      }
46  
47      /**
48       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(MBThread)
49       */
50      public static void clearCache(MBThread mbThread) {
51          getPersistence().clearCache(mbThread);
52      }
53  
54      /**
55       * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
56       */
57      public int countWithDynamicQuery(DynamicQuery dynamicQuery)
58          throws SystemException {
59          return getPersistence().countWithDynamicQuery(dynamicQuery);
60      }
61  
62      /**
63       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
64       */
65      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
66          throws SystemException {
67          return getPersistence().findWithDynamicQuery(dynamicQuery);
68      }
69  
70      /**
71       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
72       */
73      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery,
74          int start, int end) throws SystemException {
75          return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
76      }
77  
78      /**
79       * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
80       */
81      public static MBThread remove(MBThread mbThread) throws SystemException {
82          return getPersistence().remove(mbThread);
83      }
84  
85      /**
86       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
87       */
88      public static MBThread update(MBThread mbThread, boolean merge)
89          throws SystemException {
90          return getPersistence().update(mbThread, merge);
91      }
92  
93      public static void cacheResult(
94          com.liferay.portlet.messageboards.model.MBThread mbThread) {
95          getPersistence().cacheResult(mbThread);
96      }
97  
98      public static void cacheResult(
99          java.util.List<com.liferay.portlet.messageboards.model.MBThread> mbThreads) {
100         getPersistence().cacheResult(mbThreads);
101     }
102 
103     public static com.liferay.portlet.messageboards.model.MBThread create(
104         long threadId) {
105         return getPersistence().create(threadId);
106     }
107 
108     public static com.liferay.portlet.messageboards.model.MBThread remove(
109         long threadId)
110         throws com.liferay.portal.SystemException,
111             com.liferay.portlet.messageboards.NoSuchThreadException {
112         return getPersistence().remove(threadId);
113     }
114 
115     /**
116      * @deprecated Use {@link com.liferay.portal.service.persistence.BasePersistence.#update(com.liferay.portal.model.BaseModel, boolean)}.
117      */
118     public static com.liferay.portlet.messageboards.model.MBThread update(
119         com.liferay.portlet.messageboards.model.MBThread mbThread)
120         throws com.liferay.portal.SystemException {
121         return getPersistence().update(mbThread);
122     }
123 
124     public static com.liferay.portlet.messageboards.model.MBThread updateImpl(
125         com.liferay.portlet.messageboards.model.MBThread mbThread, boolean merge)
126         throws com.liferay.portal.SystemException {
127         return getPersistence().updateImpl(mbThread, merge);
128     }
129 
130     public static com.liferay.portlet.messageboards.model.MBThread findByPrimaryKey(
131         long threadId)
132         throws com.liferay.portal.SystemException,
133             com.liferay.portlet.messageboards.NoSuchThreadException {
134         return getPersistence().findByPrimaryKey(threadId);
135     }
136 
137     public static com.liferay.portlet.messageboards.model.MBThread fetchByPrimaryKey(
138         long threadId) throws com.liferay.portal.SystemException {
139         return getPersistence().fetchByPrimaryKey(threadId);
140     }
141 
142     public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> findByGroupId(
143         long groupId) throws com.liferay.portal.SystemException {
144         return getPersistence().findByGroupId(groupId);
145     }
146 
147     public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> findByGroupId(
148         long groupId, int start, int end)
149         throws com.liferay.portal.SystemException {
150         return getPersistence().findByGroupId(groupId, start, end);
151     }
152 
153     public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> findByGroupId(
154         long groupId, int start, int end,
155         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
156         throws com.liferay.portal.SystemException {
157         return getPersistence()
158                    .findByGroupId(groupId, start, end, orderByComparator);
159     }
160 
161     public static com.liferay.portlet.messageboards.model.MBThread findByGroupId_First(
162         long groupId,
163         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
164         throws com.liferay.portal.SystemException,
165             com.liferay.portlet.messageboards.NoSuchThreadException {
166         return getPersistence().findByGroupId_First(groupId, orderByComparator);
167     }
168 
169     public static com.liferay.portlet.messageboards.model.MBThread findByGroupId_Last(
170         long groupId,
171         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
172         throws com.liferay.portal.SystemException,
173             com.liferay.portlet.messageboards.NoSuchThreadException {
174         return getPersistence().findByGroupId_Last(groupId, orderByComparator);
175     }
176 
177     public static com.liferay.portlet.messageboards.model.MBThread[] findByGroupId_PrevAndNext(
178         long threadId, long groupId,
179         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
180         throws com.liferay.portal.SystemException,
181             com.liferay.portlet.messageboards.NoSuchThreadException {
182         return getPersistence()
183                    .findByGroupId_PrevAndNext(threadId, groupId,
184             orderByComparator);
185     }
186 
187     public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> findByCategoryId(
188         long categoryId) throws com.liferay.portal.SystemException {
189         return getPersistence().findByCategoryId(categoryId);
190     }
191 
192     public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> findByCategoryId(
193         long categoryId, int start, int end)
194         throws com.liferay.portal.SystemException {
195         return getPersistence().findByCategoryId(categoryId, start, end);
196     }
197 
198     public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> findByCategoryId(
199         long categoryId, int start, int end,
200         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
201         throws com.liferay.portal.SystemException {
202         return getPersistence()
203                    .findByCategoryId(categoryId, start, end, orderByComparator);
204     }
205 
206     public static com.liferay.portlet.messageboards.model.MBThread findByCategoryId_First(
207         long categoryId,
208         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
209         throws com.liferay.portal.SystemException,
210             com.liferay.portlet.messageboards.NoSuchThreadException {
211         return getPersistence()
212                    .findByCategoryId_First(categoryId, orderByComparator);
213     }
214 
215     public static com.liferay.portlet.messageboards.model.MBThread findByCategoryId_Last(
216         long categoryId,
217         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
218         throws com.liferay.portal.SystemException,
219             com.liferay.portlet.messageboards.NoSuchThreadException {
220         return getPersistence()
221                    .findByCategoryId_Last(categoryId, orderByComparator);
222     }
223 
224     public static com.liferay.portlet.messageboards.model.MBThread[] findByCategoryId_PrevAndNext(
225         long threadId, long categoryId,
226         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
227         throws com.liferay.portal.SystemException,
228             com.liferay.portlet.messageboards.NoSuchThreadException {
229         return getPersistence()
230                    .findByCategoryId_PrevAndNext(threadId, categoryId,
231             orderByComparator);
232     }
233 
234     public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> findByC_L(
235         long categoryId, java.util.Date lastPostDate)
236         throws com.liferay.portal.SystemException {
237         return getPersistence().findByC_L(categoryId, lastPostDate);
238     }
239 
240     public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> findByC_L(
241         long categoryId, java.util.Date lastPostDate, int start, int end)
242         throws com.liferay.portal.SystemException {
243         return getPersistence().findByC_L(categoryId, lastPostDate, start, end);
244     }
245 
246     public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> findByC_L(
247         long categoryId, java.util.Date lastPostDate, int start, int end,
248         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
249         throws com.liferay.portal.SystemException {
250         return getPersistence()
251                    .findByC_L(categoryId, lastPostDate, start, end,
252             orderByComparator);
253     }
254 
255     public static com.liferay.portlet.messageboards.model.MBThread findByC_L_First(
256         long categoryId, java.util.Date lastPostDate,
257         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
258         throws com.liferay.portal.SystemException,
259             com.liferay.portlet.messageboards.NoSuchThreadException {
260         return getPersistence()
261                    .findByC_L_First(categoryId, lastPostDate, orderByComparator);
262     }
263 
264     public static com.liferay.portlet.messageboards.model.MBThread findByC_L_Last(
265         long categoryId, java.util.Date lastPostDate,
266         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
267         throws com.liferay.portal.SystemException,
268             com.liferay.portlet.messageboards.NoSuchThreadException {
269         return getPersistence()
270                    .findByC_L_Last(categoryId, lastPostDate, orderByComparator);
271     }
272 
273     public static com.liferay.portlet.messageboards.model.MBThread[] findByC_L_PrevAndNext(
274         long threadId, long categoryId, java.util.Date lastPostDate,
275         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
276         throws com.liferay.portal.SystemException,
277             com.liferay.portlet.messageboards.NoSuchThreadException {
278         return getPersistence()
279                    .findByC_L_PrevAndNext(threadId, categoryId, lastPostDate,
280             orderByComparator);
281     }
282 
283     public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> findByC_P(
284         long categoryId, double priority)
285         throws com.liferay.portal.SystemException {
286         return getPersistence().findByC_P(categoryId, priority);
287     }
288 
289     public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> findByC_P(
290         long categoryId, double priority, int start, int end)
291         throws com.liferay.portal.SystemException {
292         return getPersistence().findByC_P(categoryId, priority, start, end);
293     }
294 
295     public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> findByC_P(
296         long categoryId, double priority, int start, int end,
297         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
298         throws com.liferay.portal.SystemException {
299         return getPersistence()
300                    .findByC_P(categoryId, priority, start, end,
301             orderByComparator);
302     }
303 
304     public static com.liferay.portlet.messageboards.model.MBThread findByC_P_First(
305         long categoryId, double priority,
306         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
307         throws com.liferay.portal.SystemException,
308             com.liferay.portlet.messageboards.NoSuchThreadException {
309         return getPersistence()
310                    .findByC_P_First(categoryId, priority, orderByComparator);
311     }
312 
313     public static com.liferay.portlet.messageboards.model.MBThread findByC_P_Last(
314         long categoryId, double priority,
315         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
316         throws com.liferay.portal.SystemException,
317             com.liferay.portlet.messageboards.NoSuchThreadException {
318         return getPersistence()
319                    .findByC_P_Last(categoryId, priority, orderByComparator);
320     }
321 
322     public static com.liferay.portlet.messageboards.model.MBThread[] findByC_P_PrevAndNext(
323         long threadId, long categoryId, double priority,
324         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
325         throws com.liferay.portal.SystemException,
326             com.liferay.portlet.messageboards.NoSuchThreadException {
327         return getPersistence()
328                    .findByC_P_PrevAndNext(threadId, categoryId, priority,
329             orderByComparator);
330     }
331 
332     public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> findAll()
333         throws com.liferay.portal.SystemException {
334         return getPersistence().findAll();
335     }
336 
337     public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> findAll(
338         int start, int end) throws com.liferay.portal.SystemException {
339         return getPersistence().findAll(start, end);
340     }
341 
342     public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> findAll(
343         int start, int end,
344         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
345         throws com.liferay.portal.SystemException {
346         return getPersistence().findAll(start, end, orderByComparator);
347     }
348 
349     public static void removeByGroupId(long groupId)
350         throws com.liferay.portal.SystemException {
351         getPersistence().removeByGroupId(groupId);
352     }
353 
354     public static void removeByCategoryId(long categoryId)
355         throws com.liferay.portal.SystemException {
356         getPersistence().removeByCategoryId(categoryId);
357     }
358 
359     public static void removeByC_L(long categoryId, java.util.Date lastPostDate)
360         throws com.liferay.portal.SystemException {
361         getPersistence().removeByC_L(categoryId, lastPostDate);
362     }
363 
364     public static void removeByC_P(long categoryId, double priority)
365         throws com.liferay.portal.SystemException {
366         getPersistence().removeByC_P(categoryId, priority);
367     }
368 
369     public static void removeAll() throws com.liferay.portal.SystemException {
370         getPersistence().removeAll();
371     }
372 
373     public static int countByGroupId(long groupId)
374         throws com.liferay.portal.SystemException {
375         return getPersistence().countByGroupId(groupId);
376     }
377 
378     public static int countByCategoryId(long categoryId)
379         throws com.liferay.portal.SystemException {
380         return getPersistence().countByCategoryId(categoryId);
381     }
382 
383     public static int countByC_L(long categoryId, java.util.Date lastPostDate)
384         throws com.liferay.portal.SystemException {
385         return getPersistence().countByC_L(categoryId, lastPostDate);
386     }
387 
388     public static int countByC_P(long categoryId, double priority)
389         throws com.liferay.portal.SystemException {
390         return getPersistence().countByC_P(categoryId, priority);
391     }
392 
393     public static int countAll() throws com.liferay.portal.SystemException {
394         return getPersistence().countAll();
395     }
396 
397     public static MBThreadPersistence getPersistence() {
398         if (_persistence == null) {
399             _persistence = (MBThreadPersistence)PortalBeanLocatorUtil.locate(MBThreadPersistence.class.getName());
400 
401             ReferenceRegistry.registerReference(MBThreadUtil.class,
402                 "_persistence");
403         }
404 
405         return _persistence;
406     }
407 
408     public void setPersistence(MBThreadPersistence persistence) {
409         _persistence = persistence;
410 
411         ReferenceRegistry.registerReference(MBThreadUtil.class, "_persistence");
412     }
413 
414     private static MBThreadPersistence _persistence;
415 }