1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portlet.messageboards.service.persistence;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  import com.liferay.portal.kernel.dao.orm.DynamicQuery;
19  import com.liferay.portal.kernel.exception.SystemException;
20  
21  import com.liferay.portlet.messageboards.model.MBDiscussion;
22  
23  import java.util.List;
24  
25  /**
26   * <a href="MBDiscussionUtil.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       MBDiscussionPersistence
35   * @see       MBDiscussionPersistenceImpl
36   * @generated
37   */
38  public class MBDiscussionUtil {
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 MBDiscussion remove(MBDiscussion mbDiscussion)
66          throws SystemException {
67          return getPersistence().remove(mbDiscussion);
68      }
69  
70      /**
71       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
72       */
73      public static MBDiscussion update(MBDiscussion mbDiscussion, boolean merge)
74          throws SystemException {
75          return getPersistence().update(mbDiscussion, merge);
76      }
77  
78      public static void cacheResult(
79          com.liferay.portlet.messageboards.model.MBDiscussion mbDiscussion) {
80          getPersistence().cacheResult(mbDiscussion);
81      }
82  
83      public static void cacheResult(
84          java.util.List<com.liferay.portlet.messageboards.model.MBDiscussion> mbDiscussions) {
85          getPersistence().cacheResult(mbDiscussions);
86      }
87  
88      public static com.liferay.portlet.messageboards.model.MBDiscussion create(
89          long discussionId) {
90          return getPersistence().create(discussionId);
91      }
92  
93      public static com.liferay.portlet.messageboards.model.MBDiscussion remove(
94          long discussionId)
95          throws com.liferay.portal.kernel.exception.SystemException,
96              com.liferay.portlet.messageboards.NoSuchDiscussionException {
97          return getPersistence().remove(discussionId);
98      }
99  
100     public static com.liferay.portlet.messageboards.model.MBDiscussion updateImpl(
101         com.liferay.portlet.messageboards.model.MBDiscussion mbDiscussion,
102         boolean merge)
103         throws com.liferay.portal.kernel.exception.SystemException {
104         return getPersistence().updateImpl(mbDiscussion, merge);
105     }
106 
107     public static com.liferay.portlet.messageboards.model.MBDiscussion findByPrimaryKey(
108         long discussionId)
109         throws com.liferay.portal.kernel.exception.SystemException,
110             com.liferay.portlet.messageboards.NoSuchDiscussionException {
111         return getPersistence().findByPrimaryKey(discussionId);
112     }
113 
114     public static com.liferay.portlet.messageboards.model.MBDiscussion fetchByPrimaryKey(
115         long discussionId)
116         throws com.liferay.portal.kernel.exception.SystemException {
117         return getPersistence().fetchByPrimaryKey(discussionId);
118     }
119 
120     public static java.util.List<com.liferay.portlet.messageboards.model.MBDiscussion> findByClassNameId(
121         long classNameId)
122         throws com.liferay.portal.kernel.exception.SystemException {
123         return getPersistence().findByClassNameId(classNameId);
124     }
125 
126     public static java.util.List<com.liferay.portlet.messageboards.model.MBDiscussion> findByClassNameId(
127         long classNameId, int start, int end)
128         throws com.liferay.portal.kernel.exception.SystemException {
129         return getPersistence().findByClassNameId(classNameId, start, end);
130     }
131 
132     public static java.util.List<com.liferay.portlet.messageboards.model.MBDiscussion> findByClassNameId(
133         long classNameId, int start, int end,
134         com.liferay.portal.kernel.util.OrderByComparator obc)
135         throws com.liferay.portal.kernel.exception.SystemException {
136         return getPersistence().findByClassNameId(classNameId, start, end, obc);
137     }
138 
139     public static com.liferay.portlet.messageboards.model.MBDiscussion findByClassNameId_First(
140         long classNameId, com.liferay.portal.kernel.util.OrderByComparator obc)
141         throws com.liferay.portal.kernel.exception.SystemException,
142             com.liferay.portlet.messageboards.NoSuchDiscussionException {
143         return getPersistence().findByClassNameId_First(classNameId, obc);
144     }
145 
146     public static com.liferay.portlet.messageboards.model.MBDiscussion findByClassNameId_Last(
147         long classNameId, com.liferay.portal.kernel.util.OrderByComparator obc)
148         throws com.liferay.portal.kernel.exception.SystemException,
149             com.liferay.portlet.messageboards.NoSuchDiscussionException {
150         return getPersistence().findByClassNameId_Last(classNameId, obc);
151     }
152 
153     public static com.liferay.portlet.messageboards.model.MBDiscussion[] findByClassNameId_PrevAndNext(
154         long discussionId, long classNameId,
155         com.liferay.portal.kernel.util.OrderByComparator obc)
156         throws com.liferay.portal.kernel.exception.SystemException,
157             com.liferay.portlet.messageboards.NoSuchDiscussionException {
158         return getPersistence()
159                    .findByClassNameId_PrevAndNext(discussionId, classNameId, obc);
160     }
161 
162     public static com.liferay.portlet.messageboards.model.MBDiscussion findByThreadId(
163         long threadId)
164         throws com.liferay.portal.kernel.exception.SystemException,
165             com.liferay.portlet.messageboards.NoSuchDiscussionException {
166         return getPersistence().findByThreadId(threadId);
167     }
168 
169     public static com.liferay.portlet.messageboards.model.MBDiscussion fetchByThreadId(
170         long threadId)
171         throws com.liferay.portal.kernel.exception.SystemException {
172         return getPersistence().fetchByThreadId(threadId);
173     }
174 
175     public static com.liferay.portlet.messageboards.model.MBDiscussion fetchByThreadId(
176         long threadId, boolean retrieveFromCache)
177         throws com.liferay.portal.kernel.exception.SystemException {
178         return getPersistence().fetchByThreadId(threadId, retrieveFromCache);
179     }
180 
181     public static com.liferay.portlet.messageboards.model.MBDiscussion findByC_C(
182         long classNameId, long classPK)
183         throws com.liferay.portal.kernel.exception.SystemException,
184             com.liferay.portlet.messageboards.NoSuchDiscussionException {
185         return getPersistence().findByC_C(classNameId, classPK);
186     }
187 
188     public static com.liferay.portlet.messageboards.model.MBDiscussion fetchByC_C(
189         long classNameId, long classPK)
190         throws com.liferay.portal.kernel.exception.SystemException {
191         return getPersistence().fetchByC_C(classNameId, classPK);
192     }
193 
194     public static com.liferay.portlet.messageboards.model.MBDiscussion fetchByC_C(
195         long classNameId, long classPK, boolean retrieveFromCache)
196         throws com.liferay.portal.kernel.exception.SystemException {
197         return getPersistence()
198                    .fetchByC_C(classNameId, classPK, retrieveFromCache);
199     }
200 
201     public static java.util.List<com.liferay.portlet.messageboards.model.MBDiscussion> findAll()
202         throws com.liferay.portal.kernel.exception.SystemException {
203         return getPersistence().findAll();
204     }
205 
206     public static java.util.List<com.liferay.portlet.messageboards.model.MBDiscussion> findAll(
207         int start, int end)
208         throws com.liferay.portal.kernel.exception.SystemException {
209         return getPersistence().findAll(start, end);
210     }
211 
212     public static java.util.List<com.liferay.portlet.messageboards.model.MBDiscussion> findAll(
213         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
214         throws com.liferay.portal.kernel.exception.SystemException {
215         return getPersistence().findAll(start, end, obc);
216     }
217 
218     public static void removeByClassNameId(long classNameId)
219         throws com.liferay.portal.kernel.exception.SystemException {
220         getPersistence().removeByClassNameId(classNameId);
221     }
222 
223     public static void removeByThreadId(long threadId)
224         throws com.liferay.portal.kernel.exception.SystemException,
225             com.liferay.portlet.messageboards.NoSuchDiscussionException {
226         getPersistence().removeByThreadId(threadId);
227     }
228 
229     public static void removeByC_C(long classNameId, long classPK)
230         throws com.liferay.portal.kernel.exception.SystemException,
231             com.liferay.portlet.messageboards.NoSuchDiscussionException {
232         getPersistence().removeByC_C(classNameId, classPK);
233     }
234 
235     public static void removeAll()
236         throws com.liferay.portal.kernel.exception.SystemException {
237         getPersistence().removeAll();
238     }
239 
240     public static int countByClassNameId(long classNameId)
241         throws com.liferay.portal.kernel.exception.SystemException {
242         return getPersistence().countByClassNameId(classNameId);
243     }
244 
245     public static int countByThreadId(long threadId)
246         throws com.liferay.portal.kernel.exception.SystemException {
247         return getPersistence().countByThreadId(threadId);
248     }
249 
250     public static int countByC_C(long classNameId, long classPK)
251         throws com.liferay.portal.kernel.exception.SystemException {
252         return getPersistence().countByC_C(classNameId, classPK);
253     }
254 
255     public static int countAll()
256         throws com.liferay.portal.kernel.exception.SystemException {
257         return getPersistence().countAll();
258     }
259 
260     public static MBDiscussionPersistence getPersistence() {
261         if (_persistence == null) {
262             _persistence = (MBDiscussionPersistence)PortalBeanLocatorUtil.locate(MBDiscussionPersistence.class.getName());
263         }
264 
265         return _persistence;
266     }
267 
268     public void setPersistence(MBDiscussionPersistence persistence) {
269         _persistence = persistence;
270     }
271 
272     private static MBDiscussionPersistence _persistence;
273 }