1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions 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   * <a href="MBMailingListUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * @author Brian Wing Shun Chan
29   *
30   */
31  public class MBMailingListUtil {
32      public static void cacheResult(
33          com.liferay.portlet.messageboards.model.MBMailingList mbMailingList) {
34          getPersistence().cacheResult(mbMailingList);
35      }
36  
37      public static void cacheResult(
38          java.util.List<com.liferay.portlet.messageboards.model.MBMailingList> mbMailingLists) {
39          getPersistence().cacheResult(mbMailingLists);
40      }
41  
42      public static void clearCache() {
43          getPersistence().clearCache();
44      }
45  
46      public static com.liferay.portlet.messageboards.model.MBMailingList create(
47          long mailingListId) {
48          return getPersistence().create(mailingListId);
49      }
50  
51      public static com.liferay.portlet.messageboards.model.MBMailingList remove(
52          long mailingListId)
53          throws com.liferay.portal.SystemException,
54              com.liferay.portlet.messageboards.NoSuchMailingListException {
55          return getPersistence().remove(mailingListId);
56      }
57  
58      public static com.liferay.portlet.messageboards.model.MBMailingList remove(
59          com.liferay.portlet.messageboards.model.MBMailingList mbMailingList)
60          throws com.liferay.portal.SystemException {
61          return getPersistence().remove(mbMailingList);
62      }
63  
64      /**
65       * @deprecated Use <code>update(MBMailingList mbMailingList, boolean merge)</code>.
66       */
67      public static com.liferay.portlet.messageboards.model.MBMailingList update(
68          com.liferay.portlet.messageboards.model.MBMailingList mbMailingList)
69          throws com.liferay.portal.SystemException {
70          return getPersistence().update(mbMailingList);
71      }
72  
73      /**
74       * Add, update, or merge, the entity. This method also calls the model
75       * listeners to trigger the proper events associated with adding, deleting,
76       * or updating an entity.
77       *
78       * @param        mbMailingList the entity to add, update, or merge
79       * @param        merge boolean value for whether to merge the entity. The
80       *                default value is false. Setting merge to true is more
81       *                expensive and should only be true when mbMailingList is
82       *                transient. See LEP-5473 for a detailed discussion of this
83       *                method.
84       * @return        true if the portlet can be displayed via Ajax
85       */
86      public static com.liferay.portlet.messageboards.model.MBMailingList update(
87          com.liferay.portlet.messageboards.model.MBMailingList mbMailingList,
88          boolean merge) throws com.liferay.portal.SystemException {
89          return getPersistence().update(mbMailingList, merge);
90      }
91  
92      public static com.liferay.portlet.messageboards.model.MBMailingList updateImpl(
93          com.liferay.portlet.messageboards.model.MBMailingList mbMailingList,
94          boolean merge) throws com.liferay.portal.SystemException {
95          return getPersistence().updateImpl(mbMailingList, merge);
96      }
97  
98      public static com.liferay.portlet.messageboards.model.MBMailingList findByPrimaryKey(
99          long mailingListId)
100         throws com.liferay.portal.SystemException,
101             com.liferay.portlet.messageboards.NoSuchMailingListException {
102         return getPersistence().findByPrimaryKey(mailingListId);
103     }
104 
105     public static com.liferay.portlet.messageboards.model.MBMailingList fetchByPrimaryKey(
106         long mailingListId) throws com.liferay.portal.SystemException {
107         return getPersistence().fetchByPrimaryKey(mailingListId);
108     }
109 
110     public static java.util.List<com.liferay.portlet.messageboards.model.MBMailingList> findByUuid(
111         java.lang.String uuid) throws com.liferay.portal.SystemException {
112         return getPersistence().findByUuid(uuid);
113     }
114 
115     public static java.util.List<com.liferay.portlet.messageboards.model.MBMailingList> findByUuid(
116         java.lang.String uuid, int start, int end)
117         throws com.liferay.portal.SystemException {
118         return getPersistence().findByUuid(uuid, start, end);
119     }
120 
121     public static java.util.List<com.liferay.portlet.messageboards.model.MBMailingList> findByUuid(
122         java.lang.String uuid, int start, int end,
123         com.liferay.portal.kernel.util.OrderByComparator obc)
124         throws com.liferay.portal.SystemException {
125         return getPersistence().findByUuid(uuid, start, end, obc);
126     }
127 
128     public static com.liferay.portlet.messageboards.model.MBMailingList findByUuid_First(
129         java.lang.String uuid,
130         com.liferay.portal.kernel.util.OrderByComparator obc)
131         throws com.liferay.portal.SystemException,
132             com.liferay.portlet.messageboards.NoSuchMailingListException {
133         return getPersistence().findByUuid_First(uuid, obc);
134     }
135 
136     public static com.liferay.portlet.messageboards.model.MBMailingList findByUuid_Last(
137         java.lang.String uuid,
138         com.liferay.portal.kernel.util.OrderByComparator obc)
139         throws com.liferay.portal.SystemException,
140             com.liferay.portlet.messageboards.NoSuchMailingListException {
141         return getPersistence().findByUuid_Last(uuid, obc);
142     }
143 
144     public static com.liferay.portlet.messageboards.model.MBMailingList[] findByUuid_PrevAndNext(
145         long mailingListId, java.lang.String uuid,
146         com.liferay.portal.kernel.util.OrderByComparator obc)
147         throws com.liferay.portal.SystemException,
148             com.liferay.portlet.messageboards.NoSuchMailingListException {
149         return getPersistence().findByUuid_PrevAndNext(mailingListId, uuid, obc);
150     }
151 
152     public static com.liferay.portlet.messageboards.model.MBMailingList findByUUID_G(
153         java.lang.String uuid, long groupId)
154         throws com.liferay.portal.SystemException,
155             com.liferay.portlet.messageboards.NoSuchMailingListException {
156         return getPersistence().findByUUID_G(uuid, groupId);
157     }
158 
159     public static com.liferay.portlet.messageboards.model.MBMailingList fetchByUUID_G(
160         java.lang.String uuid, long groupId)
161         throws com.liferay.portal.SystemException {
162         return getPersistence().fetchByUUID_G(uuid, groupId);
163     }
164 
165     public static com.liferay.portlet.messageboards.model.MBMailingList fetchByUUID_G(
166         java.lang.String uuid, long groupId, boolean retrieveFromCache)
167         throws com.liferay.portal.SystemException {
168         return getPersistence().fetchByUUID_G(uuid, groupId, retrieveFromCache);
169     }
170 
171     public static com.liferay.portlet.messageboards.model.MBMailingList findByCategoryId(
172         long categoryId)
173         throws com.liferay.portal.SystemException,
174             com.liferay.portlet.messageboards.NoSuchMailingListException {
175         return getPersistence().findByCategoryId(categoryId);
176     }
177 
178     public static com.liferay.portlet.messageboards.model.MBMailingList fetchByCategoryId(
179         long categoryId) throws com.liferay.portal.SystemException {
180         return getPersistence().fetchByCategoryId(categoryId);
181     }
182 
183     public static com.liferay.portlet.messageboards.model.MBMailingList fetchByCategoryId(
184         long categoryId, boolean retrieveFromCache)
185         throws com.liferay.portal.SystemException {
186         return getPersistence().fetchByCategoryId(categoryId, retrieveFromCache);
187     }
188 
189     public static java.util.List<com.liferay.portlet.messageboards.model.MBMailingList> findByActive(
190         boolean active) throws com.liferay.portal.SystemException {
191         return getPersistence().findByActive(active);
192     }
193 
194     public static java.util.List<com.liferay.portlet.messageboards.model.MBMailingList> findByActive(
195         boolean active, int start, int end)
196         throws com.liferay.portal.SystemException {
197         return getPersistence().findByActive(active, start, end);
198     }
199 
200     public static java.util.List<com.liferay.portlet.messageboards.model.MBMailingList> findByActive(
201         boolean active, int start, int end,
202         com.liferay.portal.kernel.util.OrderByComparator obc)
203         throws com.liferay.portal.SystemException {
204         return getPersistence().findByActive(active, start, end, obc);
205     }
206 
207     public static com.liferay.portlet.messageboards.model.MBMailingList findByActive_First(
208         boolean active, com.liferay.portal.kernel.util.OrderByComparator obc)
209         throws com.liferay.portal.SystemException,
210             com.liferay.portlet.messageboards.NoSuchMailingListException {
211         return getPersistence().findByActive_First(active, obc);
212     }
213 
214     public static com.liferay.portlet.messageboards.model.MBMailingList findByActive_Last(
215         boolean active, com.liferay.portal.kernel.util.OrderByComparator obc)
216         throws com.liferay.portal.SystemException,
217             com.liferay.portlet.messageboards.NoSuchMailingListException {
218         return getPersistence().findByActive_Last(active, obc);
219     }
220 
221     public static com.liferay.portlet.messageboards.model.MBMailingList[] findByActive_PrevAndNext(
222         long mailingListId, boolean active,
223         com.liferay.portal.kernel.util.OrderByComparator obc)
224         throws com.liferay.portal.SystemException,
225             com.liferay.portlet.messageboards.NoSuchMailingListException {
226         return getPersistence()
227                    .findByActive_PrevAndNext(mailingListId, active, obc);
228     }
229 
230     public static java.util.List<Object> findWithDynamicQuery(
231         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
232         throws com.liferay.portal.SystemException {
233         return getPersistence().findWithDynamicQuery(dynamicQuery);
234     }
235 
236     public static java.util.List<Object> findWithDynamicQuery(
237         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
238         int end) throws com.liferay.portal.SystemException {
239         return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
240     }
241 
242     public static java.util.List<com.liferay.portlet.messageboards.model.MBMailingList> findAll()
243         throws com.liferay.portal.SystemException {
244         return getPersistence().findAll();
245     }
246 
247     public static java.util.List<com.liferay.portlet.messageboards.model.MBMailingList> findAll(
248         int start, int end) throws com.liferay.portal.SystemException {
249         return getPersistence().findAll(start, end);
250     }
251 
252     public static java.util.List<com.liferay.portlet.messageboards.model.MBMailingList> findAll(
253         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
254         throws com.liferay.portal.SystemException {
255         return getPersistence().findAll(start, end, obc);
256     }
257 
258     public static void removeByUuid(java.lang.String uuid)
259         throws com.liferay.portal.SystemException {
260         getPersistence().removeByUuid(uuid);
261     }
262 
263     public static void removeByUUID_G(java.lang.String uuid, long groupId)
264         throws com.liferay.portal.SystemException,
265             com.liferay.portlet.messageboards.NoSuchMailingListException {
266         getPersistence().removeByUUID_G(uuid, groupId);
267     }
268 
269     public static void removeByCategoryId(long categoryId)
270         throws com.liferay.portal.SystemException,
271             com.liferay.portlet.messageboards.NoSuchMailingListException {
272         getPersistence().removeByCategoryId(categoryId);
273     }
274 
275     public static void removeByActive(boolean active)
276         throws com.liferay.portal.SystemException {
277         getPersistence().removeByActive(active);
278     }
279 
280     public static void removeAll() throws com.liferay.portal.SystemException {
281         getPersistence().removeAll();
282     }
283 
284     public static int countByUuid(java.lang.String uuid)
285         throws com.liferay.portal.SystemException {
286         return getPersistence().countByUuid(uuid);
287     }
288 
289     public static int countByUUID_G(java.lang.String uuid, long groupId)
290         throws com.liferay.portal.SystemException {
291         return getPersistence().countByUUID_G(uuid, groupId);
292     }
293 
294     public static int countByCategoryId(long categoryId)
295         throws com.liferay.portal.SystemException {
296         return getPersistence().countByCategoryId(categoryId);
297     }
298 
299     public static int countByActive(boolean active)
300         throws com.liferay.portal.SystemException {
301         return getPersistence().countByActive(active);
302     }
303 
304     public static int countAll() throws com.liferay.portal.SystemException {
305         return getPersistence().countAll();
306     }
307 
308     public static MBMailingListPersistence getPersistence() {
309         return _persistence;
310     }
311 
312     public void setPersistence(MBMailingListPersistence persistence) {
313         _persistence = persistence;
314     }
315 
316     private static MBMailingListPersistence _persistence;
317 }