1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    *
5    *
6    *
7    * The contents of this file are subject to the terms of the Liferay Enterprise
8    * Subscription License ("License"). You may not use this file except in
9    * compliance with the License. You can obtain a copy of the License by
10   * contacting Liferay, Inc. See the License for the specific language governing
11   * permissions and limitations under the License, including but not limited to
12   * distribution rights 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.messageboards.service.persistence;
24  
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      public static void cacheResult(
41          com.liferay.portlet.messageboards.model.MBThread mbThread) {
42          getPersistence().cacheResult(mbThread);
43      }
44  
45      public static void cacheResult(
46          java.util.List<com.liferay.portlet.messageboards.model.MBThread> mbThreads) {
47          getPersistence().cacheResult(mbThreads);
48      }
49  
50      public static void clearCache() {
51          getPersistence().clearCache();
52      }
53  
54      public static com.liferay.portlet.messageboards.model.MBThread create(
55          long threadId) {
56          return getPersistence().create(threadId);
57      }
58  
59      public static com.liferay.portlet.messageboards.model.MBThread remove(
60          long threadId)
61          throws com.liferay.portal.SystemException,
62              com.liferay.portlet.messageboards.NoSuchThreadException {
63          return getPersistence().remove(threadId);
64      }
65  
66      public static com.liferay.portlet.messageboards.model.MBThread remove(
67          com.liferay.portlet.messageboards.model.MBThread mbThread)
68          throws com.liferay.portal.SystemException {
69          return getPersistence().remove(mbThread);
70      }
71  
72      /**
73       * @deprecated Use {@link #update(MBThread, boolean merge)}.
74       */
75      public static com.liferay.portlet.messageboards.model.MBThread update(
76          com.liferay.portlet.messageboards.model.MBThread mbThread)
77          throws com.liferay.portal.SystemException {
78          return getPersistence().update(mbThread);
79      }
80  
81      /**
82       * Add, update, or merge, the entity. This method also calls the model
83       * listeners to trigger the proper events associated with adding, deleting,
84       * or updating an entity.
85       *
86       * @param  mbThread the entity to add, update, or merge
87       * @param  merge boolean value for whether to merge the entity. The default
88       *         value is false. Setting merge to true is more expensive and
89       *         should only be true when mbThread is transient. See
90       *         LEP-5473 for a detailed discussion of this method.
91       * @return the entity that was added, updated, or merged
92       */
93      public static com.liferay.portlet.messageboards.model.MBThread update(
94          com.liferay.portlet.messageboards.model.MBThread mbThread, boolean merge)
95          throws com.liferay.portal.SystemException {
96          return getPersistence().update(mbThread, merge);
97      }
98  
99      public static com.liferay.portlet.messageboards.model.MBThread updateImpl(
100         com.liferay.portlet.messageboards.model.MBThread mbThread, boolean merge)
101         throws com.liferay.portal.SystemException {
102         return getPersistence().updateImpl(mbThread, merge);
103     }
104 
105     public static com.liferay.portlet.messageboards.model.MBThread findByPrimaryKey(
106         long threadId)
107         throws com.liferay.portal.SystemException,
108             com.liferay.portlet.messageboards.NoSuchThreadException {
109         return getPersistence().findByPrimaryKey(threadId);
110     }
111 
112     public static com.liferay.portlet.messageboards.model.MBThread fetchByPrimaryKey(
113         long threadId) throws com.liferay.portal.SystemException {
114         return getPersistence().fetchByPrimaryKey(threadId);
115     }
116 
117     public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> findByGroupId(
118         long groupId) throws com.liferay.portal.SystemException {
119         return getPersistence().findByGroupId(groupId);
120     }
121 
122     public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> findByGroupId(
123         long groupId, int start, int end)
124         throws com.liferay.portal.SystemException {
125         return getPersistence().findByGroupId(groupId, start, end);
126     }
127 
128     public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> findByGroupId(
129         long groupId, int start, int end,
130         com.liferay.portal.kernel.util.OrderByComparator obc)
131         throws com.liferay.portal.SystemException {
132         return getPersistence().findByGroupId(groupId, start, end, obc);
133     }
134 
135     public static com.liferay.portlet.messageboards.model.MBThread findByGroupId_First(
136         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
137         throws com.liferay.portal.SystemException,
138             com.liferay.portlet.messageboards.NoSuchThreadException {
139         return getPersistence().findByGroupId_First(groupId, obc);
140     }
141 
142     public static com.liferay.portlet.messageboards.model.MBThread findByGroupId_Last(
143         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
144         throws com.liferay.portal.SystemException,
145             com.liferay.portlet.messageboards.NoSuchThreadException {
146         return getPersistence().findByGroupId_Last(groupId, obc);
147     }
148 
149     public static com.liferay.portlet.messageboards.model.MBThread[] findByGroupId_PrevAndNext(
150         long threadId, long groupId,
151         com.liferay.portal.kernel.util.OrderByComparator obc)
152         throws com.liferay.portal.SystemException,
153             com.liferay.portlet.messageboards.NoSuchThreadException {
154         return getPersistence().findByGroupId_PrevAndNext(threadId, groupId, obc);
155     }
156 
157     public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> findByCategoryId(
158         long categoryId) throws com.liferay.portal.SystemException {
159         return getPersistence().findByCategoryId(categoryId);
160     }
161 
162     public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> findByCategoryId(
163         long categoryId, int start, int end)
164         throws com.liferay.portal.SystemException {
165         return getPersistence().findByCategoryId(categoryId, start, end);
166     }
167 
168     public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> findByCategoryId(
169         long categoryId, int start, int end,
170         com.liferay.portal.kernel.util.OrderByComparator obc)
171         throws com.liferay.portal.SystemException {
172         return getPersistence().findByCategoryId(categoryId, start, end, obc);
173     }
174 
175     public static com.liferay.portlet.messageboards.model.MBThread findByCategoryId_First(
176         long categoryId, com.liferay.portal.kernel.util.OrderByComparator obc)
177         throws com.liferay.portal.SystemException,
178             com.liferay.portlet.messageboards.NoSuchThreadException {
179         return getPersistence().findByCategoryId_First(categoryId, obc);
180     }
181 
182     public static com.liferay.portlet.messageboards.model.MBThread findByCategoryId_Last(
183         long categoryId, com.liferay.portal.kernel.util.OrderByComparator obc)
184         throws com.liferay.portal.SystemException,
185             com.liferay.portlet.messageboards.NoSuchThreadException {
186         return getPersistence().findByCategoryId_Last(categoryId, obc);
187     }
188 
189     public static com.liferay.portlet.messageboards.model.MBThread[] findByCategoryId_PrevAndNext(
190         long threadId, long categoryId,
191         com.liferay.portal.kernel.util.OrderByComparator obc)
192         throws com.liferay.portal.SystemException,
193             com.liferay.portlet.messageboards.NoSuchThreadException {
194         return getPersistence()
195                    .findByCategoryId_PrevAndNext(threadId, categoryId, obc);
196     }
197 
198     public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> findByC_L(
199         long categoryId, java.util.Date lastPostDate)
200         throws com.liferay.portal.SystemException {
201         return getPersistence().findByC_L(categoryId, lastPostDate);
202     }
203 
204     public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> findByC_L(
205         long categoryId, java.util.Date lastPostDate, int start, int end)
206         throws com.liferay.portal.SystemException {
207         return getPersistence().findByC_L(categoryId, lastPostDate, start, end);
208     }
209 
210     public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> findByC_L(
211         long categoryId, java.util.Date lastPostDate, int start, int end,
212         com.liferay.portal.kernel.util.OrderByComparator obc)
213         throws com.liferay.portal.SystemException {
214         return getPersistence()
215                    .findByC_L(categoryId, lastPostDate, start, end, obc);
216     }
217 
218     public static com.liferay.portlet.messageboards.model.MBThread findByC_L_First(
219         long categoryId, java.util.Date lastPostDate,
220         com.liferay.portal.kernel.util.OrderByComparator obc)
221         throws com.liferay.portal.SystemException,
222             com.liferay.portlet.messageboards.NoSuchThreadException {
223         return getPersistence().findByC_L_First(categoryId, lastPostDate, obc);
224     }
225 
226     public static com.liferay.portlet.messageboards.model.MBThread findByC_L_Last(
227         long categoryId, java.util.Date lastPostDate,
228         com.liferay.portal.kernel.util.OrderByComparator obc)
229         throws com.liferay.portal.SystemException,
230             com.liferay.portlet.messageboards.NoSuchThreadException {
231         return getPersistence().findByC_L_Last(categoryId, lastPostDate, obc);
232     }
233 
234     public static com.liferay.portlet.messageboards.model.MBThread[] findByC_L_PrevAndNext(
235         long threadId, long categoryId, java.util.Date lastPostDate,
236         com.liferay.portal.kernel.util.OrderByComparator obc)
237         throws com.liferay.portal.SystemException,
238             com.liferay.portlet.messageboards.NoSuchThreadException {
239         return getPersistence()
240                    .findByC_L_PrevAndNext(threadId, categoryId, lastPostDate,
241             obc);
242     }
243 
244     public static java.util.List<Object> findWithDynamicQuery(
245         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
246         throws com.liferay.portal.SystemException {
247         return getPersistence().findWithDynamicQuery(dynamicQuery);
248     }
249 
250     public static java.util.List<Object> findWithDynamicQuery(
251         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
252         int end) throws com.liferay.portal.SystemException {
253         return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
254     }
255 
256     public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> findAll()
257         throws com.liferay.portal.SystemException {
258         return getPersistence().findAll();
259     }
260 
261     public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> findAll(
262         int start, int end) throws com.liferay.portal.SystemException {
263         return getPersistence().findAll(start, end);
264     }
265 
266     public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> findAll(
267         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
268         throws com.liferay.portal.SystemException {
269         return getPersistence().findAll(start, end, obc);
270     }
271 
272     public static void removeByGroupId(long groupId)
273         throws com.liferay.portal.SystemException {
274         getPersistence().removeByGroupId(groupId);
275     }
276 
277     public static void removeByCategoryId(long categoryId)
278         throws com.liferay.portal.SystemException {
279         getPersistence().removeByCategoryId(categoryId);
280     }
281 
282     public static void removeByC_L(long categoryId, java.util.Date lastPostDate)
283         throws com.liferay.portal.SystemException {
284         getPersistence().removeByC_L(categoryId, lastPostDate);
285     }
286 
287     public static void removeAll() throws com.liferay.portal.SystemException {
288         getPersistence().removeAll();
289     }
290 
291     public static int countByGroupId(long groupId)
292         throws com.liferay.portal.SystemException {
293         return getPersistence().countByGroupId(groupId);
294     }
295 
296     public static int countByCategoryId(long categoryId)
297         throws com.liferay.portal.SystemException {
298         return getPersistence().countByCategoryId(categoryId);
299     }
300 
301     public static int countByC_L(long categoryId, java.util.Date lastPostDate)
302         throws com.liferay.portal.SystemException {
303         return getPersistence().countByC_L(categoryId, lastPostDate);
304     }
305 
306     public static int countAll() throws com.liferay.portal.SystemException {
307         return getPersistence().countAll();
308     }
309 
310     public static MBThreadPersistence getPersistence() {
311         return _persistence;
312     }
313 
314     public void setPersistence(MBThreadPersistence persistence) {
315         _persistence = persistence;
316     }
317 
318     private static MBThreadPersistence _persistence;
319 }