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