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.announcements.service.persistence;
24  
25  
26  /**
27   * <a href="AnnouncementsEntryUtil.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       AnnouncementsEntryPersistence
36   * @see       AnnouncementsEntryPersistenceImpl
37   * @generated
38   */
39  public class AnnouncementsEntryUtil {
40      public static void cacheResult(
41          com.liferay.portlet.announcements.model.AnnouncementsEntry announcementsEntry) {
42          getPersistence().cacheResult(announcementsEntry);
43      }
44  
45      public static void cacheResult(
46          java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> announcementsEntries) {
47          getPersistence().cacheResult(announcementsEntries);
48      }
49  
50      public static void clearCache() {
51          getPersistence().clearCache();
52      }
53  
54      public static com.liferay.portlet.announcements.model.AnnouncementsEntry create(
55          long entryId) {
56          return getPersistence().create(entryId);
57      }
58  
59      public static com.liferay.portlet.announcements.model.AnnouncementsEntry remove(
60          long entryId)
61          throws com.liferay.portal.SystemException,
62              com.liferay.portlet.announcements.NoSuchEntryException {
63          return getPersistence().remove(entryId);
64      }
65  
66      public static com.liferay.portlet.announcements.model.AnnouncementsEntry remove(
67          com.liferay.portlet.announcements.model.AnnouncementsEntry announcementsEntry)
68          throws com.liferay.portal.SystemException {
69          return getPersistence().remove(announcementsEntry);
70      }
71  
72      /**
73       * @deprecated Use {@link #update(AnnouncementsEntry, boolean merge)}.
74       */
75      public static com.liferay.portlet.announcements.model.AnnouncementsEntry update(
76          com.liferay.portlet.announcements.model.AnnouncementsEntry announcementsEntry)
77          throws com.liferay.portal.SystemException {
78          return getPersistence().update(announcementsEntry);
79      }
80  
81      /**
82       * Add, update, or merge, the entity. This method also calls the model
83       * listeners to trigger the proper events associated with adding, deleting,
84       * or updating an entity.
85       *
86       * @param  announcementsEntry the entity to add, update, or merge
87       * @param  merge boolean value for whether to merge the entity. The default
88       *         value is false. Setting merge to true is more expensive and
89       *         should only be true when announcementsEntry is transient. See
90       *         LEP-5473 for a detailed discussion of this method.
91       * @return the entity that was added, updated, or merged
92       */
93      public static com.liferay.portlet.announcements.model.AnnouncementsEntry update(
94          com.liferay.portlet.announcements.model.AnnouncementsEntry announcementsEntry,
95          boolean merge) throws com.liferay.portal.SystemException {
96          return getPersistence().update(announcementsEntry, merge);
97      }
98  
99      public static com.liferay.portlet.announcements.model.AnnouncementsEntry updateImpl(
100         com.liferay.portlet.announcements.model.AnnouncementsEntry announcementsEntry,
101         boolean merge) throws com.liferay.portal.SystemException {
102         return getPersistence().updateImpl(announcementsEntry, merge);
103     }
104 
105     public static com.liferay.portlet.announcements.model.AnnouncementsEntry findByPrimaryKey(
106         long entryId)
107         throws com.liferay.portal.SystemException,
108             com.liferay.portlet.announcements.NoSuchEntryException {
109         return getPersistence().findByPrimaryKey(entryId);
110     }
111 
112     public static com.liferay.portlet.announcements.model.AnnouncementsEntry fetchByPrimaryKey(
113         long entryId) throws com.liferay.portal.SystemException {
114         return getPersistence().fetchByPrimaryKey(entryId);
115     }
116 
117     public static java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findByUuid(
118         java.lang.String uuid) throws com.liferay.portal.SystemException {
119         return getPersistence().findByUuid(uuid);
120     }
121 
122     public static java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findByUuid(
123         java.lang.String uuid, int start, int end)
124         throws com.liferay.portal.SystemException {
125         return getPersistence().findByUuid(uuid, start, end);
126     }
127 
128     public static java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findByUuid(
129         java.lang.String uuid, int start, int end,
130         com.liferay.portal.kernel.util.OrderByComparator obc)
131         throws com.liferay.portal.SystemException {
132         return getPersistence().findByUuid(uuid, start, end, obc);
133     }
134 
135     public static com.liferay.portlet.announcements.model.AnnouncementsEntry findByUuid_First(
136         java.lang.String uuid,
137         com.liferay.portal.kernel.util.OrderByComparator obc)
138         throws com.liferay.portal.SystemException,
139             com.liferay.portlet.announcements.NoSuchEntryException {
140         return getPersistence().findByUuid_First(uuid, obc);
141     }
142 
143     public static com.liferay.portlet.announcements.model.AnnouncementsEntry findByUuid_Last(
144         java.lang.String uuid,
145         com.liferay.portal.kernel.util.OrderByComparator obc)
146         throws com.liferay.portal.SystemException,
147             com.liferay.portlet.announcements.NoSuchEntryException {
148         return getPersistence().findByUuid_Last(uuid, obc);
149     }
150 
151     public static com.liferay.portlet.announcements.model.AnnouncementsEntry[] findByUuid_PrevAndNext(
152         long entryId, java.lang.String uuid,
153         com.liferay.portal.kernel.util.OrderByComparator obc)
154         throws com.liferay.portal.SystemException,
155             com.liferay.portlet.announcements.NoSuchEntryException {
156         return getPersistence().findByUuid_PrevAndNext(entryId, uuid, obc);
157     }
158 
159     public static java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findByUserId(
160         long userId) throws com.liferay.portal.SystemException {
161         return getPersistence().findByUserId(userId);
162     }
163 
164     public static java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findByUserId(
165         long userId, int start, int end)
166         throws com.liferay.portal.SystemException {
167         return getPersistence().findByUserId(userId, start, end);
168     }
169 
170     public static java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findByUserId(
171         long userId, int start, int end,
172         com.liferay.portal.kernel.util.OrderByComparator obc)
173         throws com.liferay.portal.SystemException {
174         return getPersistence().findByUserId(userId, start, end, obc);
175     }
176 
177     public static com.liferay.portlet.announcements.model.AnnouncementsEntry findByUserId_First(
178         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
179         throws com.liferay.portal.SystemException,
180             com.liferay.portlet.announcements.NoSuchEntryException {
181         return getPersistence().findByUserId_First(userId, obc);
182     }
183 
184     public static com.liferay.portlet.announcements.model.AnnouncementsEntry findByUserId_Last(
185         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
186         throws com.liferay.portal.SystemException,
187             com.liferay.portlet.announcements.NoSuchEntryException {
188         return getPersistence().findByUserId_Last(userId, obc);
189     }
190 
191     public static com.liferay.portlet.announcements.model.AnnouncementsEntry[] findByUserId_PrevAndNext(
192         long entryId, long userId,
193         com.liferay.portal.kernel.util.OrderByComparator obc)
194         throws com.liferay.portal.SystemException,
195             com.liferay.portlet.announcements.NoSuchEntryException {
196         return getPersistence().findByUserId_PrevAndNext(entryId, userId, obc);
197     }
198 
199     public static java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findByC_C(
200         long classNameId, long classPK)
201         throws com.liferay.portal.SystemException {
202         return getPersistence().findByC_C(classNameId, classPK);
203     }
204 
205     public static java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findByC_C(
206         long classNameId, long classPK, int start, int end)
207         throws com.liferay.portal.SystemException {
208         return getPersistence().findByC_C(classNameId, classPK, start, end);
209     }
210 
211     public static java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findByC_C(
212         long classNameId, long classPK, int start, int end,
213         com.liferay.portal.kernel.util.OrderByComparator obc)
214         throws com.liferay.portal.SystemException {
215         return getPersistence().findByC_C(classNameId, classPK, start, end, obc);
216     }
217 
218     public static com.liferay.portlet.announcements.model.AnnouncementsEntry findByC_C_First(
219         long classNameId, long classPK,
220         com.liferay.portal.kernel.util.OrderByComparator obc)
221         throws com.liferay.portal.SystemException,
222             com.liferay.portlet.announcements.NoSuchEntryException {
223         return getPersistence().findByC_C_First(classNameId, classPK, obc);
224     }
225 
226     public static com.liferay.portlet.announcements.model.AnnouncementsEntry findByC_C_Last(
227         long classNameId, long classPK,
228         com.liferay.portal.kernel.util.OrderByComparator obc)
229         throws com.liferay.portal.SystemException,
230             com.liferay.portlet.announcements.NoSuchEntryException {
231         return getPersistence().findByC_C_Last(classNameId, classPK, obc);
232     }
233 
234     public static com.liferay.portlet.announcements.model.AnnouncementsEntry[] findByC_C_PrevAndNext(
235         long entryId, long classNameId, long classPK,
236         com.liferay.portal.kernel.util.OrderByComparator obc)
237         throws com.liferay.portal.SystemException,
238             com.liferay.portlet.announcements.NoSuchEntryException {
239         return getPersistence()
240                    .findByC_C_PrevAndNext(entryId, classNameId, classPK, obc);
241     }
242 
243     public static java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findByC_C_A(
244         long classNameId, long classPK, boolean alert)
245         throws com.liferay.portal.SystemException {
246         return getPersistence().findByC_C_A(classNameId, classPK, alert);
247     }
248 
249     public static java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findByC_C_A(
250         long classNameId, long classPK, boolean alert, int start, int end)
251         throws com.liferay.portal.SystemException {
252         return getPersistence()
253                    .findByC_C_A(classNameId, classPK, alert, start, end);
254     }
255 
256     public static java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findByC_C_A(
257         long classNameId, long classPK, boolean alert, int start, int end,
258         com.liferay.portal.kernel.util.OrderByComparator obc)
259         throws com.liferay.portal.SystemException {
260         return getPersistence()
261                    .findByC_C_A(classNameId, classPK, alert, start, end, obc);
262     }
263 
264     public static com.liferay.portlet.announcements.model.AnnouncementsEntry findByC_C_A_First(
265         long classNameId, long classPK, boolean alert,
266         com.liferay.portal.kernel.util.OrderByComparator obc)
267         throws com.liferay.portal.SystemException,
268             com.liferay.portlet.announcements.NoSuchEntryException {
269         return getPersistence()
270                    .findByC_C_A_First(classNameId, classPK, alert, obc);
271     }
272 
273     public static com.liferay.portlet.announcements.model.AnnouncementsEntry findByC_C_A_Last(
274         long classNameId, long classPK, boolean alert,
275         com.liferay.portal.kernel.util.OrderByComparator obc)
276         throws com.liferay.portal.SystemException,
277             com.liferay.portlet.announcements.NoSuchEntryException {
278         return getPersistence()
279                    .findByC_C_A_Last(classNameId, classPK, alert, obc);
280     }
281 
282     public static com.liferay.portlet.announcements.model.AnnouncementsEntry[] findByC_C_A_PrevAndNext(
283         long entryId, long classNameId, long classPK, boolean alert,
284         com.liferay.portal.kernel.util.OrderByComparator obc)
285         throws com.liferay.portal.SystemException,
286             com.liferay.portlet.announcements.NoSuchEntryException {
287         return getPersistence()
288                    .findByC_C_A_PrevAndNext(entryId, classNameId, classPK,
289             alert, obc);
290     }
291 
292     public static java.util.List<Object> findWithDynamicQuery(
293         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
294         throws com.liferay.portal.SystemException {
295         return getPersistence().findWithDynamicQuery(dynamicQuery);
296     }
297 
298     public static java.util.List<Object> findWithDynamicQuery(
299         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
300         int end) throws com.liferay.portal.SystemException {
301         return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
302     }
303 
304     public static java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findAll()
305         throws com.liferay.portal.SystemException {
306         return getPersistence().findAll();
307     }
308 
309     public static java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findAll(
310         int start, int end) throws com.liferay.portal.SystemException {
311         return getPersistence().findAll(start, end);
312     }
313 
314     public static java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findAll(
315         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
316         throws com.liferay.portal.SystemException {
317         return getPersistence().findAll(start, end, obc);
318     }
319 
320     public static void removeByUuid(java.lang.String uuid)
321         throws com.liferay.portal.SystemException {
322         getPersistence().removeByUuid(uuid);
323     }
324 
325     public static void removeByUserId(long userId)
326         throws com.liferay.portal.SystemException {
327         getPersistence().removeByUserId(userId);
328     }
329 
330     public static void removeByC_C(long classNameId, long classPK)
331         throws com.liferay.portal.SystemException {
332         getPersistence().removeByC_C(classNameId, classPK);
333     }
334 
335     public static void removeByC_C_A(long classNameId, long classPK,
336         boolean alert) throws com.liferay.portal.SystemException {
337         getPersistence().removeByC_C_A(classNameId, classPK, alert);
338     }
339 
340     public static void removeAll() throws com.liferay.portal.SystemException {
341         getPersistence().removeAll();
342     }
343 
344     public static int countByUuid(java.lang.String uuid)
345         throws com.liferay.portal.SystemException {
346         return getPersistence().countByUuid(uuid);
347     }
348 
349     public static int countByUserId(long userId)
350         throws com.liferay.portal.SystemException {
351         return getPersistence().countByUserId(userId);
352     }
353 
354     public static int countByC_C(long classNameId, long classPK)
355         throws com.liferay.portal.SystemException {
356         return getPersistence().countByC_C(classNameId, classPK);
357     }
358 
359     public static int countByC_C_A(long classNameId, long classPK, boolean alert)
360         throws com.liferay.portal.SystemException {
361         return getPersistence().countByC_C_A(classNameId, classPK, alert);
362     }
363 
364     public static int countAll() throws com.liferay.portal.SystemException {
365         return getPersistence().countAll();
366     }
367 
368     public static AnnouncementsEntryPersistence getPersistence() {
369         return _persistence;
370     }
371 
372     public void setPersistence(AnnouncementsEntryPersistence persistence) {
373         _persistence = persistence;
374     }
375 
376     private static AnnouncementsEntryPersistence _persistence;
377 }