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