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  import com.liferay.portal.PortalException;
26  import com.liferay.portal.SystemException;
27  import com.liferay.portal.kernel.annotation.Propagation;
28  import com.liferay.portal.kernel.annotation.Transactional;
29  
30  /**
31   * <a href="DLFolderPersistence.java.html"><b><i>View Source</i></b></a>
32   *
33   * @author Brian Wing Shun Chan
34   *
35   */
36  @Transactional(rollbackFor =  {
37      PortalException.class, SystemException.class})
38  public interface DLFolderPersistence {
39      public com.liferay.portlet.documentlibrary.model.DLFolder create(
40          long folderId);
41  
42      public com.liferay.portlet.documentlibrary.model.DLFolder remove(
43          long folderId)
44          throws com.liferay.portal.SystemException,
45              com.liferay.portlet.documentlibrary.NoSuchFolderException;
46  
47      public com.liferay.portlet.documentlibrary.model.DLFolder remove(
48          com.liferay.portlet.documentlibrary.model.DLFolder dlFolder)
49          throws com.liferay.portal.SystemException;
50  
51      /**
52       * @deprecated Use <code>update(DLFolder dlFolder, boolean merge)</code>.
53       */
54      public com.liferay.portlet.documentlibrary.model.DLFolder update(
55          com.liferay.portlet.documentlibrary.model.DLFolder dlFolder)
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        dlFolder 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 dlFolder 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.documentlibrary.model.DLFolder update(
72          com.liferay.portlet.documentlibrary.model.DLFolder dlFolder,
73          boolean merge) throws com.liferay.portal.SystemException;
74  
75      public com.liferay.portlet.documentlibrary.model.DLFolder updateImpl(
76          com.liferay.portlet.documentlibrary.model.DLFolder dlFolder,
77          boolean merge) throws com.liferay.portal.SystemException;
78  
79      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
80      public com.liferay.portlet.documentlibrary.model.DLFolder findByPrimaryKey(
81          long folderId)
82          throws com.liferay.portal.SystemException,
83              com.liferay.portlet.documentlibrary.NoSuchFolderException;
84  
85      public com.liferay.portlet.documentlibrary.model.DLFolder fetchByPrimaryKey(
86          long folderId) throws com.liferay.portal.SystemException;
87  
88      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
89      public java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> findByUuid(
90          java.lang.String uuid) throws com.liferay.portal.SystemException;
91  
92      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
93      public java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> findByUuid(
94          java.lang.String uuid, int start, int end)
95          throws com.liferay.portal.SystemException;
96  
97      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
98      public java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> findByUuid(
99          java.lang.String uuid, int start, int end,
100         com.liferay.portal.kernel.util.OrderByComparator obc)
101         throws com.liferay.portal.SystemException;
102 
103     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
104     public com.liferay.portlet.documentlibrary.model.DLFolder findByUuid_First(
105         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     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
111     public com.liferay.portlet.documentlibrary.model.DLFolder findByUuid_Last(
112         java.lang.String uuid,
113         com.liferay.portal.kernel.util.OrderByComparator obc)
114         throws com.liferay.portal.SystemException,
115             com.liferay.portlet.documentlibrary.NoSuchFolderException;
116 
117     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
118     public com.liferay.portlet.documentlibrary.model.DLFolder[] findByUuid_PrevAndNext(
119         long folderId, java.lang.String uuid,
120         com.liferay.portal.kernel.util.OrderByComparator obc)
121         throws com.liferay.portal.SystemException,
122             com.liferay.portlet.documentlibrary.NoSuchFolderException;
123 
124     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
125     public com.liferay.portlet.documentlibrary.model.DLFolder findByUUID_G(
126         java.lang.String uuid, long groupId)
127         throws com.liferay.portal.SystemException,
128             com.liferay.portlet.documentlibrary.NoSuchFolderException;
129 
130     public com.liferay.portlet.documentlibrary.model.DLFolder fetchByUUID_G(
131         java.lang.String uuid, long groupId)
132         throws com.liferay.portal.SystemException;
133 
134     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
135     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> findByGroupId(
136         long groupId) throws com.liferay.portal.SystemException;
137 
138     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
139     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> findByGroupId(
140         long groupId, int start, int end)
141         throws com.liferay.portal.SystemException;
142 
143     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
144     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> findByGroupId(
145         long groupId, int start, int end,
146         com.liferay.portal.kernel.util.OrderByComparator obc)
147         throws com.liferay.portal.SystemException;
148 
149     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
150     public com.liferay.portlet.documentlibrary.model.DLFolder findByGroupId_First(
151         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
152         throws com.liferay.portal.SystemException,
153             com.liferay.portlet.documentlibrary.NoSuchFolderException;
154 
155     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
156     public com.liferay.portlet.documentlibrary.model.DLFolder findByGroupId_Last(
157         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
158         throws com.liferay.portal.SystemException,
159             com.liferay.portlet.documentlibrary.NoSuchFolderException;
160 
161     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
162     public com.liferay.portlet.documentlibrary.model.DLFolder[] findByGroupId_PrevAndNext(
163         long folderId, long groupId,
164         com.liferay.portal.kernel.util.OrderByComparator obc)
165         throws com.liferay.portal.SystemException,
166             com.liferay.portlet.documentlibrary.NoSuchFolderException;
167 
168     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
169     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> findByCompanyId(
170         long companyId) throws com.liferay.portal.SystemException;
171 
172     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
173     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> findByCompanyId(
174         long companyId, int start, int end)
175         throws com.liferay.portal.SystemException;
176 
177     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
178     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> findByCompanyId(
179         long companyId, int start, int end,
180         com.liferay.portal.kernel.util.OrderByComparator obc)
181         throws com.liferay.portal.SystemException;
182 
183     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
184     public com.liferay.portlet.documentlibrary.model.DLFolder findByCompanyId_First(
185         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
186         throws com.liferay.portal.SystemException,
187             com.liferay.portlet.documentlibrary.NoSuchFolderException;
188 
189     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
190     public com.liferay.portlet.documentlibrary.model.DLFolder findByCompanyId_Last(
191         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
192         throws com.liferay.portal.SystemException,
193             com.liferay.portlet.documentlibrary.NoSuchFolderException;
194 
195     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
196     public com.liferay.portlet.documentlibrary.model.DLFolder[] findByCompanyId_PrevAndNext(
197         long folderId, long companyId,
198         com.liferay.portal.kernel.util.OrderByComparator obc)
199         throws com.liferay.portal.SystemException,
200             com.liferay.portlet.documentlibrary.NoSuchFolderException;
201 
202     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
203     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> findByG_P(
204         long groupId, long parentFolderId)
205         throws com.liferay.portal.SystemException;
206 
207     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
208     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> findByG_P(
209         long groupId, long parentFolderId, int start, int end)
210         throws com.liferay.portal.SystemException;
211 
212     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
213     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> findByG_P(
214         long groupId, long parentFolderId, int start, int end,
215         com.liferay.portal.kernel.util.OrderByComparator obc)
216         throws com.liferay.portal.SystemException;
217 
218     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
219     public com.liferay.portlet.documentlibrary.model.DLFolder findByG_P_First(
220         long groupId, long parentFolderId,
221         com.liferay.portal.kernel.util.OrderByComparator obc)
222         throws com.liferay.portal.SystemException,
223             com.liferay.portlet.documentlibrary.NoSuchFolderException;
224 
225     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
226     public com.liferay.portlet.documentlibrary.model.DLFolder findByG_P_Last(
227         long groupId, long parentFolderId,
228         com.liferay.portal.kernel.util.OrderByComparator obc)
229         throws com.liferay.portal.SystemException,
230             com.liferay.portlet.documentlibrary.NoSuchFolderException;
231 
232     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
233     public com.liferay.portlet.documentlibrary.model.DLFolder[] findByG_P_PrevAndNext(
234         long folderId, long groupId, long parentFolderId,
235         com.liferay.portal.kernel.util.OrderByComparator obc)
236         throws com.liferay.portal.SystemException,
237             com.liferay.portlet.documentlibrary.NoSuchFolderException;
238 
239     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
240     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> findByP_N(
241         long parentFolderId, java.lang.String name)
242         throws com.liferay.portal.SystemException;
243 
244     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
245     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> findByP_N(
246         long parentFolderId, java.lang.String name, int start, int end)
247         throws com.liferay.portal.SystemException;
248 
249     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
250     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> findByP_N(
251         long parentFolderId, java.lang.String name, int start, int end,
252         com.liferay.portal.kernel.util.OrderByComparator obc)
253         throws com.liferay.portal.SystemException;
254 
255     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
256     public com.liferay.portlet.documentlibrary.model.DLFolder findByP_N_First(
257         long parentFolderId, java.lang.String name,
258         com.liferay.portal.kernel.util.OrderByComparator obc)
259         throws com.liferay.portal.SystemException,
260             com.liferay.portlet.documentlibrary.NoSuchFolderException;
261 
262     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
263     public com.liferay.portlet.documentlibrary.model.DLFolder findByP_N_Last(
264         long parentFolderId, java.lang.String name,
265         com.liferay.portal.kernel.util.OrderByComparator obc)
266         throws com.liferay.portal.SystemException,
267             com.liferay.portlet.documentlibrary.NoSuchFolderException;
268 
269     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
270     public com.liferay.portlet.documentlibrary.model.DLFolder[] findByP_N_PrevAndNext(
271         long folderId, long parentFolderId, java.lang.String name,
272         com.liferay.portal.kernel.util.OrderByComparator obc)
273         throws com.liferay.portal.SystemException,
274             com.liferay.portlet.documentlibrary.NoSuchFolderException;
275 
276     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
277     public com.liferay.portlet.documentlibrary.model.DLFolder findByG_P_N(
278         long groupId, long parentFolderId, java.lang.String name)
279         throws com.liferay.portal.SystemException,
280             com.liferay.portlet.documentlibrary.NoSuchFolderException;
281 
282     public com.liferay.portlet.documentlibrary.model.DLFolder fetchByG_P_N(
283         long groupId, long parentFolderId, java.lang.String name)
284         throws com.liferay.portal.SystemException;
285 
286     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
287     public java.util.List<Object> findWithDynamicQuery(
288         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
289         throws com.liferay.portal.SystemException;
290 
291     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
292     public java.util.List<Object> findWithDynamicQuery(
293         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
294         int end) throws com.liferay.portal.SystemException;
295 
296     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
297     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> findAll()
298         throws com.liferay.portal.SystemException;
299 
300     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
301     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> findAll(
302         int start, int end) throws com.liferay.portal.SystemException;
303 
304     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
305     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> findAll(
306         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
307         throws com.liferay.portal.SystemException;
308 
309     public void removeByUuid(java.lang.String uuid)
310         throws com.liferay.portal.SystemException;
311 
312     public void removeByUUID_G(java.lang.String uuid, long groupId)
313         throws com.liferay.portal.SystemException,
314             com.liferay.portlet.documentlibrary.NoSuchFolderException;
315 
316     public void removeByGroupId(long groupId)
317         throws com.liferay.portal.SystemException;
318 
319     public void removeByCompanyId(long companyId)
320         throws com.liferay.portal.SystemException;
321 
322     public void removeByG_P(long groupId, long parentFolderId)
323         throws com.liferay.portal.SystemException;
324 
325     public void removeByP_N(long parentFolderId, java.lang.String name)
326         throws com.liferay.portal.SystemException;
327 
328     public void removeByG_P_N(long groupId, long parentFolderId,
329         java.lang.String name)
330         throws com.liferay.portal.SystemException,
331             com.liferay.portlet.documentlibrary.NoSuchFolderException;
332 
333     public void removeAll() throws com.liferay.portal.SystemException;
334 
335     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
336     public int countByUuid(java.lang.String uuid)
337         throws com.liferay.portal.SystemException;
338 
339     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
340     public int countByUUID_G(java.lang.String uuid, long groupId)
341         throws com.liferay.portal.SystemException;
342 
343     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
344     public int countByGroupId(long groupId)
345         throws com.liferay.portal.SystemException;
346 
347     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
348     public int countByCompanyId(long companyId)
349         throws com.liferay.portal.SystemException;
350 
351     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
352     public int countByG_P(long groupId, long parentFolderId)
353         throws com.liferay.portal.SystemException;
354 
355     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
356     public int countByP_N(long parentFolderId, java.lang.String name)
357         throws com.liferay.portal.SystemException;
358 
359     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
360     public int countByG_P_N(long groupId, long parentFolderId,
361         java.lang.String name) throws com.liferay.portal.SystemException;
362 
363     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
364     public int countAll() throws com.liferay.portal.SystemException;
365 
366     public void registerListener(
367         com.liferay.portal.model.ModelListener listener);
368 
369     public void unregisterListener(
370         com.liferay.portal.model.ModelListener listener);
371 }