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 com.liferay.portlet.messageboards.model.MBMailingList create(
33          long mailingListId) {
34          return getPersistence().create(mailingListId);
35      }
36  
37      public static com.liferay.portlet.messageboards.model.MBMailingList remove(
38          long mailingListId)
39          throws com.liferay.portal.SystemException,
40              com.liferay.portlet.messageboards.NoSuchMailingListException {
41          return getPersistence().remove(mailingListId);
42      }
43  
44      public static com.liferay.portlet.messageboards.model.MBMailingList remove(
45          com.liferay.portlet.messageboards.model.MBMailingList mbMailingList)
46          throws com.liferay.portal.SystemException {
47          return getPersistence().remove(mbMailingList);
48      }
49  
50      /**
51       * @deprecated Use <code>update(MBMailingList mbMailingList, boolean merge)</code>.
52       */
53      public static com.liferay.portlet.messageboards.model.MBMailingList update(
54          com.liferay.portlet.messageboards.model.MBMailingList mbMailingList)
55          throws com.liferay.portal.SystemException {
56          return getPersistence().update(mbMailingList);
57      }
58  
59      /**
60       * Add, update, or merge, the entity. This method also calls the model
61       * listeners to trigger the proper events associated with adding, deleting,
62       * or updating an entity.
63       *
64       * @param        mbMailingList the entity to add, update, or merge
65       * @param        merge boolean value for whether to merge the entity. The
66       *                default value is false. Setting merge to true is more
67       *                expensive and should only be true when mbMailingList is
68       *                transient. See LEP-5473 for a detailed discussion of this
69       *                method.
70       * @return        true if the portlet can be displayed via Ajax
71       */
72      public static com.liferay.portlet.messageboards.model.MBMailingList update(
73          com.liferay.portlet.messageboards.model.MBMailingList mbMailingList,
74          boolean merge) throws com.liferay.portal.SystemException {
75          return getPersistence().update(mbMailingList, merge);
76      }
77  
78      public static com.liferay.portlet.messageboards.model.MBMailingList updateImpl(
79          com.liferay.portlet.messageboards.model.MBMailingList mbMailingList,
80          boolean merge) throws com.liferay.portal.SystemException {
81          return getPersistence().updateImpl(mbMailingList, merge);
82      }
83  
84      public static com.liferay.portlet.messageboards.model.MBMailingList findByPrimaryKey(
85          long mailingListId)
86          throws com.liferay.portal.SystemException,
87              com.liferay.portlet.messageboards.NoSuchMailingListException {
88          return getPersistence().findByPrimaryKey(mailingListId);
89      }
90  
91      public static com.liferay.portlet.messageboards.model.MBMailingList fetchByPrimaryKey(
92          long mailingListId) throws com.liferay.portal.SystemException {
93          return getPersistence().fetchByPrimaryKey(mailingListId);
94      }
95  
96      public static java.util.List<com.liferay.portlet.messageboards.model.MBMailingList> findByUuid(
97          java.lang.String uuid) throws com.liferay.portal.SystemException {
98          return getPersistence().findByUuid(uuid);
99      }
100 
101     public static java.util.List<com.liferay.portlet.messageboards.model.MBMailingList> findByUuid(
102         java.lang.String uuid, int start, int end)
103         throws com.liferay.portal.SystemException {
104         return getPersistence().findByUuid(uuid, start, end);
105     }
106 
107     public static java.util.List<com.liferay.portlet.messageboards.model.MBMailingList> findByUuid(
108         java.lang.String uuid, int start, int end,
109         com.liferay.portal.kernel.util.OrderByComparator obc)
110         throws com.liferay.portal.SystemException {
111         return getPersistence().findByUuid(uuid, start, end, obc);
112     }
113 
114     public static com.liferay.portlet.messageboards.model.MBMailingList findByUuid_First(
115         java.lang.String uuid,
116         com.liferay.portal.kernel.util.OrderByComparator obc)
117         throws com.liferay.portal.SystemException,
118             com.liferay.portlet.messageboards.NoSuchMailingListException {
119         return getPersistence().findByUuid_First(uuid, obc);
120     }
121 
122     public static com.liferay.portlet.messageboards.model.MBMailingList findByUuid_Last(
123         java.lang.String uuid,
124         com.liferay.portal.kernel.util.OrderByComparator obc)
125         throws com.liferay.portal.SystemException,
126             com.liferay.portlet.messageboards.NoSuchMailingListException {
127         return getPersistence().findByUuid_Last(uuid, obc);
128     }
129 
130     public static com.liferay.portlet.messageboards.model.MBMailingList[] findByUuid_PrevAndNext(
131         long mailingListId, java.lang.String uuid,
132         com.liferay.portal.kernel.util.OrderByComparator obc)
133         throws com.liferay.portal.SystemException,
134             com.liferay.portlet.messageboards.NoSuchMailingListException {
135         return getPersistence().findByUuid_PrevAndNext(mailingListId, uuid, obc);
136     }
137 
138     public static com.liferay.portlet.messageboards.model.MBMailingList findByUUID_G(
139         java.lang.String uuid, long groupId)
140         throws com.liferay.portal.SystemException,
141             com.liferay.portlet.messageboards.NoSuchMailingListException {
142         return getPersistence().findByUUID_G(uuid, groupId);
143     }
144 
145     public static com.liferay.portlet.messageboards.model.MBMailingList fetchByUUID_G(
146         java.lang.String uuid, long groupId)
147         throws com.liferay.portal.SystemException {
148         return getPersistence().fetchByUUID_G(uuid, groupId);
149     }
150 
151     public static com.liferay.portlet.messageboards.model.MBMailingList findByCategoryId(
152         long categoryId)
153         throws com.liferay.portal.SystemException,
154             com.liferay.portlet.messageboards.NoSuchMailingListException {
155         return getPersistence().findByCategoryId(categoryId);
156     }
157 
158     public static com.liferay.portlet.messageboards.model.MBMailingList fetchByCategoryId(
159         long categoryId) throws com.liferay.portal.SystemException {
160         return getPersistence().fetchByCategoryId(categoryId);
161     }
162 
163     public static java.util.List<com.liferay.portlet.messageboards.model.MBMailingList> findByActive(
164         boolean active) throws com.liferay.portal.SystemException {
165         return getPersistence().findByActive(active);
166     }
167 
168     public static java.util.List<com.liferay.portlet.messageboards.model.MBMailingList> findByActive(
169         boolean active, int start, int end)
170         throws com.liferay.portal.SystemException {
171         return getPersistence().findByActive(active, start, end);
172     }
173 
174     public static java.util.List<com.liferay.portlet.messageboards.model.MBMailingList> findByActive(
175         boolean active, int start, int end,
176         com.liferay.portal.kernel.util.OrderByComparator obc)
177         throws com.liferay.portal.SystemException {
178         return getPersistence().findByActive(active, start, end, obc);
179     }
180 
181     public static com.liferay.portlet.messageboards.model.MBMailingList findByActive_First(
182         boolean active, com.liferay.portal.kernel.util.OrderByComparator obc)
183         throws com.liferay.portal.SystemException,
184             com.liferay.portlet.messageboards.NoSuchMailingListException {
185         return getPersistence().findByActive_First(active, obc);
186     }
187 
188     public static com.liferay.portlet.messageboards.model.MBMailingList findByActive_Last(
189         boolean active, com.liferay.portal.kernel.util.OrderByComparator obc)
190         throws com.liferay.portal.SystemException,
191             com.liferay.portlet.messageboards.NoSuchMailingListException {
192         return getPersistence().findByActive_Last(active, obc);
193     }
194 
195     public static com.liferay.portlet.messageboards.model.MBMailingList[] findByActive_PrevAndNext(
196         long mailingListId, boolean active,
197         com.liferay.portal.kernel.util.OrderByComparator obc)
198         throws com.liferay.portal.SystemException,
199             com.liferay.portlet.messageboards.NoSuchMailingListException {
200         return getPersistence()
201                    .findByActive_PrevAndNext(mailingListId, active, obc);
202     }
203 
204     public static java.util.List<Object> findWithDynamicQuery(
205         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
206         throws com.liferay.portal.SystemException {
207         return getPersistence().findWithDynamicQuery(dynamicQuery);
208     }
209 
210     public static java.util.List<Object> findWithDynamicQuery(
211         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
212         int end) throws com.liferay.portal.SystemException {
213         return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
214     }
215 
216     public static java.util.List<com.liferay.portlet.messageboards.model.MBMailingList> findAll()
217         throws com.liferay.portal.SystemException {
218         return getPersistence().findAll();
219     }
220 
221     public static java.util.List<com.liferay.portlet.messageboards.model.MBMailingList> findAll(
222         int start, int end) throws com.liferay.portal.SystemException {
223         return getPersistence().findAll(start, end);
224     }
225 
226     public static java.util.List<com.liferay.portlet.messageboards.model.MBMailingList> findAll(
227         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
228         throws com.liferay.portal.SystemException {
229         return getPersistence().findAll(start, end, obc);
230     }
231 
232     public static void removeByUuid(java.lang.String uuid)
233         throws com.liferay.portal.SystemException {
234         getPersistence().removeByUuid(uuid);
235     }
236 
237     public static void removeByUUID_G(java.lang.String uuid, long groupId)
238         throws com.liferay.portal.SystemException,
239             com.liferay.portlet.messageboards.NoSuchMailingListException {
240         getPersistence().removeByUUID_G(uuid, groupId);
241     }
242 
243     public static void removeByCategoryId(long categoryId)
244         throws com.liferay.portal.SystemException,
245             com.liferay.portlet.messageboards.NoSuchMailingListException {
246         getPersistence().removeByCategoryId(categoryId);
247     }
248 
249     public static void removeByActive(boolean active)
250         throws com.liferay.portal.SystemException {
251         getPersistence().removeByActive(active);
252     }
253 
254     public static void removeAll() throws com.liferay.portal.SystemException {
255         getPersistence().removeAll();
256     }
257 
258     public static int countByUuid(java.lang.String uuid)
259         throws com.liferay.portal.SystemException {
260         return getPersistence().countByUuid(uuid);
261     }
262 
263     public static int countByUUID_G(java.lang.String uuid, long groupId)
264         throws com.liferay.portal.SystemException {
265         return getPersistence().countByUUID_G(uuid, groupId);
266     }
267 
268     public static int countByCategoryId(long categoryId)
269         throws com.liferay.portal.SystemException {
270         return getPersistence().countByCategoryId(categoryId);
271     }
272 
273     public static int countByActive(boolean active)
274         throws com.liferay.portal.SystemException {
275         return getPersistence().countByActive(active);
276     }
277 
278     public static int countAll() throws com.liferay.portal.SystemException {
279         return getPersistence().countAll();
280     }
281 
282     public static MBMailingListPersistence getPersistence() {
283         return _persistence;
284     }
285 
286     public void setPersistence(MBMailingListPersistence persistence) {
287         _persistence = persistence;
288     }
289 
290     private static MBMailingListPersistence _persistence;
291 }