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