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.documentlibrary.service.persistence;
21  
22  import com.liferay.portal.service.persistence.BasePersistence;
23  
24  /**
25   * <a href="DLFolderPersistence.java.html"><b><i>View Source</i></b></a>
26   *
27   * @author Brian Wing Shun Chan
28   *
29   */
30  public interface DLFolderPersistence extends BasePersistence {
31      public void cacheResult(
32          com.liferay.portlet.documentlibrary.model.DLFolder dlFolder);
33  
34      public void cacheResult(
35          java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> dlFolders);
36  
37      public void clearCache();
38  
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      public com.liferay.portlet.documentlibrary.model.DLFolder findByPrimaryKey(
80          long folderId)
81          throws com.liferay.portal.SystemException,
82              com.liferay.portlet.documentlibrary.NoSuchFolderException;
83  
84      public com.liferay.portlet.documentlibrary.model.DLFolder fetchByPrimaryKey(
85          long folderId) throws com.liferay.portal.SystemException;
86  
87      public java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> findByUuid(
88          java.lang.String uuid) throws com.liferay.portal.SystemException;
89  
90      public java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> 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.documentlibrary.model.DLFolder> 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.documentlibrary.model.DLFolder 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.documentlibrary.NoSuchFolderException;
104 
105     public com.liferay.portlet.documentlibrary.model.DLFolder 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.documentlibrary.NoSuchFolderException;
110 
111     public com.liferay.portlet.documentlibrary.model.DLFolder[] 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.documentlibrary.NoSuchFolderException;
116 
117     public com.liferay.portlet.documentlibrary.model.DLFolder findByUUID_G(
118         java.lang.String uuid, long groupId)
119         throws com.liferay.portal.SystemException,
120             com.liferay.portlet.documentlibrary.NoSuchFolderException;
121 
122     public com.liferay.portlet.documentlibrary.model.DLFolder fetchByUUID_G(
123         java.lang.String uuid, long groupId)
124         throws com.liferay.portal.SystemException;
125 
126     public com.liferay.portlet.documentlibrary.model.DLFolder 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.documentlibrary.model.DLFolder> findByGroupId(
131         long groupId) throws com.liferay.portal.SystemException;
132 
133     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> findByGroupId(
134         long groupId, int start, int end)
135         throws com.liferay.portal.SystemException;
136 
137     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> 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.documentlibrary.model.DLFolder findByGroupId_First(
143         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
144         throws com.liferay.portal.SystemException,
145             com.liferay.portlet.documentlibrary.NoSuchFolderException;
146 
147     public com.liferay.portlet.documentlibrary.model.DLFolder findByGroupId_Last(
148         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
149         throws com.liferay.portal.SystemException,
150             com.liferay.portlet.documentlibrary.NoSuchFolderException;
151 
152     public com.liferay.portlet.documentlibrary.model.DLFolder[] 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.documentlibrary.NoSuchFolderException;
157 
158     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> findByCompanyId(
159         long companyId) throws com.liferay.portal.SystemException;
160 
161     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> findByCompanyId(
162         long companyId, int start, int end)
163         throws com.liferay.portal.SystemException;
164 
165     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> 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.documentlibrary.model.DLFolder findByCompanyId_First(
171         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
172         throws com.liferay.portal.SystemException,
173             com.liferay.portlet.documentlibrary.NoSuchFolderException;
174 
175     public com.liferay.portlet.documentlibrary.model.DLFolder findByCompanyId_Last(
176         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
177         throws com.liferay.portal.SystemException,
178             com.liferay.portlet.documentlibrary.NoSuchFolderException;
179 
180     public com.liferay.portlet.documentlibrary.model.DLFolder[] 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.documentlibrary.NoSuchFolderException;
185 
186     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> findByG_P(
187         long groupId, long parentFolderId)
188         throws com.liferay.portal.SystemException;
189 
190     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> 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.documentlibrary.model.DLFolder> 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.documentlibrary.model.DLFolder 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.documentlibrary.NoSuchFolderException;
204 
205     public com.liferay.portlet.documentlibrary.model.DLFolder 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.documentlibrary.NoSuchFolderException;
210 
211     public com.liferay.portlet.documentlibrary.model.DLFolder[] 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.documentlibrary.NoSuchFolderException;
216 
217     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> findByP_N(
218         long parentFolderId, java.lang.String name)
219         throws com.liferay.portal.SystemException;
220 
221     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> findByP_N(
222         long parentFolderId, java.lang.String name, int start, int end)
223         throws com.liferay.portal.SystemException;
224 
225     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> findByP_N(
226         long parentFolderId, java.lang.String name, int start, int end,
227         com.liferay.portal.kernel.util.OrderByComparator obc)
228         throws com.liferay.portal.SystemException;
229 
230     public com.liferay.portlet.documentlibrary.model.DLFolder findByP_N_First(
231         long parentFolderId, java.lang.String name,
232         com.liferay.portal.kernel.util.OrderByComparator obc)
233         throws com.liferay.portal.SystemException,
234             com.liferay.portlet.documentlibrary.NoSuchFolderException;
235 
236     public com.liferay.portlet.documentlibrary.model.DLFolder findByP_N_Last(
237         long parentFolderId, java.lang.String name,
238         com.liferay.portal.kernel.util.OrderByComparator obc)
239         throws com.liferay.portal.SystemException,
240             com.liferay.portlet.documentlibrary.NoSuchFolderException;
241 
242     public com.liferay.portlet.documentlibrary.model.DLFolder[] findByP_N_PrevAndNext(
243         long folderId, long parentFolderId, java.lang.String name,
244         com.liferay.portal.kernel.util.OrderByComparator obc)
245         throws com.liferay.portal.SystemException,
246             com.liferay.portlet.documentlibrary.NoSuchFolderException;
247 
248     public com.liferay.portlet.documentlibrary.model.DLFolder findByG_P_N(
249         long groupId, long parentFolderId, java.lang.String name)
250         throws com.liferay.portal.SystemException,
251             com.liferay.portlet.documentlibrary.NoSuchFolderException;
252 
253     public com.liferay.portlet.documentlibrary.model.DLFolder fetchByG_P_N(
254         long groupId, long parentFolderId, java.lang.String name)
255         throws com.liferay.portal.SystemException;
256 
257     public com.liferay.portlet.documentlibrary.model.DLFolder fetchByG_P_N(
258         long groupId, long parentFolderId, java.lang.String name,
259         boolean retrieveFromCache) throws com.liferay.portal.SystemException;
260 
261     public java.util.List<Object> findWithDynamicQuery(
262         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
263         throws com.liferay.portal.SystemException;
264 
265     public java.util.List<Object> findWithDynamicQuery(
266         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
267         int end) throws com.liferay.portal.SystemException;
268 
269     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> findAll()
270         throws com.liferay.portal.SystemException;
271 
272     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> findAll(
273         int start, int end) throws com.liferay.portal.SystemException;
274 
275     public java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> findAll(
276         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
277         throws com.liferay.portal.SystemException;
278 
279     public void removeByUuid(java.lang.String uuid)
280         throws com.liferay.portal.SystemException;
281 
282     public void removeByUUID_G(java.lang.String uuid, long groupId)
283         throws com.liferay.portal.SystemException,
284             com.liferay.portlet.documentlibrary.NoSuchFolderException;
285 
286     public void removeByGroupId(long groupId)
287         throws com.liferay.portal.SystemException;
288 
289     public void removeByCompanyId(long companyId)
290         throws com.liferay.portal.SystemException;
291 
292     public void removeByG_P(long groupId, long parentFolderId)
293         throws com.liferay.portal.SystemException;
294 
295     public void removeByP_N(long parentFolderId, java.lang.String name)
296         throws com.liferay.portal.SystemException;
297 
298     public void removeByG_P_N(long groupId, long parentFolderId,
299         java.lang.String name)
300         throws com.liferay.portal.SystemException,
301             com.liferay.portlet.documentlibrary.NoSuchFolderException;
302 
303     public void removeAll() throws com.liferay.portal.SystemException;
304 
305     public int countByUuid(java.lang.String uuid)
306         throws com.liferay.portal.SystemException;
307 
308     public int countByUUID_G(java.lang.String uuid, long groupId)
309         throws com.liferay.portal.SystemException;
310 
311     public int countByGroupId(long groupId)
312         throws com.liferay.portal.SystemException;
313 
314     public int countByCompanyId(long companyId)
315         throws com.liferay.portal.SystemException;
316 
317     public int countByG_P(long groupId, long parentFolderId)
318         throws com.liferay.portal.SystemException;
319 
320     public int countByP_N(long parentFolderId, java.lang.String name)
321         throws com.liferay.portal.SystemException;
322 
323     public int countByG_P_N(long groupId, long parentFolderId,
324         java.lang.String name) throws com.liferay.portal.SystemException;
325 
326     public int countAll() throws com.liferay.portal.SystemException;
327 }