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