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.MBMailingList;
23  
24  import java.util.List;
25  
26  /**
27   * <a href="MBMailingListUtil.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       MBMailingListPersistence
36   * @see       MBMailingListPersistenceImpl
37   * @generated
38   */
39  public class MBMailingListUtil {
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(MBMailingList)
49       */
50      public static void clearCache(MBMailingList mbMailingList) {
51          getPersistence().clearCache(mbMailingList);
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 MBMailingList remove(MBMailingList mbMailingList)
82          throws SystemException {
83          return getPersistence().remove(mbMailingList);
84      }
85  
86      /**
87       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
88       */
89      public static MBMailingList update(MBMailingList mbMailingList,
90          boolean merge) throws SystemException {
91          return getPersistence().update(mbMailingList, merge);
92      }
93  
94      public static void cacheResult(
95          com.liferay.portlet.messageboards.model.MBMailingList mbMailingList) {
96          getPersistence().cacheResult(mbMailingList);
97      }
98  
99      public static void cacheResult(
100         java.util.List<com.liferay.portlet.messageboards.model.MBMailingList> mbMailingLists) {
101         getPersistence().cacheResult(mbMailingLists);
102     }
103 
104     public static com.liferay.portlet.messageboards.model.MBMailingList create(
105         long mailingListId) {
106         return getPersistence().create(mailingListId);
107     }
108 
109     public static com.liferay.portlet.messageboards.model.MBMailingList remove(
110         long mailingListId)
111         throws com.liferay.portal.SystemException,
112             com.liferay.portlet.messageboards.NoSuchMailingListException {
113         return getPersistence().remove(mailingListId);
114     }
115 
116     /**
117      * @deprecated Use {@link com.liferay.portal.service.persistence.BasePersistence.#update(com.liferay.portal.model.BaseModel, boolean)}.
118      */
119     public static com.liferay.portlet.messageboards.model.MBMailingList update(
120         com.liferay.portlet.messageboards.model.MBMailingList mbMailingList)
121         throws com.liferay.portal.SystemException {
122         return getPersistence().update(mbMailingList);
123     }
124 
125     public static com.liferay.portlet.messageboards.model.MBMailingList updateImpl(
126         com.liferay.portlet.messageboards.model.MBMailingList mbMailingList,
127         boolean merge) throws com.liferay.portal.SystemException {
128         return getPersistence().updateImpl(mbMailingList, merge);
129     }
130 
131     public static com.liferay.portlet.messageboards.model.MBMailingList findByPrimaryKey(
132         long mailingListId)
133         throws com.liferay.portal.SystemException,
134             com.liferay.portlet.messageboards.NoSuchMailingListException {
135         return getPersistence().findByPrimaryKey(mailingListId);
136     }
137 
138     public static com.liferay.portlet.messageboards.model.MBMailingList fetchByPrimaryKey(
139         long mailingListId) throws com.liferay.portal.SystemException {
140         return getPersistence().fetchByPrimaryKey(mailingListId);
141     }
142 
143     public static java.util.List<com.liferay.portlet.messageboards.model.MBMailingList> findByUuid(
144         java.lang.String uuid) throws com.liferay.portal.SystemException {
145         return getPersistence().findByUuid(uuid);
146     }
147 
148     public static java.util.List<com.liferay.portlet.messageboards.model.MBMailingList> findByUuid(
149         java.lang.String uuid, int start, int end)
150         throws com.liferay.portal.SystemException {
151         return getPersistence().findByUuid(uuid, start, end);
152     }
153 
154     public static java.util.List<com.liferay.portlet.messageboards.model.MBMailingList> findByUuid(
155         java.lang.String uuid, int start, int end,
156         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
157         throws com.liferay.portal.SystemException {
158         return getPersistence().findByUuid(uuid, start, end, orderByComparator);
159     }
160 
161     public static com.liferay.portlet.messageboards.model.MBMailingList findByUuid_First(
162         java.lang.String uuid,
163         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
164         throws com.liferay.portal.SystemException,
165             com.liferay.portlet.messageboards.NoSuchMailingListException {
166         return getPersistence().findByUuid_First(uuid, orderByComparator);
167     }
168 
169     public static com.liferay.portlet.messageboards.model.MBMailingList findByUuid_Last(
170         java.lang.String uuid,
171         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
172         throws com.liferay.portal.SystemException,
173             com.liferay.portlet.messageboards.NoSuchMailingListException {
174         return getPersistence().findByUuid_Last(uuid, orderByComparator);
175     }
176 
177     public static com.liferay.portlet.messageboards.model.MBMailingList[] findByUuid_PrevAndNext(
178         long mailingListId, java.lang.String uuid,
179         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
180         throws com.liferay.portal.SystemException,
181             com.liferay.portlet.messageboards.NoSuchMailingListException {
182         return getPersistence()
183                    .findByUuid_PrevAndNext(mailingListId, uuid,
184             orderByComparator);
185     }
186 
187     public static com.liferay.portlet.messageboards.model.MBMailingList findByUUID_G(
188         java.lang.String uuid, long groupId)
189         throws com.liferay.portal.SystemException,
190             com.liferay.portlet.messageboards.NoSuchMailingListException {
191         return getPersistence().findByUUID_G(uuid, groupId);
192     }
193 
194     public static com.liferay.portlet.messageboards.model.MBMailingList fetchByUUID_G(
195         java.lang.String uuid, long groupId)
196         throws com.liferay.portal.SystemException {
197         return getPersistence().fetchByUUID_G(uuid, groupId);
198     }
199 
200     public static com.liferay.portlet.messageboards.model.MBMailingList fetchByUUID_G(
201         java.lang.String uuid, long groupId, boolean retrieveFromCache)
202         throws com.liferay.portal.SystemException {
203         return getPersistence().fetchByUUID_G(uuid, groupId, retrieveFromCache);
204     }
205 
206     public static com.liferay.portlet.messageboards.model.MBMailingList findByCategoryId(
207         long categoryId)
208         throws com.liferay.portal.SystemException,
209             com.liferay.portlet.messageboards.NoSuchMailingListException {
210         return getPersistence().findByCategoryId(categoryId);
211     }
212 
213     public static com.liferay.portlet.messageboards.model.MBMailingList fetchByCategoryId(
214         long categoryId) throws com.liferay.portal.SystemException {
215         return getPersistence().fetchByCategoryId(categoryId);
216     }
217 
218     public static com.liferay.portlet.messageboards.model.MBMailingList fetchByCategoryId(
219         long categoryId, boolean retrieveFromCache)
220         throws com.liferay.portal.SystemException {
221         return getPersistence().fetchByCategoryId(categoryId, retrieveFromCache);
222     }
223 
224     public static java.util.List<com.liferay.portlet.messageboards.model.MBMailingList> findByActive(
225         boolean active) throws com.liferay.portal.SystemException {
226         return getPersistence().findByActive(active);
227     }
228 
229     public static java.util.List<com.liferay.portlet.messageboards.model.MBMailingList> findByActive(
230         boolean active, int start, int end)
231         throws com.liferay.portal.SystemException {
232         return getPersistence().findByActive(active, start, end);
233     }
234 
235     public static java.util.List<com.liferay.portlet.messageboards.model.MBMailingList> findByActive(
236         boolean active, int start, int end,
237         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
238         throws com.liferay.portal.SystemException {
239         return getPersistence()
240                    .findByActive(active, start, end, orderByComparator);
241     }
242 
243     public static com.liferay.portlet.messageboards.model.MBMailingList findByActive_First(
244         boolean active,
245         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
246         throws com.liferay.portal.SystemException,
247             com.liferay.portlet.messageboards.NoSuchMailingListException {
248         return getPersistence().findByActive_First(active, orderByComparator);
249     }
250 
251     public static com.liferay.portlet.messageboards.model.MBMailingList findByActive_Last(
252         boolean active,
253         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
254         throws com.liferay.portal.SystemException,
255             com.liferay.portlet.messageboards.NoSuchMailingListException {
256         return getPersistence().findByActive_Last(active, orderByComparator);
257     }
258 
259     public static com.liferay.portlet.messageboards.model.MBMailingList[] findByActive_PrevAndNext(
260         long mailingListId, boolean active,
261         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
262         throws com.liferay.portal.SystemException,
263             com.liferay.portlet.messageboards.NoSuchMailingListException {
264         return getPersistence()
265                    .findByActive_PrevAndNext(mailingListId, active,
266             orderByComparator);
267     }
268 
269     public static java.util.List<com.liferay.portlet.messageboards.model.MBMailingList> findAll()
270         throws com.liferay.portal.SystemException {
271         return getPersistence().findAll();
272     }
273 
274     public static java.util.List<com.liferay.portlet.messageboards.model.MBMailingList> findAll(
275         int start, int end) throws com.liferay.portal.SystemException {
276         return getPersistence().findAll(start, end);
277     }
278 
279     public static java.util.List<com.liferay.portlet.messageboards.model.MBMailingList> findAll(
280         int start, int end,
281         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
282         throws com.liferay.portal.SystemException {
283         return getPersistence().findAll(start, end, orderByComparator);
284     }
285 
286     public static void removeByUuid(java.lang.String uuid)
287         throws com.liferay.portal.SystemException {
288         getPersistence().removeByUuid(uuid);
289     }
290 
291     public static void removeByUUID_G(java.lang.String uuid, long groupId)
292         throws com.liferay.portal.SystemException,
293             com.liferay.portlet.messageboards.NoSuchMailingListException {
294         getPersistence().removeByUUID_G(uuid, groupId);
295     }
296 
297     public static void removeByCategoryId(long categoryId)
298         throws com.liferay.portal.SystemException,
299             com.liferay.portlet.messageboards.NoSuchMailingListException {
300         getPersistence().removeByCategoryId(categoryId);
301     }
302 
303     public static void removeByActive(boolean active)
304         throws com.liferay.portal.SystemException {
305         getPersistence().removeByActive(active);
306     }
307 
308     public static void removeAll() throws com.liferay.portal.SystemException {
309         getPersistence().removeAll();
310     }
311 
312     public static int countByUuid(java.lang.String uuid)
313         throws com.liferay.portal.SystemException {
314         return getPersistence().countByUuid(uuid);
315     }
316 
317     public static int countByUUID_G(java.lang.String uuid, long groupId)
318         throws com.liferay.portal.SystemException {
319         return getPersistence().countByUUID_G(uuid, groupId);
320     }
321 
322     public static int countByCategoryId(long categoryId)
323         throws com.liferay.portal.SystemException {
324         return getPersistence().countByCategoryId(categoryId);
325     }
326 
327     public static int countByActive(boolean active)
328         throws com.liferay.portal.SystemException {
329         return getPersistence().countByActive(active);
330     }
331 
332     public static int countAll() throws com.liferay.portal.SystemException {
333         return getPersistence().countAll();
334     }
335 
336     public static MBMailingListPersistence getPersistence() {
337         if (_persistence == null) {
338             _persistence = (MBMailingListPersistence)PortalBeanLocatorUtil.locate(MBMailingListPersistence.class.getName());
339 
340             ReferenceRegistry.registerReference(MBMailingListUtil.class,
341                 "_persistence");
342         }
343 
344         return _persistence;
345     }
346 
347     public void setPersistence(MBMailingListPersistence persistence) {
348         _persistence = persistence;
349 
350         ReferenceRegistry.registerReference(MBMailingListUtil.class,
351             "_persistence");
352     }
353 
354     private static MBMailingListPersistence _persistence;
355 }