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="BookmarksFolderPersistence.java.html"><b><i>View Source</i></b></a>
26   *
27   * @author Brian Wing Shun Chan
28   *
29   */
30  public interface BookmarksFolderPersistence extends BasePersistence {
31      public void cacheResult(
32          com.liferay.portlet.bookmarks.model.BookmarksFolder bookmarksFolder);
33  
34      public void cacheResult(
35          java.util.List<com.liferay.portlet.bookmarks.model.BookmarksFolder> bookmarksFolders);
36  
37      public void clearCache();
38  
39      public com.liferay.portlet.bookmarks.model.BookmarksFolder create(
40          long folderId);
41  
42      public com.liferay.portlet.bookmarks.model.BookmarksFolder remove(
43          long folderId)
44          throws com.liferay.portal.SystemException,
45              com.liferay.portlet.bookmarks.NoSuchFolderException;
46  
47      public com.liferay.portlet.bookmarks.model.BookmarksFolder remove(
48          com.liferay.portlet.bookmarks.model.BookmarksFolder bookmarksFolder)
49          throws com.liferay.portal.SystemException;
50  
51      /**
52       * @deprecated Use <code>update(BookmarksFolder bookmarksFolder, boolean merge)</code>.
53       */
54      public com.liferay.portlet.bookmarks.model.BookmarksFolder update(
55          com.liferay.portlet.bookmarks.model.BookmarksFolder bookmarksFolder)
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        bookmarksFolder 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 bookmarksFolder 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.BookmarksFolder update(
72          com.liferay.portlet.bookmarks.model.BookmarksFolder bookmarksFolder,
73          boolean merge) throws com.liferay.portal.SystemException;
74  
75      public com.liferay.portlet.bookmarks.model.BookmarksFolder updateImpl(
76          com.liferay.portlet.bookmarks.model.BookmarksFolder bookmarksFolder,
77          boolean merge) throws com.liferay.portal.SystemException;
78  
79      public com.liferay.portlet.bookmarks.model.BookmarksFolder findByPrimaryKey(
80          long folderId)
81          throws com.liferay.portal.SystemException,
82              com.liferay.portlet.bookmarks.NoSuchFolderException;
83  
84      public com.liferay.portlet.bookmarks.model.BookmarksFolder fetchByPrimaryKey(
85          long folderId) throws com.liferay.portal.SystemException;
86  
87      public java.util.List<com.liferay.portlet.bookmarks.model.BookmarksFolder> findByUuid(
88          java.lang.String uuid) throws com.liferay.portal.SystemException;
89  
90      public java.util.List<com.liferay.portlet.bookmarks.model.BookmarksFolder> 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.BookmarksFolder> 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.BookmarksFolder 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.NoSuchFolderException;
104 
105     public com.liferay.portlet.bookmarks.model.BookmarksFolder 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.NoSuchFolderException;
110 
111     public com.liferay.portlet.bookmarks.model.BookmarksFolder[] findByUuid_PrevAndNext(
112         long folderId, java.lang.String uuid,
113         com.liferay.portal.kernel.util.OrderByComparator obc)
114         throws com.liferay.portal.SystemException,
115             com.liferay.portlet.bookmarks.NoSuchFolderException;
116 
117     public com.liferay.portlet.bookmarks.model.BookmarksFolder findByUUID_G(
118         java.lang.String uuid, long groupId)
119         throws com.liferay.portal.SystemException,
120             com.liferay.portlet.bookmarks.NoSuchFolderException;
121 
122     public com.liferay.portlet.bookmarks.model.BookmarksFolder fetchByUUID_G(
123         java.lang.String uuid, long groupId)
124         throws com.liferay.portal.SystemException;
125 
126     public com.liferay.portlet.bookmarks.model.BookmarksFolder 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.BookmarksFolder> findByGroupId(
131         long groupId) throws com.liferay.portal.SystemException;
132 
133     public java.util.List<com.liferay.portlet.bookmarks.model.BookmarksFolder> 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.BookmarksFolder> 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.BookmarksFolder findByGroupId_First(
143         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
144         throws com.liferay.portal.SystemException,
145             com.liferay.portlet.bookmarks.NoSuchFolderException;
146 
147     public com.liferay.portlet.bookmarks.model.BookmarksFolder findByGroupId_Last(
148         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
149         throws com.liferay.portal.SystemException,
150             com.liferay.portlet.bookmarks.NoSuchFolderException;
151 
152     public com.liferay.portlet.bookmarks.model.BookmarksFolder[] findByGroupId_PrevAndNext(
153         long folderId, long groupId,
154         com.liferay.portal.kernel.util.OrderByComparator obc)
155         throws com.liferay.portal.SystemException,
156             com.liferay.portlet.bookmarks.NoSuchFolderException;
157 
158     public java.util.List<com.liferay.portlet.bookmarks.model.BookmarksFolder> findByCompanyId(
159         long companyId) throws com.liferay.portal.SystemException;
160 
161     public java.util.List<com.liferay.portlet.bookmarks.model.BookmarksFolder> findByCompanyId(
162         long companyId, int start, int end)
163         throws com.liferay.portal.SystemException;
164 
165     public java.util.List<com.liferay.portlet.bookmarks.model.BookmarksFolder> findByCompanyId(
166         long companyId, 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.BookmarksFolder findByCompanyId_First(
171         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
172         throws com.liferay.portal.SystemException,
173             com.liferay.portlet.bookmarks.NoSuchFolderException;
174 
175     public com.liferay.portlet.bookmarks.model.BookmarksFolder findByCompanyId_Last(
176         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
177         throws com.liferay.portal.SystemException,
178             com.liferay.portlet.bookmarks.NoSuchFolderException;
179 
180     public com.liferay.portlet.bookmarks.model.BookmarksFolder[] findByCompanyId_PrevAndNext(
181         long folderId, long companyId,
182         com.liferay.portal.kernel.util.OrderByComparator obc)
183         throws com.liferay.portal.SystemException,
184             com.liferay.portlet.bookmarks.NoSuchFolderException;
185 
186     public java.util.List<com.liferay.portlet.bookmarks.model.BookmarksFolder> findByG_P(
187         long groupId, long parentFolderId)
188         throws com.liferay.portal.SystemException;
189 
190     public java.util.List<com.liferay.portlet.bookmarks.model.BookmarksFolder> findByG_P(
191         long groupId, long parentFolderId, int start, int end)
192         throws com.liferay.portal.SystemException;
193 
194     public java.util.List<com.liferay.portlet.bookmarks.model.BookmarksFolder> findByG_P(
195         long groupId, long parentFolderId, int start, int end,
196         com.liferay.portal.kernel.util.OrderByComparator obc)
197         throws com.liferay.portal.SystemException;
198 
199     public com.liferay.portlet.bookmarks.model.BookmarksFolder findByG_P_First(
200         long groupId, long parentFolderId,
201         com.liferay.portal.kernel.util.OrderByComparator obc)
202         throws com.liferay.portal.SystemException,
203             com.liferay.portlet.bookmarks.NoSuchFolderException;
204 
205     public com.liferay.portlet.bookmarks.model.BookmarksFolder findByG_P_Last(
206         long groupId, long parentFolderId,
207         com.liferay.portal.kernel.util.OrderByComparator obc)
208         throws com.liferay.portal.SystemException,
209             com.liferay.portlet.bookmarks.NoSuchFolderException;
210 
211     public com.liferay.portlet.bookmarks.model.BookmarksFolder[] findByG_P_PrevAndNext(
212         long folderId, long groupId, long parentFolderId,
213         com.liferay.portal.kernel.util.OrderByComparator obc)
214         throws com.liferay.portal.SystemException,
215             com.liferay.portlet.bookmarks.NoSuchFolderException;
216 
217     public java.util.List<Object> findWithDynamicQuery(
218         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
219         throws com.liferay.portal.SystemException;
220 
221     public java.util.List<Object> findWithDynamicQuery(
222         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
223         int end) throws com.liferay.portal.SystemException;
224 
225     public java.util.List<com.liferay.portlet.bookmarks.model.BookmarksFolder> findAll()
226         throws com.liferay.portal.SystemException;
227 
228     public java.util.List<com.liferay.portlet.bookmarks.model.BookmarksFolder> findAll(
229         int start, int end) throws com.liferay.portal.SystemException;
230 
231     public java.util.List<com.liferay.portlet.bookmarks.model.BookmarksFolder> findAll(
232         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
233         throws com.liferay.portal.SystemException;
234 
235     public void removeByUuid(java.lang.String uuid)
236         throws com.liferay.portal.SystemException;
237 
238     public void removeByUUID_G(java.lang.String uuid, long groupId)
239         throws com.liferay.portal.SystemException,
240             com.liferay.portlet.bookmarks.NoSuchFolderException;
241 
242     public void removeByGroupId(long groupId)
243         throws com.liferay.portal.SystemException;
244 
245     public void removeByCompanyId(long companyId)
246         throws com.liferay.portal.SystemException;
247 
248     public void removeByG_P(long groupId, long parentFolderId)
249         throws com.liferay.portal.SystemException;
250 
251     public void removeAll() throws com.liferay.portal.SystemException;
252 
253     public int countByUuid(java.lang.String uuid)
254         throws com.liferay.portal.SystemException;
255 
256     public int countByUUID_G(java.lang.String uuid, long groupId)
257         throws com.liferay.portal.SystemException;
258 
259     public int countByGroupId(long groupId)
260         throws com.liferay.portal.SystemException;
261 
262     public int countByCompanyId(long companyId)
263         throws com.liferay.portal.SystemException;
264 
265     public int countByG_P(long groupId, long parentFolderId)
266         throws com.liferay.portal.SystemException;
267 
268     public int countAll() throws com.liferay.portal.SystemException;
269 }