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