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