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.documentlibrary.service.persistence;
24  
25  /**
26   * <a href="DLFolderPersistence.java.html"><b><i>View Source</i></b></a>
27   *
28   * @author Brian Wing Shun Chan
29   *
30   */
31  public interface DLFolderPersistence {
32      public com.liferay.portlet.documentlibrary.model.DLFolder create(
33          long folderId);
34  
35      public com.liferay.portlet.documentlibrary.model.DLFolder remove(
36          long folderId)
37          throws com.liferay.portal.SystemException,
38              com.liferay.portlet.documentlibrary.NoSuchFolderException;
39  
40      public com.liferay.portlet.documentlibrary.model.DLFolder remove(
41          com.liferay.portlet.documentlibrary.model.DLFolder dlFolder)
42          throws com.liferay.portal.SystemException;
43  
44      /**
45       * @deprecated Use <code>update(DLFolder dlFolder, boolean merge)</code>.
46       */
47      public com.liferay.portlet.documentlibrary.model.DLFolder update(
48          com.liferay.portlet.documentlibrary.model.DLFolder dlFolder)
49          throws com.liferay.portal.SystemException;
50  
51      /**
52       * Add, update, or merge, the entity. This method also calls the model
53       * listeners to trigger the proper events associated with adding, deleting,
54       * or updating an entity.
55       *
56       * @param        dlFolder the entity to add, update, or merge
57       * @param        merge boolean value for whether to merge the entity. The
58       *                default value is false. Setting merge to true is more
59       *                expensive and should only be true when dlFolder is
60       *                transient. See LEP-5473 for a detailed discussion of this
61       *                method.
62       * @return        true if the portlet can be displayed via Ajax
63       */
64      public com.liferay.portlet.documentlibrary.model.DLFolder update(
65          com.liferay.portlet.documentlibrary.model.DLFolder dlFolder,
66          boolean merge) throws com.liferay.portal.SystemException;
67  
68      public com.liferay.portlet.documentlibrary.model.DLFolder updateImpl(
69          com.liferay.portlet.documentlibrary.model.DLFolder dlFolder,
70          boolean merge) throws com.liferay.portal.SystemException;
71  
72      public com.liferay.portlet.documentlibrary.model.DLFolder findByPrimaryKey(
73          long folderId)
74          throws com.liferay.portal.SystemException,
75              com.liferay.portlet.documentlibrary.NoSuchFolderException;
76  
77      public com.liferay.portlet.documentlibrary.model.DLFolder fetchByPrimaryKey(
78          long folderId) throws com.liferay.portal.SystemException;
79  
80      public java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> findByUuid(
81          java.lang.String uuid) throws com.liferay.portal.SystemException;
82  
83      public java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> findByUuid(
84          java.lang.String uuid, int start, int end)
85          throws com.liferay.portal.SystemException;
86  
87      public java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> findByUuid(
88          java.lang.String uuid, int start, int end,
89          com.liferay.portal.kernel.util.OrderByComparator obc)
90          throws com.liferay.portal.SystemException;
91  
92      public com.liferay.portlet.documentlibrary.model.DLFolder findByUuid_First(
93          java.lang.String uuid,
94          com.liferay.portal.kernel.util.OrderByComparator obc)
95          throws com.liferay.portal.SystemException,
96              com.liferay.portlet.documentlibrary.NoSuchFolderException;
97  
98      public com.liferay.portlet.documentlibrary.model.DLFolder findByUuid_Last(
99          java.lang.String uuid,
100         com.liferay.portal.kernel.util.OrderByComparator obc)
101         throws com.liferay.portal.SystemException,
102             com.liferay.portlet.documentlibrary.NoSuchFolderException;
103 
104     public com.liferay.portlet.documentlibrary.model.DLFolder[] findByUuid_PrevAndNext(
105         long folderId, java.lang.String uuid,
106         com.liferay.portal.kernel.util.OrderByComparator obc)
107         throws com.liferay.portal.SystemException,
108             com.liferay.portlet.documentlibrary.NoSuchFolderException;
109 
110     public com.liferay.portlet.documentlibrary.model.DLFolder findByUUID_G(
111         java.lang.String uuid, long groupId)
112         throws com.liferay.portal.SystemException,
113             com.liferay.portlet.documentlibrary.NoSuchFolderException;
114 
115     public com.liferay.portlet.documentlibrary.model.DLFolder fetchByUUID_G(
116         java.lang.String uuid, long groupId)
117         throws com.liferay.portal.SystemException;
118 
119     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> findByGroupId(
120         long groupId) throws com.liferay.portal.SystemException;
121 
122     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> findByGroupId(
123         long groupId, int start, int end)
124         throws com.liferay.portal.SystemException;
125 
126     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> findByGroupId(
127         long groupId, int start, int end,
128         com.liferay.portal.kernel.util.OrderByComparator obc)
129         throws com.liferay.portal.SystemException;
130 
131     public com.liferay.portlet.documentlibrary.model.DLFolder findByGroupId_First(
132         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
133         throws com.liferay.portal.SystemException,
134             com.liferay.portlet.documentlibrary.NoSuchFolderException;
135 
136     public com.liferay.portlet.documentlibrary.model.DLFolder findByGroupId_Last(
137         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
138         throws com.liferay.portal.SystemException,
139             com.liferay.portlet.documentlibrary.NoSuchFolderException;
140 
141     public com.liferay.portlet.documentlibrary.model.DLFolder[] findByGroupId_PrevAndNext(
142         long folderId, long groupId,
143         com.liferay.portal.kernel.util.OrderByComparator obc)
144         throws com.liferay.portal.SystemException,
145             com.liferay.portlet.documentlibrary.NoSuchFolderException;
146 
147     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> findByCompanyId(
148         long companyId) throws com.liferay.portal.SystemException;
149 
150     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> findByCompanyId(
151         long companyId, int start, int end)
152         throws com.liferay.portal.SystemException;
153 
154     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> findByCompanyId(
155         long companyId, int start, int end,
156         com.liferay.portal.kernel.util.OrderByComparator obc)
157         throws com.liferay.portal.SystemException;
158 
159     public com.liferay.portlet.documentlibrary.model.DLFolder findByCompanyId_First(
160         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
161         throws com.liferay.portal.SystemException,
162             com.liferay.portlet.documentlibrary.NoSuchFolderException;
163 
164     public com.liferay.portlet.documentlibrary.model.DLFolder findByCompanyId_Last(
165         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
166         throws com.liferay.portal.SystemException,
167             com.liferay.portlet.documentlibrary.NoSuchFolderException;
168 
169     public com.liferay.portlet.documentlibrary.model.DLFolder[] findByCompanyId_PrevAndNext(
170         long folderId, long companyId,
171         com.liferay.portal.kernel.util.OrderByComparator obc)
172         throws com.liferay.portal.SystemException,
173             com.liferay.portlet.documentlibrary.NoSuchFolderException;
174 
175     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> findByG_P(
176         long groupId, long parentFolderId)
177         throws com.liferay.portal.SystemException;
178 
179     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> findByG_P(
180         long groupId, long parentFolderId, int start, int end)
181         throws com.liferay.portal.SystemException;
182 
183     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> findByG_P(
184         long groupId, long parentFolderId, int start, int end,
185         com.liferay.portal.kernel.util.OrderByComparator obc)
186         throws com.liferay.portal.SystemException;
187 
188     public com.liferay.portlet.documentlibrary.model.DLFolder findByG_P_First(
189         long groupId, long parentFolderId,
190         com.liferay.portal.kernel.util.OrderByComparator obc)
191         throws com.liferay.portal.SystemException,
192             com.liferay.portlet.documentlibrary.NoSuchFolderException;
193 
194     public com.liferay.portlet.documentlibrary.model.DLFolder findByG_P_Last(
195         long groupId, long parentFolderId,
196         com.liferay.portal.kernel.util.OrderByComparator obc)
197         throws com.liferay.portal.SystemException,
198             com.liferay.portlet.documentlibrary.NoSuchFolderException;
199 
200     public com.liferay.portlet.documentlibrary.model.DLFolder[] findByG_P_PrevAndNext(
201         long folderId, long groupId, long parentFolderId,
202         com.liferay.portal.kernel.util.OrderByComparator obc)
203         throws com.liferay.portal.SystemException,
204             com.liferay.portlet.documentlibrary.NoSuchFolderException;
205 
206     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> findByP_N(
207         long parentFolderId, java.lang.String name)
208         throws com.liferay.portal.SystemException;
209 
210     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> findByP_N(
211         long parentFolderId, java.lang.String name, int start, int end)
212         throws com.liferay.portal.SystemException;
213 
214     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> findByP_N(
215         long parentFolderId, java.lang.String name, int start, int end,
216         com.liferay.portal.kernel.util.OrderByComparator obc)
217         throws com.liferay.portal.SystemException;
218 
219     public com.liferay.portlet.documentlibrary.model.DLFolder findByP_N_First(
220         long parentFolderId, java.lang.String name,
221         com.liferay.portal.kernel.util.OrderByComparator obc)
222         throws com.liferay.portal.SystemException,
223             com.liferay.portlet.documentlibrary.NoSuchFolderException;
224 
225     public com.liferay.portlet.documentlibrary.model.DLFolder findByP_N_Last(
226         long parentFolderId, java.lang.String name,
227         com.liferay.portal.kernel.util.OrderByComparator obc)
228         throws com.liferay.portal.SystemException,
229             com.liferay.portlet.documentlibrary.NoSuchFolderException;
230 
231     public com.liferay.portlet.documentlibrary.model.DLFolder[] findByP_N_PrevAndNext(
232         long folderId, long parentFolderId, java.lang.String name,
233         com.liferay.portal.kernel.util.OrderByComparator obc)
234         throws com.liferay.portal.SystemException,
235             com.liferay.portlet.documentlibrary.NoSuchFolderException;
236 
237     public com.liferay.portlet.documentlibrary.model.DLFolder findByG_P_N(
238         long groupId, long parentFolderId, java.lang.String name)
239         throws com.liferay.portal.SystemException,
240             com.liferay.portlet.documentlibrary.NoSuchFolderException;
241 
242     public com.liferay.portlet.documentlibrary.model.DLFolder fetchByG_P_N(
243         long groupId, long parentFolderId, java.lang.String name)
244         throws com.liferay.portal.SystemException;
245 
246     public java.util.List<Object> findWithDynamicQuery(
247         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
248         throws com.liferay.portal.SystemException;
249 
250     public java.util.List<Object> findWithDynamicQuery(
251         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
252         int end) throws com.liferay.portal.SystemException;
253 
254     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> findAll()
255         throws com.liferay.portal.SystemException;
256 
257     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> findAll(
258         int start, int end) throws com.liferay.portal.SystemException;
259 
260     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> findAll(
261         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
262         throws com.liferay.portal.SystemException;
263 
264     public void removeByUuid(java.lang.String uuid)
265         throws com.liferay.portal.SystemException;
266 
267     public void removeByUUID_G(java.lang.String uuid, long groupId)
268         throws com.liferay.portal.SystemException,
269             com.liferay.portlet.documentlibrary.NoSuchFolderException;
270 
271     public void removeByGroupId(long groupId)
272         throws com.liferay.portal.SystemException;
273 
274     public void removeByCompanyId(long companyId)
275         throws com.liferay.portal.SystemException;
276 
277     public void removeByG_P(long groupId, long parentFolderId)
278         throws com.liferay.portal.SystemException;
279 
280     public void removeByP_N(long parentFolderId, java.lang.String name)
281         throws com.liferay.portal.SystemException;
282 
283     public void removeByG_P_N(long groupId, long parentFolderId,
284         java.lang.String name)
285         throws com.liferay.portal.SystemException,
286             com.liferay.portlet.documentlibrary.NoSuchFolderException;
287 
288     public void removeAll() throws com.liferay.portal.SystemException;
289 
290     public int countByUuid(java.lang.String uuid)
291         throws com.liferay.portal.SystemException;
292 
293     public int countByUUID_G(java.lang.String uuid, long groupId)
294         throws com.liferay.portal.SystemException;
295 
296     public int countByGroupId(long groupId)
297         throws com.liferay.portal.SystemException;
298 
299     public int countByCompanyId(long companyId)
300         throws com.liferay.portal.SystemException;
301 
302     public int countByG_P(long groupId, long parentFolderId)
303         throws com.liferay.portal.SystemException;
304 
305     public int countByP_N(long parentFolderId, java.lang.String name)
306         throws com.liferay.portal.SystemException;
307 
308     public int countByG_P_N(long groupId, long parentFolderId,
309         java.lang.String name) throws com.liferay.portal.SystemException;
310 
311     public int countAll() throws com.liferay.portal.SystemException;
312 
313     public void registerListener(
314         com.liferay.portal.model.ModelListener listener);
315 
316     public void unregisterListener(
317         com.liferay.portal.model.ModelListener listener);
318 }