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.bookmarks.service.persistence;
24  
25  /**
26   * <a href="BookmarksEntryUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * @author Brian Wing Shun Chan
29   *
30   */
31  public class BookmarksEntryUtil {
32      public static void cacheResult(
33          com.liferay.portlet.bookmarks.model.BookmarksEntry bookmarksEntry) {
34          getPersistence().cacheResult(bookmarksEntry);
35      }
36  
37      public static void cacheResult(
38          java.util.List<com.liferay.portlet.bookmarks.model.BookmarksEntry> bookmarksEntries) {
39          getPersistence().cacheResult(bookmarksEntries);
40      }
41  
42      public static void clearCache() {
43          getPersistence().clearCache();
44      }
45  
46      public static com.liferay.portlet.bookmarks.model.BookmarksEntry create(
47          long entryId) {
48          return getPersistence().create(entryId);
49      }
50  
51      public static com.liferay.portlet.bookmarks.model.BookmarksEntry remove(
52          long entryId)
53          throws com.liferay.portal.SystemException,
54              com.liferay.portlet.bookmarks.NoSuchEntryException {
55          return getPersistence().remove(entryId);
56      }
57  
58      public static com.liferay.portlet.bookmarks.model.BookmarksEntry remove(
59          com.liferay.portlet.bookmarks.model.BookmarksEntry bookmarksEntry)
60          throws com.liferay.portal.SystemException {
61          return getPersistence().remove(bookmarksEntry);
62      }
63  
64      /**
65       * @deprecated Use <code>update(BookmarksEntry bookmarksEntry, boolean merge)</code>.
66       */
67      public static com.liferay.portlet.bookmarks.model.BookmarksEntry update(
68          com.liferay.portlet.bookmarks.model.BookmarksEntry bookmarksEntry)
69          throws com.liferay.portal.SystemException {
70          return getPersistence().update(bookmarksEntry);
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        bookmarksEntry 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 bookmarksEntry 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.bookmarks.model.BookmarksEntry update(
87          com.liferay.portlet.bookmarks.model.BookmarksEntry bookmarksEntry,
88          boolean merge) throws com.liferay.portal.SystemException {
89          return getPersistence().update(bookmarksEntry, merge);
90      }
91  
92      public static com.liferay.portlet.bookmarks.model.BookmarksEntry updateImpl(
93          com.liferay.portlet.bookmarks.model.BookmarksEntry bookmarksEntry,
94          boolean merge) throws com.liferay.portal.SystemException {
95          return getPersistence().updateImpl(bookmarksEntry, merge);
96      }
97  
98      public static com.liferay.portlet.bookmarks.model.BookmarksEntry findByPrimaryKey(
99          long entryId)
100         throws com.liferay.portal.SystemException,
101             com.liferay.portlet.bookmarks.NoSuchEntryException {
102         return getPersistence().findByPrimaryKey(entryId);
103     }
104 
105     public static com.liferay.portlet.bookmarks.model.BookmarksEntry 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.bookmarks.model.BookmarksEntry> 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.bookmarks.model.BookmarksEntry> 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.bookmarks.model.BookmarksEntry> 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.bookmarks.model.BookmarksEntry 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.bookmarks.NoSuchEntryException {
133         return getPersistence().findByUuid_First(uuid, obc);
134     }
135 
136     public static com.liferay.portlet.bookmarks.model.BookmarksEntry 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.bookmarks.NoSuchEntryException {
141         return getPersistence().findByUuid_Last(uuid, obc);
142     }
143 
144     public static com.liferay.portlet.bookmarks.model.BookmarksEntry[] 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.bookmarks.NoSuchEntryException {
149         return getPersistence().findByUuid_PrevAndNext(entryId, uuid, obc);
150     }
151 
152     public static com.liferay.portlet.bookmarks.model.BookmarksEntry findByUUID_G(
153         java.lang.String uuid, long groupId)
154         throws com.liferay.portal.SystemException,
155             com.liferay.portlet.bookmarks.NoSuchEntryException {
156         return getPersistence().findByUUID_G(uuid, groupId);
157     }
158 
159     public static com.liferay.portlet.bookmarks.model.BookmarksEntry fetchByUUID_G(
160         java.lang.String uuid, long groupId)
161         throws com.liferay.portal.SystemException {
162         return getPersistence().fetchByUUID_G(uuid, groupId);
163     }
164 
165     public static com.liferay.portlet.bookmarks.model.BookmarksEntry fetchByUUID_G(
166         java.lang.String uuid, long groupId, boolean retrieveFromCache)
167         throws com.liferay.portal.SystemException {
168         return getPersistence().fetchByUUID_G(uuid, groupId, retrieveFromCache);
169     }
170 
171     public static java.util.List<com.liferay.portlet.bookmarks.model.BookmarksEntry> findByGroupId(
172         long groupId) throws com.liferay.portal.SystemException {
173         return getPersistence().findByGroupId(groupId);
174     }
175 
176     public static java.util.List<com.liferay.portlet.bookmarks.model.BookmarksEntry> findByGroupId(
177         long groupId, int start, int end)
178         throws com.liferay.portal.SystemException {
179         return getPersistence().findByGroupId(groupId, start, end);
180     }
181 
182     public static java.util.List<com.liferay.portlet.bookmarks.model.BookmarksEntry> findByGroupId(
183         long groupId, int start, int end,
184         com.liferay.portal.kernel.util.OrderByComparator obc)
185         throws com.liferay.portal.SystemException {
186         return getPersistence().findByGroupId(groupId, start, end, obc);
187     }
188 
189     public static com.liferay.portlet.bookmarks.model.BookmarksEntry findByGroupId_First(
190         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
191         throws com.liferay.portal.SystemException,
192             com.liferay.portlet.bookmarks.NoSuchEntryException {
193         return getPersistence().findByGroupId_First(groupId, obc);
194     }
195 
196     public static com.liferay.portlet.bookmarks.model.BookmarksEntry findByGroupId_Last(
197         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
198         throws com.liferay.portal.SystemException,
199             com.liferay.portlet.bookmarks.NoSuchEntryException {
200         return getPersistence().findByGroupId_Last(groupId, obc);
201     }
202 
203     public static com.liferay.portlet.bookmarks.model.BookmarksEntry[] findByGroupId_PrevAndNext(
204         long entryId, long groupId,
205         com.liferay.portal.kernel.util.OrderByComparator obc)
206         throws com.liferay.portal.SystemException,
207             com.liferay.portlet.bookmarks.NoSuchEntryException {
208         return getPersistence().findByGroupId_PrevAndNext(entryId, groupId, obc);
209     }
210 
211     public static java.util.List<com.liferay.portlet.bookmarks.model.BookmarksEntry> findByFolderId(
212         long folderId) throws com.liferay.portal.SystemException {
213         return getPersistence().findByFolderId(folderId);
214     }
215 
216     public static java.util.List<com.liferay.portlet.bookmarks.model.BookmarksEntry> findByFolderId(
217         long folderId, int start, int end)
218         throws com.liferay.portal.SystemException {
219         return getPersistence().findByFolderId(folderId, start, end);
220     }
221 
222     public static java.util.List<com.liferay.portlet.bookmarks.model.BookmarksEntry> findByFolderId(
223         long folderId, int start, int end,
224         com.liferay.portal.kernel.util.OrderByComparator obc)
225         throws com.liferay.portal.SystemException {
226         return getPersistence().findByFolderId(folderId, start, end, obc);
227     }
228 
229     public static com.liferay.portlet.bookmarks.model.BookmarksEntry findByFolderId_First(
230         long folderId, com.liferay.portal.kernel.util.OrderByComparator obc)
231         throws com.liferay.portal.SystemException,
232             com.liferay.portlet.bookmarks.NoSuchEntryException {
233         return getPersistence().findByFolderId_First(folderId, obc);
234     }
235 
236     public static com.liferay.portlet.bookmarks.model.BookmarksEntry findByFolderId_Last(
237         long folderId, com.liferay.portal.kernel.util.OrderByComparator obc)
238         throws com.liferay.portal.SystemException,
239             com.liferay.portlet.bookmarks.NoSuchEntryException {
240         return getPersistence().findByFolderId_Last(folderId, obc);
241     }
242 
243     public static com.liferay.portlet.bookmarks.model.BookmarksEntry[] findByFolderId_PrevAndNext(
244         long entryId, long folderId,
245         com.liferay.portal.kernel.util.OrderByComparator obc)
246         throws com.liferay.portal.SystemException,
247             com.liferay.portlet.bookmarks.NoSuchEntryException {
248         return getPersistence()
249                    .findByFolderId_PrevAndNext(entryId, folderId, obc);
250     }
251 
252     public static java.util.List<com.liferay.portlet.bookmarks.model.BookmarksEntry> findByG_U(
253         long groupId, long userId) throws com.liferay.portal.SystemException {
254         return getPersistence().findByG_U(groupId, userId);
255     }
256 
257     public static java.util.List<com.liferay.portlet.bookmarks.model.BookmarksEntry> findByG_U(
258         long groupId, long userId, int start, int end)
259         throws com.liferay.portal.SystemException {
260         return getPersistence().findByG_U(groupId, userId, start, end);
261     }
262 
263     public static java.util.List<com.liferay.portlet.bookmarks.model.BookmarksEntry> findByG_U(
264         long groupId, long userId, int start, int end,
265         com.liferay.portal.kernel.util.OrderByComparator obc)
266         throws com.liferay.portal.SystemException {
267         return getPersistence().findByG_U(groupId, userId, start, end, obc);
268     }
269 
270     public static com.liferay.portlet.bookmarks.model.BookmarksEntry findByG_U_First(
271         long groupId, long userId,
272         com.liferay.portal.kernel.util.OrderByComparator obc)
273         throws com.liferay.portal.SystemException,
274             com.liferay.portlet.bookmarks.NoSuchEntryException {
275         return getPersistence().findByG_U_First(groupId, userId, obc);
276     }
277 
278     public static com.liferay.portlet.bookmarks.model.BookmarksEntry findByG_U_Last(
279         long groupId, long userId,
280         com.liferay.portal.kernel.util.OrderByComparator obc)
281         throws com.liferay.portal.SystemException,
282             com.liferay.portlet.bookmarks.NoSuchEntryException {
283         return getPersistence().findByG_U_Last(groupId, userId, obc);
284     }
285 
286     public static com.liferay.portlet.bookmarks.model.BookmarksEntry[] findByG_U_PrevAndNext(
287         long entryId, long groupId, long userId,
288         com.liferay.portal.kernel.util.OrderByComparator obc)
289         throws com.liferay.portal.SystemException,
290             com.liferay.portlet.bookmarks.NoSuchEntryException {
291         return getPersistence()
292                    .findByG_U_PrevAndNext(entryId, groupId, userId, obc);
293     }
294 
295     public static java.util.List<Object> findWithDynamicQuery(
296         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
297         throws com.liferay.portal.SystemException {
298         return getPersistence().findWithDynamicQuery(dynamicQuery);
299     }
300 
301     public static java.util.List<Object> findWithDynamicQuery(
302         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
303         int end) throws com.liferay.portal.SystemException {
304         return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
305     }
306 
307     public static java.util.List<com.liferay.portlet.bookmarks.model.BookmarksEntry> findAll()
308         throws com.liferay.portal.SystemException {
309         return getPersistence().findAll();
310     }
311 
312     public static java.util.List<com.liferay.portlet.bookmarks.model.BookmarksEntry> findAll(
313         int start, int end) throws com.liferay.portal.SystemException {
314         return getPersistence().findAll(start, end);
315     }
316 
317     public static java.util.List<com.liferay.portlet.bookmarks.model.BookmarksEntry> findAll(
318         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
319         throws com.liferay.portal.SystemException {
320         return getPersistence().findAll(start, end, obc);
321     }
322 
323     public static void removeByUuid(java.lang.String uuid)
324         throws com.liferay.portal.SystemException {
325         getPersistence().removeByUuid(uuid);
326     }
327 
328     public static void removeByUUID_G(java.lang.String uuid, long groupId)
329         throws com.liferay.portal.SystemException,
330             com.liferay.portlet.bookmarks.NoSuchEntryException {
331         getPersistence().removeByUUID_G(uuid, groupId);
332     }
333 
334     public static void removeByGroupId(long groupId)
335         throws com.liferay.portal.SystemException {
336         getPersistence().removeByGroupId(groupId);
337     }
338 
339     public static void removeByFolderId(long folderId)
340         throws com.liferay.portal.SystemException {
341         getPersistence().removeByFolderId(folderId);
342     }
343 
344     public static void removeByG_U(long groupId, long userId)
345         throws com.liferay.portal.SystemException {
346         getPersistence().removeByG_U(groupId, userId);
347     }
348 
349     public static void removeAll() throws com.liferay.portal.SystemException {
350         getPersistence().removeAll();
351     }
352 
353     public static int countByUuid(java.lang.String uuid)
354         throws com.liferay.portal.SystemException {
355         return getPersistence().countByUuid(uuid);
356     }
357 
358     public static int countByUUID_G(java.lang.String uuid, long groupId)
359         throws com.liferay.portal.SystemException {
360         return getPersistence().countByUUID_G(uuid, groupId);
361     }
362 
363     public static int countByGroupId(long groupId)
364         throws com.liferay.portal.SystemException {
365         return getPersistence().countByGroupId(groupId);
366     }
367 
368     public static int countByFolderId(long folderId)
369         throws com.liferay.portal.SystemException {
370         return getPersistence().countByFolderId(folderId);
371     }
372 
373     public static int countByG_U(long groupId, long userId)
374         throws com.liferay.portal.SystemException {
375         return getPersistence().countByG_U(groupId, userId);
376     }
377 
378     public static int countAll() throws com.liferay.portal.SystemException {
379         return getPersistence().countAll();
380     }
381 
382     public static BookmarksEntryPersistence getPersistence() {
383         return _persistence;
384     }
385 
386     public void setPersistence(BookmarksEntryPersistence persistence) {
387         _persistence = persistence;
388     }
389 
390     private static BookmarksEntryPersistence _persistence;
391 }