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.announcements.service.persistence;
24  
25  /**
26   * <a href="AnnouncementsEntryUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * @author Brian Wing Shun Chan
29   *
30   */
31  public class AnnouncementsEntryUtil {
32      public static void cacheResult(
33          com.liferay.portlet.announcements.model.AnnouncementsEntry announcementsEntry) {
34          getPersistence().cacheResult(announcementsEntry);
35      }
36  
37      public static void cacheResult(
38          java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> announcementsEntries) {
39          getPersistence().cacheResult(announcementsEntries);
40      }
41  
42      public static void clearCache() {
43          getPersistence().clearCache();
44      }
45  
46      public static com.liferay.portlet.announcements.model.AnnouncementsEntry create(
47          long entryId) {
48          return getPersistence().create(entryId);
49      }
50  
51      public static com.liferay.portlet.announcements.model.AnnouncementsEntry remove(
52          long entryId)
53          throws com.liferay.portal.SystemException,
54              com.liferay.portlet.announcements.NoSuchEntryException {
55          return getPersistence().remove(entryId);
56      }
57  
58      public static com.liferay.portlet.announcements.model.AnnouncementsEntry remove(
59          com.liferay.portlet.announcements.model.AnnouncementsEntry announcementsEntry)
60          throws com.liferay.portal.SystemException {
61          return getPersistence().remove(announcementsEntry);
62      }
63  
64      /**
65       * @deprecated Use <code>update(AnnouncementsEntry announcementsEntry, boolean merge)</code>.
66       */
67      public static com.liferay.portlet.announcements.model.AnnouncementsEntry update(
68          com.liferay.portlet.announcements.model.AnnouncementsEntry announcementsEntry)
69          throws com.liferay.portal.SystemException {
70          return getPersistence().update(announcementsEntry);
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        announcementsEntry 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 announcementsEntry 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.announcements.model.AnnouncementsEntry update(
87          com.liferay.portlet.announcements.model.AnnouncementsEntry announcementsEntry,
88          boolean merge) throws com.liferay.portal.SystemException {
89          return getPersistence().update(announcementsEntry, merge);
90      }
91  
92      public static com.liferay.portlet.announcements.model.AnnouncementsEntry updateImpl(
93          com.liferay.portlet.announcements.model.AnnouncementsEntry announcementsEntry,
94          boolean merge) throws com.liferay.portal.SystemException {
95          return getPersistence().updateImpl(announcementsEntry, merge);
96      }
97  
98      public static com.liferay.portlet.announcements.model.AnnouncementsEntry findByPrimaryKey(
99          long entryId)
100         throws com.liferay.portal.SystemException,
101             com.liferay.portlet.announcements.NoSuchEntryException {
102         return getPersistence().findByPrimaryKey(entryId);
103     }
104 
105     public static com.liferay.portlet.announcements.model.AnnouncementsEntry fetchByPrimaryKey(
106         long entryId) throws com.liferay.portal.SystemException {
107         return getPersistence().fetchByPrimaryKey(entryId);
108     }
109 
110     public static java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> 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.announcements.model.AnnouncementsEntry> 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.announcements.model.AnnouncementsEntry> 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.announcements.model.AnnouncementsEntry 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.announcements.NoSuchEntryException {
133         return getPersistence().findByUuid_First(uuid, obc);
134     }
135 
136     public static com.liferay.portlet.announcements.model.AnnouncementsEntry 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.announcements.NoSuchEntryException {
141         return getPersistence().findByUuid_Last(uuid, obc);
142     }
143 
144     public static com.liferay.portlet.announcements.model.AnnouncementsEntry[] findByUuid_PrevAndNext(
145         long entryId, java.lang.String uuid,
146         com.liferay.portal.kernel.util.OrderByComparator obc)
147         throws com.liferay.portal.SystemException,
148             com.liferay.portlet.announcements.NoSuchEntryException {
149         return getPersistence().findByUuid_PrevAndNext(entryId, uuid, obc);
150     }
151 
152     public static java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findByUserId(
153         long userId) throws com.liferay.portal.SystemException {
154         return getPersistence().findByUserId(userId);
155     }
156 
157     public static java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findByUserId(
158         long userId, int start, int end)
159         throws com.liferay.portal.SystemException {
160         return getPersistence().findByUserId(userId, start, end);
161     }
162 
163     public static java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findByUserId(
164         long userId, int start, int end,
165         com.liferay.portal.kernel.util.OrderByComparator obc)
166         throws com.liferay.portal.SystemException {
167         return getPersistence().findByUserId(userId, start, end, obc);
168     }
169 
170     public static com.liferay.portlet.announcements.model.AnnouncementsEntry findByUserId_First(
171         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
172         throws com.liferay.portal.SystemException,
173             com.liferay.portlet.announcements.NoSuchEntryException {
174         return getPersistence().findByUserId_First(userId, obc);
175     }
176 
177     public static com.liferay.portlet.announcements.model.AnnouncementsEntry findByUserId_Last(
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_Last(userId, obc);
182     }
183 
184     public static com.liferay.portlet.announcements.model.AnnouncementsEntry[] findByUserId_PrevAndNext(
185         long entryId, long userId,
186         com.liferay.portal.kernel.util.OrderByComparator obc)
187         throws com.liferay.portal.SystemException,
188             com.liferay.portlet.announcements.NoSuchEntryException {
189         return getPersistence().findByUserId_PrevAndNext(entryId, userId, obc);
190     }
191 
192     public static java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findByC_C(
193         long classNameId, long classPK)
194         throws com.liferay.portal.SystemException {
195         return getPersistence().findByC_C(classNameId, classPK);
196     }
197 
198     public static java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findByC_C(
199         long classNameId, long classPK, int start, int end)
200         throws com.liferay.portal.SystemException {
201         return getPersistence().findByC_C(classNameId, classPK, start, end);
202     }
203 
204     public static java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findByC_C(
205         long classNameId, long classPK, int start, int end,
206         com.liferay.portal.kernel.util.OrderByComparator obc)
207         throws com.liferay.portal.SystemException {
208         return getPersistence().findByC_C(classNameId, classPK, start, end, obc);
209     }
210 
211     public static com.liferay.portlet.announcements.model.AnnouncementsEntry findByC_C_First(
212         long classNameId, long classPK,
213         com.liferay.portal.kernel.util.OrderByComparator obc)
214         throws com.liferay.portal.SystemException,
215             com.liferay.portlet.announcements.NoSuchEntryException {
216         return getPersistence().findByC_C_First(classNameId, classPK, obc);
217     }
218 
219     public static com.liferay.portlet.announcements.model.AnnouncementsEntry findByC_C_Last(
220         long classNameId, long classPK,
221         com.liferay.portal.kernel.util.OrderByComparator obc)
222         throws com.liferay.portal.SystemException,
223             com.liferay.portlet.announcements.NoSuchEntryException {
224         return getPersistence().findByC_C_Last(classNameId, classPK, obc);
225     }
226 
227     public static com.liferay.portlet.announcements.model.AnnouncementsEntry[] findByC_C_PrevAndNext(
228         long entryId, long classNameId, long classPK,
229         com.liferay.portal.kernel.util.OrderByComparator obc)
230         throws com.liferay.portal.SystemException,
231             com.liferay.portlet.announcements.NoSuchEntryException {
232         return getPersistence()
233                    .findByC_C_PrevAndNext(entryId, classNameId, classPK, obc);
234     }
235 
236     public static java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findByC_C_A(
237         long classNameId, long classPK, boolean alert)
238         throws com.liferay.portal.SystemException {
239         return getPersistence().findByC_C_A(classNameId, classPK, alert);
240     }
241 
242     public static java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findByC_C_A(
243         long classNameId, long classPK, boolean alert, int start, int end)
244         throws com.liferay.portal.SystemException {
245         return getPersistence()
246                    .findByC_C_A(classNameId, classPK, alert, start, end);
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         com.liferay.portal.kernel.util.OrderByComparator obc)
252         throws com.liferay.portal.SystemException {
253         return getPersistence()
254                    .findByC_C_A(classNameId, classPK, alert, start, end, obc);
255     }
256 
257     public static com.liferay.portlet.announcements.model.AnnouncementsEntry findByC_C_A_First(
258         long classNameId, long classPK, boolean alert,
259         com.liferay.portal.kernel.util.OrderByComparator obc)
260         throws com.liferay.portal.SystemException,
261             com.liferay.portlet.announcements.NoSuchEntryException {
262         return getPersistence()
263                    .findByC_C_A_First(classNameId, classPK, alert, obc);
264     }
265 
266     public static com.liferay.portlet.announcements.model.AnnouncementsEntry findByC_C_A_Last(
267         long classNameId, long classPK, boolean alert,
268         com.liferay.portal.kernel.util.OrderByComparator obc)
269         throws com.liferay.portal.SystemException,
270             com.liferay.portlet.announcements.NoSuchEntryException {
271         return getPersistence()
272                    .findByC_C_A_Last(classNameId, classPK, alert, obc);
273     }
274 
275     public static com.liferay.portlet.announcements.model.AnnouncementsEntry[] findByC_C_A_PrevAndNext(
276         long entryId, long classNameId, long classPK, boolean alert,
277         com.liferay.portal.kernel.util.OrderByComparator obc)
278         throws com.liferay.portal.SystemException,
279             com.liferay.portlet.announcements.NoSuchEntryException {
280         return getPersistence()
281                    .findByC_C_A_PrevAndNext(entryId, classNameId, classPK,
282             alert, obc);
283     }
284 
285     public static java.util.List<Object> findWithDynamicQuery(
286         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
287         throws com.liferay.portal.SystemException {
288         return getPersistence().findWithDynamicQuery(dynamicQuery);
289     }
290 
291     public static java.util.List<Object> findWithDynamicQuery(
292         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
293         int end) throws com.liferay.portal.SystemException {
294         return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
295     }
296 
297     public static java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findAll()
298         throws com.liferay.portal.SystemException {
299         return getPersistence().findAll();
300     }
301 
302     public static java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findAll(
303         int start, int end) throws com.liferay.portal.SystemException {
304         return getPersistence().findAll(start, end);
305     }
306 
307     public static java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findAll(
308         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
309         throws com.liferay.portal.SystemException {
310         return getPersistence().findAll(start, end, obc);
311     }
312 
313     public static void removeByUuid(java.lang.String uuid)
314         throws com.liferay.portal.SystemException {
315         getPersistence().removeByUuid(uuid);
316     }
317 
318     public static void removeByUserId(long userId)
319         throws com.liferay.portal.SystemException {
320         getPersistence().removeByUserId(userId);
321     }
322 
323     public static void removeByC_C(long classNameId, long classPK)
324         throws com.liferay.portal.SystemException {
325         getPersistence().removeByC_C(classNameId, classPK);
326     }
327 
328     public static void removeByC_C_A(long classNameId, long classPK,
329         boolean alert) throws com.liferay.portal.SystemException {
330         getPersistence().removeByC_C_A(classNameId, classPK, alert);
331     }
332 
333     public static void removeAll() throws com.liferay.portal.SystemException {
334         getPersistence().removeAll();
335     }
336 
337     public static int countByUuid(java.lang.String uuid)
338         throws com.liferay.portal.SystemException {
339         return getPersistence().countByUuid(uuid);
340     }
341 
342     public static int countByUserId(long userId)
343         throws com.liferay.portal.SystemException {
344         return getPersistence().countByUserId(userId);
345     }
346 
347     public static int countByC_C(long classNameId, long classPK)
348         throws com.liferay.portal.SystemException {
349         return getPersistence().countByC_C(classNameId, classPK);
350     }
351 
352     public static int countByC_C_A(long classNameId, long classPK, boolean alert)
353         throws com.liferay.portal.SystemException {
354         return getPersistence().countByC_C_A(classNameId, classPK, alert);
355     }
356 
357     public static int countAll() throws com.liferay.portal.SystemException {
358         return getPersistence().countAll();
359     }
360 
361     public static AnnouncementsEntryPersistence getPersistence() {
362         return _persistence;
363     }
364 
365     public void setPersistence(AnnouncementsEntryPersistence persistence) {
366         _persistence = persistence;
367     }
368 
369     private static AnnouncementsEntryPersistence _persistence;
370 }