1   /**
2    * Copyright (c) 2000-2008 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 begin, int end)
101         throws com.liferay.portal.SystemException {
102         return getPersistence().findByUuid(uuid, begin, end);
103     }
104 
105     public static java.util.List<com.liferay.portlet.journal.model.JournalFeed> findByUuid(
106         java.lang.String uuid, int begin, int end,
107         com.liferay.portal.kernel.util.OrderByComparator obc)
108         throws com.liferay.portal.SystemException {
109         return getPersistence().findByUuid(uuid, begin, 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 begin, int end)
156         throws com.liferay.portal.SystemException {
157         return getPersistence().findByGroupId(groupId, begin, end);
158     }
159 
160     public static java.util.List<com.liferay.portlet.journal.model.JournalFeed> findByGroupId(
161         long groupId, int begin, int end,
162         com.liferay.portal.kernel.util.OrderByComparator obc)
163         throws com.liferay.portal.SystemException {
164         return getPersistence().findByGroupId(groupId, begin, 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<com.liferay.portlet.journal.model.JournalFeed> findWithDynamicQuery(
203         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
204         throws com.liferay.portal.SystemException {
205         return getPersistence().findWithDynamicQuery(queryInitializer);
206     }
207 
208     public static java.util.List<com.liferay.portlet.journal.model.JournalFeed> findWithDynamicQuery(
209         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
210         int begin, int end) throws com.liferay.portal.SystemException {
211         return getPersistence()
212                    .findWithDynamicQuery(queryInitializer, begin, end);
213     }
214 
215     public static java.util.List<com.liferay.portlet.journal.model.JournalFeed> findAll()
216         throws com.liferay.portal.SystemException {
217         return getPersistence().findAll();
218     }
219 
220     public static java.util.List<com.liferay.portlet.journal.model.JournalFeed> findAll(
221         int begin, int end) throws com.liferay.portal.SystemException {
222         return getPersistence().findAll(begin, end);
223     }
224 
225     public static java.util.List<com.liferay.portlet.journal.model.JournalFeed> findAll(
226         int begin, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
227         throws com.liferay.portal.SystemException {
228         return getPersistence().findAll(begin, end, obc);
229     }
230 
231     public static void removeByUuid(java.lang.String uuid)
232         throws com.liferay.portal.SystemException {
233         getPersistence().removeByUuid(uuid);
234     }
235 
236     public static void removeByUUID_G(java.lang.String uuid, long groupId)
237         throws com.liferay.portal.SystemException,
238             com.liferay.portlet.journal.NoSuchFeedException {
239         getPersistence().removeByUUID_G(uuid, groupId);
240     }
241 
242     public static void removeByGroupId(long groupId)
243         throws com.liferay.portal.SystemException {
244         getPersistence().removeByGroupId(groupId);
245     }
246 
247     public static void removeByG_F(long groupId, java.lang.String feedId)
248         throws com.liferay.portal.SystemException,
249             com.liferay.portlet.journal.NoSuchFeedException {
250         getPersistence().removeByG_F(groupId, feedId);
251     }
252 
253     public static void removeAll() throws com.liferay.portal.SystemException {
254         getPersistence().removeAll();
255     }
256 
257     public static int countByUuid(java.lang.String uuid)
258         throws com.liferay.portal.SystemException {
259         return getPersistence().countByUuid(uuid);
260     }
261 
262     public static int countByUUID_G(java.lang.String uuid, long groupId)
263         throws com.liferay.portal.SystemException {
264         return getPersistence().countByUUID_G(uuid, groupId);
265     }
266 
267     public static int countByGroupId(long groupId)
268         throws com.liferay.portal.SystemException {
269         return getPersistence().countByGroupId(groupId);
270     }
271 
272     public static int countByG_F(long groupId, java.lang.String feedId)
273         throws com.liferay.portal.SystemException {
274         return getPersistence().countByG_F(groupId, feedId);
275     }
276 
277     public static int countAll() throws com.liferay.portal.SystemException {
278         return getPersistence().countAll();
279     }
280 
281     public static JournalFeedPersistence getPersistence() {
282         return _getUtil()._persistence;
283     }
284 
285     public void setPersistence(JournalFeedPersistence persistence) {
286         _persistence = persistence;
287     }
288 
289     private static JournalFeedUtil _getUtil() {
290         if (_util == null) {
291             _util = (JournalFeedUtil)com.liferay.portal.kernel.bean.BeanLocatorUtil.locate(_UTIL);
292         }
293 
294         return _util;
295     }
296 
297     private static final String _UTIL = JournalFeedUtil.class.getName();
298     private static JournalFeedUtil _util;
299     private JournalFeedPersistence _persistence;
300 }