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.blogs.service.persistence;
24  
25  /**
26   * <a href="BlogsEntryUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * @author Brian Wing Shun Chan
29   *
30   */
31  public class BlogsEntryUtil {
32      public static com.liferay.portlet.blogs.model.BlogsEntry create(
33          long entryId) {
34          return getPersistence().create(entryId);
35      }
36  
37      public static com.liferay.portlet.blogs.model.BlogsEntry remove(
38          long entryId)
39          throws com.liferay.portal.SystemException,
40              com.liferay.portlet.blogs.NoSuchEntryException {
41          return getPersistence().remove(entryId);
42      }
43  
44      public static com.liferay.portlet.blogs.model.BlogsEntry remove(
45          com.liferay.portlet.blogs.model.BlogsEntry blogsEntry)
46          throws com.liferay.portal.SystemException {
47          return getPersistence().remove(blogsEntry);
48      }
49  
50      /**
51       * @deprecated Use <code>update(BlogsEntry blogsEntry, boolean merge)</code>.
52       */
53      public static com.liferay.portlet.blogs.model.BlogsEntry update(
54          com.liferay.portlet.blogs.model.BlogsEntry blogsEntry)
55          throws com.liferay.portal.SystemException {
56          return getPersistence().update(blogsEntry);
57      }
58  
59      /**
60       * Add, update, or merge, the entity. This method also calls the model
61       * listeners to trigger the proper events associated with adding, deleting,
62       * or updating an entity.
63       *
64       * @param        blogsEntry the entity to add, update, or merge
65       * @param        merge boolean value for whether to merge the entity. The
66       *                default value is false. Setting merge to true is more
67       *                expensive and should only be true when blogsEntry is
68       *                transient. See LEP-5473 for a detailed discussion of this
69       *                method.
70       * @return        true if the portlet can be displayed via Ajax
71       */
72      public static com.liferay.portlet.blogs.model.BlogsEntry update(
73          com.liferay.portlet.blogs.model.BlogsEntry blogsEntry, boolean merge)
74          throws com.liferay.portal.SystemException {
75          return getPersistence().update(blogsEntry, merge);
76      }
77  
78      public static com.liferay.portlet.blogs.model.BlogsEntry updateImpl(
79          com.liferay.portlet.blogs.model.BlogsEntry blogsEntry, boolean merge)
80          throws com.liferay.portal.SystemException {
81          return getPersistence().updateImpl(blogsEntry, merge);
82      }
83  
84      public static com.liferay.portlet.blogs.model.BlogsEntry findByPrimaryKey(
85          long entryId)
86          throws com.liferay.portal.SystemException,
87              com.liferay.portlet.blogs.NoSuchEntryException {
88          return getPersistence().findByPrimaryKey(entryId);
89      }
90  
91      public static com.liferay.portlet.blogs.model.BlogsEntry fetchByPrimaryKey(
92          long entryId) throws com.liferay.portal.SystemException {
93          return getPersistence().fetchByPrimaryKey(entryId);
94      }
95  
96      public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> findByUuid(
97          java.lang.String uuid) throws com.liferay.portal.SystemException {
98          return getPersistence().findByUuid(uuid);
99      }
100 
101     public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> findByUuid(
102         java.lang.String uuid, int begin, int end)
103         throws com.liferay.portal.SystemException {
104         return getPersistence().findByUuid(uuid, begin, end);
105     }
106 
107     public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> findByUuid(
108         java.lang.String uuid, int begin, int end,
109         com.liferay.portal.kernel.util.OrderByComparator obc)
110         throws com.liferay.portal.SystemException {
111         return getPersistence().findByUuid(uuid, begin, end, obc);
112     }
113 
114     public static com.liferay.portlet.blogs.model.BlogsEntry findByUuid_First(
115         java.lang.String uuid,
116         com.liferay.portal.kernel.util.OrderByComparator obc)
117         throws com.liferay.portal.SystemException,
118             com.liferay.portlet.blogs.NoSuchEntryException {
119         return getPersistence().findByUuid_First(uuid, obc);
120     }
121 
122     public static com.liferay.portlet.blogs.model.BlogsEntry findByUuid_Last(
123         java.lang.String uuid,
124         com.liferay.portal.kernel.util.OrderByComparator obc)
125         throws com.liferay.portal.SystemException,
126             com.liferay.portlet.blogs.NoSuchEntryException {
127         return getPersistence().findByUuid_Last(uuid, obc);
128     }
129 
130     public static com.liferay.portlet.blogs.model.BlogsEntry[] findByUuid_PrevAndNext(
131         long entryId, java.lang.String uuid,
132         com.liferay.portal.kernel.util.OrderByComparator obc)
133         throws com.liferay.portal.SystemException,
134             com.liferay.portlet.blogs.NoSuchEntryException {
135         return getPersistence().findByUuid_PrevAndNext(entryId, uuid, obc);
136     }
137 
138     public static com.liferay.portlet.blogs.model.BlogsEntry findByUUID_G(
139         java.lang.String uuid, long groupId)
140         throws com.liferay.portal.SystemException,
141             com.liferay.portlet.blogs.NoSuchEntryException {
142         return getPersistence().findByUUID_G(uuid, groupId);
143     }
144 
145     public static com.liferay.portlet.blogs.model.BlogsEntry fetchByUUID_G(
146         java.lang.String uuid, long groupId)
147         throws com.liferay.portal.SystemException {
148         return getPersistence().fetchByUUID_G(uuid, groupId);
149     }
150 
151     public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> findByGroupId(
152         long groupId) throws com.liferay.portal.SystemException {
153         return getPersistence().findByGroupId(groupId);
154     }
155 
156     public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> findByGroupId(
157         long groupId, int begin, int end)
158         throws com.liferay.portal.SystemException {
159         return getPersistence().findByGroupId(groupId, begin, end);
160     }
161 
162     public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> findByGroupId(
163         long groupId, int begin, int end,
164         com.liferay.portal.kernel.util.OrderByComparator obc)
165         throws com.liferay.portal.SystemException {
166         return getPersistence().findByGroupId(groupId, begin, end, obc);
167     }
168 
169     public static com.liferay.portlet.blogs.model.BlogsEntry findByGroupId_First(
170         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
171         throws com.liferay.portal.SystemException,
172             com.liferay.portlet.blogs.NoSuchEntryException {
173         return getPersistence().findByGroupId_First(groupId, obc);
174     }
175 
176     public static com.liferay.portlet.blogs.model.BlogsEntry findByGroupId_Last(
177         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
178         throws com.liferay.portal.SystemException,
179             com.liferay.portlet.blogs.NoSuchEntryException {
180         return getPersistence().findByGroupId_Last(groupId, obc);
181     }
182 
183     public static com.liferay.portlet.blogs.model.BlogsEntry[] findByGroupId_PrevAndNext(
184         long entryId, long groupId,
185         com.liferay.portal.kernel.util.OrderByComparator obc)
186         throws com.liferay.portal.SystemException,
187             com.liferay.portlet.blogs.NoSuchEntryException {
188         return getPersistence().findByGroupId_PrevAndNext(entryId, groupId, obc);
189     }
190 
191     public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> findByCompanyId(
192         long companyId) throws com.liferay.portal.SystemException {
193         return getPersistence().findByCompanyId(companyId);
194     }
195 
196     public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> findByCompanyId(
197         long companyId, int begin, int end)
198         throws com.liferay.portal.SystemException {
199         return getPersistence().findByCompanyId(companyId, begin, end);
200     }
201 
202     public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> findByCompanyId(
203         long companyId, int begin, int end,
204         com.liferay.portal.kernel.util.OrderByComparator obc)
205         throws com.liferay.portal.SystemException {
206         return getPersistence().findByCompanyId(companyId, begin, end, obc);
207     }
208 
209     public static com.liferay.portlet.blogs.model.BlogsEntry findByCompanyId_First(
210         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
211         throws com.liferay.portal.SystemException,
212             com.liferay.portlet.blogs.NoSuchEntryException {
213         return getPersistence().findByCompanyId_First(companyId, obc);
214     }
215 
216     public static com.liferay.portlet.blogs.model.BlogsEntry findByCompanyId_Last(
217         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
218         throws com.liferay.portal.SystemException,
219             com.liferay.portlet.blogs.NoSuchEntryException {
220         return getPersistence().findByCompanyId_Last(companyId, obc);
221     }
222 
223     public static com.liferay.portlet.blogs.model.BlogsEntry[] findByCompanyId_PrevAndNext(
224         long entryId, long companyId,
225         com.liferay.portal.kernel.util.OrderByComparator obc)
226         throws com.liferay.portal.SystemException,
227             com.liferay.portlet.blogs.NoSuchEntryException {
228         return getPersistence()
229                    .findByCompanyId_PrevAndNext(entryId, companyId, obc);
230     }
231 
232     public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> findByG_U(
233         long groupId, long userId) throws com.liferay.portal.SystemException {
234         return getPersistence().findByG_U(groupId, userId);
235     }
236 
237     public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> findByG_U(
238         long groupId, long userId, int begin, int end)
239         throws com.liferay.portal.SystemException {
240         return getPersistence().findByG_U(groupId, userId, begin, end);
241     }
242 
243     public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> findByG_U(
244         long groupId, long userId, int begin, int end,
245         com.liferay.portal.kernel.util.OrderByComparator obc)
246         throws com.liferay.portal.SystemException {
247         return getPersistence().findByG_U(groupId, userId, begin, end, obc);
248     }
249 
250     public static com.liferay.portlet.blogs.model.BlogsEntry findByG_U_First(
251         long groupId, long userId,
252         com.liferay.portal.kernel.util.OrderByComparator obc)
253         throws com.liferay.portal.SystemException,
254             com.liferay.portlet.blogs.NoSuchEntryException {
255         return getPersistence().findByG_U_First(groupId, userId, obc);
256     }
257 
258     public static com.liferay.portlet.blogs.model.BlogsEntry findByG_U_Last(
259         long groupId, long userId,
260         com.liferay.portal.kernel.util.OrderByComparator obc)
261         throws com.liferay.portal.SystemException,
262             com.liferay.portlet.blogs.NoSuchEntryException {
263         return getPersistence().findByG_U_Last(groupId, userId, obc);
264     }
265 
266     public static com.liferay.portlet.blogs.model.BlogsEntry[] findByG_U_PrevAndNext(
267         long entryId, long groupId, long userId,
268         com.liferay.portal.kernel.util.OrderByComparator obc)
269         throws com.liferay.portal.SystemException,
270             com.liferay.portlet.blogs.NoSuchEntryException {
271         return getPersistence()
272                    .findByG_U_PrevAndNext(entryId, groupId, userId, obc);
273     }
274 
275     public static com.liferay.portlet.blogs.model.BlogsEntry findByG_UT(
276         long groupId, java.lang.String urlTitle)
277         throws com.liferay.portal.SystemException,
278             com.liferay.portlet.blogs.NoSuchEntryException {
279         return getPersistence().findByG_UT(groupId, urlTitle);
280     }
281 
282     public static com.liferay.portlet.blogs.model.BlogsEntry fetchByG_UT(
283         long groupId, java.lang.String urlTitle)
284         throws com.liferay.portal.SystemException {
285         return getPersistence().fetchByG_UT(groupId, urlTitle);
286     }
287 
288     public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> findByC_U(
289         long companyId, long userId) throws com.liferay.portal.SystemException {
290         return getPersistence().findByC_U(companyId, userId);
291     }
292 
293     public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> findByC_U(
294         long companyId, long userId, int begin, int end)
295         throws com.liferay.portal.SystemException {
296         return getPersistence().findByC_U(companyId, userId, begin, end);
297     }
298 
299     public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> findByC_U(
300         long companyId, long userId, int begin, int end,
301         com.liferay.portal.kernel.util.OrderByComparator obc)
302         throws com.liferay.portal.SystemException {
303         return getPersistence().findByC_U(companyId, userId, begin, end, obc);
304     }
305 
306     public static com.liferay.portlet.blogs.model.BlogsEntry findByC_U_First(
307         long companyId, long userId,
308         com.liferay.portal.kernel.util.OrderByComparator obc)
309         throws com.liferay.portal.SystemException,
310             com.liferay.portlet.blogs.NoSuchEntryException {
311         return getPersistence().findByC_U_First(companyId, userId, obc);
312     }
313 
314     public static com.liferay.portlet.blogs.model.BlogsEntry findByC_U_Last(
315         long companyId, long userId,
316         com.liferay.portal.kernel.util.OrderByComparator obc)
317         throws com.liferay.portal.SystemException,
318             com.liferay.portlet.blogs.NoSuchEntryException {
319         return getPersistence().findByC_U_Last(companyId, userId, obc);
320     }
321 
322     public static com.liferay.portlet.blogs.model.BlogsEntry[] findByC_U_PrevAndNext(
323         long entryId, long companyId, long userId,
324         com.liferay.portal.kernel.util.OrderByComparator obc)
325         throws com.liferay.portal.SystemException,
326             com.liferay.portlet.blogs.NoSuchEntryException {
327         return getPersistence()
328                    .findByC_U_PrevAndNext(entryId, companyId, userId, obc);
329     }
330 
331     public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> findWithDynamicQuery(
332         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
333         throws com.liferay.portal.SystemException {
334         return getPersistence().findWithDynamicQuery(queryInitializer);
335     }
336 
337     public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> findWithDynamicQuery(
338         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
339         int begin, int end) throws com.liferay.portal.SystemException {
340         return getPersistence()
341                    .findWithDynamicQuery(queryInitializer, begin, end);
342     }
343 
344     public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> findAll()
345         throws com.liferay.portal.SystemException {
346         return getPersistence().findAll();
347     }
348 
349     public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> findAll(
350         int begin, int end) throws com.liferay.portal.SystemException {
351         return getPersistence().findAll(begin, end);
352     }
353 
354     public static java.util.List<com.liferay.portlet.blogs.model.BlogsEntry> findAll(
355         int begin, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
356         throws com.liferay.portal.SystemException {
357         return getPersistence().findAll(begin, end, obc);
358     }
359 
360     public static void removeByUuid(java.lang.String uuid)
361         throws com.liferay.portal.SystemException {
362         getPersistence().removeByUuid(uuid);
363     }
364 
365     public static void removeByUUID_G(java.lang.String uuid, long groupId)
366         throws com.liferay.portal.SystemException,
367             com.liferay.portlet.blogs.NoSuchEntryException {
368         getPersistence().removeByUUID_G(uuid, groupId);
369     }
370 
371     public static void removeByGroupId(long groupId)
372         throws com.liferay.portal.SystemException {
373         getPersistence().removeByGroupId(groupId);
374     }
375 
376     public static void removeByCompanyId(long companyId)
377         throws com.liferay.portal.SystemException {
378         getPersistence().removeByCompanyId(companyId);
379     }
380 
381     public static void removeByG_U(long groupId, long userId)
382         throws com.liferay.portal.SystemException {
383         getPersistence().removeByG_U(groupId, userId);
384     }
385 
386     public static void removeByG_UT(long groupId, java.lang.String urlTitle)
387         throws com.liferay.portal.SystemException,
388             com.liferay.portlet.blogs.NoSuchEntryException {
389         getPersistence().removeByG_UT(groupId, urlTitle);
390     }
391 
392     public static void removeByC_U(long companyId, long userId)
393         throws com.liferay.portal.SystemException {
394         getPersistence().removeByC_U(companyId, userId);
395     }
396 
397     public static void removeAll() throws com.liferay.portal.SystemException {
398         getPersistence().removeAll();
399     }
400 
401     public static int countByUuid(java.lang.String uuid)
402         throws com.liferay.portal.SystemException {
403         return getPersistence().countByUuid(uuid);
404     }
405 
406     public static int countByUUID_G(java.lang.String uuid, long groupId)
407         throws com.liferay.portal.SystemException {
408         return getPersistence().countByUUID_G(uuid, groupId);
409     }
410 
411     public static int countByGroupId(long groupId)
412         throws com.liferay.portal.SystemException {
413         return getPersistence().countByGroupId(groupId);
414     }
415 
416     public static int countByCompanyId(long companyId)
417         throws com.liferay.portal.SystemException {
418         return getPersistence().countByCompanyId(companyId);
419     }
420 
421     public static int countByG_U(long groupId, long userId)
422         throws com.liferay.portal.SystemException {
423         return getPersistence().countByG_U(groupId, userId);
424     }
425 
426     public static int countByG_UT(long groupId, java.lang.String urlTitle)
427         throws com.liferay.portal.SystemException {
428         return getPersistence().countByG_UT(groupId, urlTitle);
429     }
430 
431     public static int countByC_U(long companyId, long userId)
432         throws com.liferay.portal.SystemException {
433         return getPersistence().countByC_U(companyId, userId);
434     }
435 
436     public static int countAll() throws com.liferay.portal.SystemException {
437         return getPersistence().countAll();
438     }
439 
440     public static BlogsEntryPersistence getPersistence() {
441         return _getUtil()._persistence;
442     }
443 
444     public void setPersistence(BlogsEntryPersistence persistence) {
445         _persistence = persistence;
446     }
447 
448     private static BlogsEntryUtil _getUtil() {
449         if (_util == null) {
450             _util = (BlogsEntryUtil)com.liferay.portal.kernel.bean.BeanLocatorUtil.locate(_UTIL);
451         }
452 
453         return _util;
454     }
455 
456     private static final String _UTIL = BlogsEntryUtil.class.getName();
457     private static BlogsEntryUtil _util;
458     private BlogsEntryPersistence _persistence;
459 }