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="DLFolderUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * @author Brian Wing Shun Chan
29   *
30   */
31  public class DLFolderUtil {
32      public static com.liferay.portlet.documentlibrary.model.DLFolder create(
33          long folderId) {
34          return getPersistence().create(folderId);
35      }
36  
37      public static com.liferay.portlet.documentlibrary.model.DLFolder remove(
38          long folderId)
39          throws com.liferay.portal.SystemException,
40              com.liferay.portlet.documentlibrary.NoSuchFolderException {
41          return getPersistence().remove(folderId);
42      }
43  
44      public static com.liferay.portlet.documentlibrary.model.DLFolder remove(
45          com.liferay.portlet.documentlibrary.model.DLFolder dlFolder)
46          throws com.liferay.portal.SystemException {
47          return getPersistence().remove(dlFolder);
48      }
49  
50      /**
51       * @deprecated Use <code>update(DLFolder dlFolder, boolean merge)</code>.
52       */
53      public static com.liferay.portlet.documentlibrary.model.DLFolder update(
54          com.liferay.portlet.documentlibrary.model.DLFolder dlFolder)
55          throws com.liferay.portal.SystemException {
56          return getPersistence().update(dlFolder);
57      }
58  
59      /**
60       * Add, update, or merge, the entity. This method also calls the model
61       * listeners to trigger the proper events associated with adding, deleting,
62       * or updating an entity.
63       *
64       * @param        dlFolder the entity to add, update, or merge
65       * @param        merge boolean value for whether to merge the entity. The
66       *                default value is false. Setting merge to true is more
67       *                expensive and should only be true when dlFolder is
68       *                transient. See LEP-5473 for a detailed discussion of this
69       *                method.
70       * @return        true if the portlet can be displayed via Ajax
71       */
72      public static com.liferay.portlet.documentlibrary.model.DLFolder update(
73          com.liferay.portlet.documentlibrary.model.DLFolder dlFolder,
74          boolean merge) throws com.liferay.portal.SystemException {
75          return getPersistence().update(dlFolder, merge);
76      }
77  
78      public static com.liferay.portlet.documentlibrary.model.DLFolder updateImpl(
79          com.liferay.portlet.documentlibrary.model.DLFolder dlFolder,
80          boolean merge) throws com.liferay.portal.SystemException {
81          return getPersistence().updateImpl(dlFolder, merge);
82      }
83  
84      public static com.liferay.portlet.documentlibrary.model.DLFolder findByPrimaryKey(
85          long folderId)
86          throws com.liferay.portal.SystemException,
87              com.liferay.portlet.documentlibrary.NoSuchFolderException {
88          return getPersistence().findByPrimaryKey(folderId);
89      }
90  
91      public static com.liferay.portlet.documentlibrary.model.DLFolder fetchByPrimaryKey(
92          long folderId) throws com.liferay.portal.SystemException {
93          return getPersistence().fetchByPrimaryKey(folderId);
94      }
95  
96      public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> findByUuid(
97          java.lang.String uuid) throws com.liferay.portal.SystemException {
98          return getPersistence().findByUuid(uuid);
99      }
100 
101     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> findByUuid(
102         java.lang.String uuid, int begin, int end)
103         throws com.liferay.portal.SystemException {
104         return getPersistence().findByUuid(uuid, begin, end);
105     }
106 
107     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> findByUuid(
108         java.lang.String uuid, int begin, int end,
109         com.liferay.portal.kernel.util.OrderByComparator obc)
110         throws com.liferay.portal.SystemException {
111         return getPersistence().findByUuid(uuid, begin, end, obc);
112     }
113 
114     public static com.liferay.portlet.documentlibrary.model.DLFolder findByUuid_First(
115         java.lang.String uuid,
116         com.liferay.portal.kernel.util.OrderByComparator obc)
117         throws com.liferay.portal.SystemException,
118             com.liferay.portlet.documentlibrary.NoSuchFolderException {
119         return getPersistence().findByUuid_First(uuid, obc);
120     }
121 
122     public static com.liferay.portlet.documentlibrary.model.DLFolder findByUuid_Last(
123         java.lang.String uuid,
124         com.liferay.portal.kernel.util.OrderByComparator obc)
125         throws com.liferay.portal.SystemException,
126             com.liferay.portlet.documentlibrary.NoSuchFolderException {
127         return getPersistence().findByUuid_Last(uuid, obc);
128     }
129 
130     public static com.liferay.portlet.documentlibrary.model.DLFolder[] findByUuid_PrevAndNext(
131         long folderId, java.lang.String uuid,
132         com.liferay.portal.kernel.util.OrderByComparator obc)
133         throws com.liferay.portal.SystemException,
134             com.liferay.portlet.documentlibrary.NoSuchFolderException {
135         return getPersistence().findByUuid_PrevAndNext(folderId, uuid, obc);
136     }
137 
138     public static com.liferay.portlet.documentlibrary.model.DLFolder findByUUID_G(
139         java.lang.String uuid, long groupId)
140         throws com.liferay.portal.SystemException,
141             com.liferay.portlet.documentlibrary.NoSuchFolderException {
142         return getPersistence().findByUUID_G(uuid, groupId);
143     }
144 
145     public static com.liferay.portlet.documentlibrary.model.DLFolder fetchByUUID_G(
146         java.lang.String uuid, long groupId)
147         throws com.liferay.portal.SystemException {
148         return getPersistence().fetchByUUID_G(uuid, groupId);
149     }
150 
151     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> findByGroupId(
152         long groupId) throws com.liferay.portal.SystemException {
153         return getPersistence().findByGroupId(groupId);
154     }
155 
156     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> findByGroupId(
157         long groupId, int begin, int end)
158         throws com.liferay.portal.SystemException {
159         return getPersistence().findByGroupId(groupId, begin, end);
160     }
161 
162     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> findByGroupId(
163         long groupId, int begin, int end,
164         com.liferay.portal.kernel.util.OrderByComparator obc)
165         throws com.liferay.portal.SystemException {
166         return getPersistence().findByGroupId(groupId, begin, end, obc);
167     }
168 
169     public static com.liferay.portlet.documentlibrary.model.DLFolder findByGroupId_First(
170         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
171         throws com.liferay.portal.SystemException,
172             com.liferay.portlet.documentlibrary.NoSuchFolderException {
173         return getPersistence().findByGroupId_First(groupId, obc);
174     }
175 
176     public static com.liferay.portlet.documentlibrary.model.DLFolder findByGroupId_Last(
177         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
178         throws com.liferay.portal.SystemException,
179             com.liferay.portlet.documentlibrary.NoSuchFolderException {
180         return getPersistence().findByGroupId_Last(groupId, obc);
181     }
182 
183     public static com.liferay.portlet.documentlibrary.model.DLFolder[] findByGroupId_PrevAndNext(
184         long folderId, long groupId,
185         com.liferay.portal.kernel.util.OrderByComparator obc)
186         throws com.liferay.portal.SystemException,
187             com.liferay.portlet.documentlibrary.NoSuchFolderException {
188         return getPersistence().findByGroupId_PrevAndNext(folderId, groupId, obc);
189     }
190 
191     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> findByCompanyId(
192         long companyId) throws com.liferay.portal.SystemException {
193         return getPersistence().findByCompanyId(companyId);
194     }
195 
196     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> findByCompanyId(
197         long companyId, int begin, int end)
198         throws com.liferay.portal.SystemException {
199         return getPersistence().findByCompanyId(companyId, begin, end);
200     }
201 
202     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> findByCompanyId(
203         long companyId, int begin, int end,
204         com.liferay.portal.kernel.util.OrderByComparator obc)
205         throws com.liferay.portal.SystemException {
206         return getPersistence().findByCompanyId(companyId, begin, end, obc);
207     }
208 
209     public static com.liferay.portlet.documentlibrary.model.DLFolder findByCompanyId_First(
210         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
211         throws com.liferay.portal.SystemException,
212             com.liferay.portlet.documentlibrary.NoSuchFolderException {
213         return getPersistence().findByCompanyId_First(companyId, obc);
214     }
215 
216     public static com.liferay.portlet.documentlibrary.model.DLFolder findByCompanyId_Last(
217         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
218         throws com.liferay.portal.SystemException,
219             com.liferay.portlet.documentlibrary.NoSuchFolderException {
220         return getPersistence().findByCompanyId_Last(companyId, obc);
221     }
222 
223     public static com.liferay.portlet.documentlibrary.model.DLFolder[] findByCompanyId_PrevAndNext(
224         long folderId, long companyId,
225         com.liferay.portal.kernel.util.OrderByComparator obc)
226         throws com.liferay.portal.SystemException,
227             com.liferay.portlet.documentlibrary.NoSuchFolderException {
228         return getPersistence()
229                    .findByCompanyId_PrevAndNext(folderId, companyId, obc);
230     }
231 
232     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> findByG_P(
233         long groupId, long parentFolderId)
234         throws com.liferay.portal.SystemException {
235         return getPersistence().findByG_P(groupId, parentFolderId);
236     }
237 
238     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> findByG_P(
239         long groupId, long parentFolderId, int begin, int end)
240         throws com.liferay.portal.SystemException {
241         return getPersistence().findByG_P(groupId, parentFolderId, begin, end);
242     }
243 
244     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> findByG_P(
245         long groupId, long parentFolderId, int begin, int end,
246         com.liferay.portal.kernel.util.OrderByComparator obc)
247         throws com.liferay.portal.SystemException {
248         return getPersistence()
249                    .findByG_P(groupId, parentFolderId, begin, end, obc);
250     }
251 
252     public static com.liferay.portlet.documentlibrary.model.DLFolder findByG_P_First(
253         long groupId, long parentFolderId,
254         com.liferay.portal.kernel.util.OrderByComparator obc)
255         throws com.liferay.portal.SystemException,
256             com.liferay.portlet.documentlibrary.NoSuchFolderException {
257         return getPersistence().findByG_P_First(groupId, parentFolderId, obc);
258     }
259 
260     public static com.liferay.portlet.documentlibrary.model.DLFolder findByG_P_Last(
261         long groupId, long parentFolderId,
262         com.liferay.portal.kernel.util.OrderByComparator obc)
263         throws com.liferay.portal.SystemException,
264             com.liferay.portlet.documentlibrary.NoSuchFolderException {
265         return getPersistence().findByG_P_Last(groupId, parentFolderId, obc);
266     }
267 
268     public static com.liferay.portlet.documentlibrary.model.DLFolder[] findByG_P_PrevAndNext(
269         long folderId, long groupId, long parentFolderId,
270         com.liferay.portal.kernel.util.OrderByComparator obc)
271         throws com.liferay.portal.SystemException,
272             com.liferay.portlet.documentlibrary.NoSuchFolderException {
273         return getPersistence()
274                    .findByG_P_PrevAndNext(folderId, groupId, parentFolderId, obc);
275     }
276 
277     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> findByP_N(
278         long parentFolderId, java.lang.String name)
279         throws com.liferay.portal.SystemException {
280         return getPersistence().findByP_N(parentFolderId, name);
281     }
282 
283     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> findByP_N(
284         long parentFolderId, java.lang.String name, int begin, int end)
285         throws com.liferay.portal.SystemException {
286         return getPersistence().findByP_N(parentFolderId, name, begin, end);
287     }
288 
289     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> findByP_N(
290         long parentFolderId, java.lang.String name, int begin, int end,
291         com.liferay.portal.kernel.util.OrderByComparator obc)
292         throws com.liferay.portal.SystemException {
293         return getPersistence().findByP_N(parentFolderId, name, begin, end, obc);
294     }
295 
296     public static com.liferay.portlet.documentlibrary.model.DLFolder findByP_N_First(
297         long parentFolderId, java.lang.String name,
298         com.liferay.portal.kernel.util.OrderByComparator obc)
299         throws com.liferay.portal.SystemException,
300             com.liferay.portlet.documentlibrary.NoSuchFolderException {
301         return getPersistence().findByP_N_First(parentFolderId, name, obc);
302     }
303 
304     public static com.liferay.portlet.documentlibrary.model.DLFolder findByP_N_Last(
305         long parentFolderId, java.lang.String name,
306         com.liferay.portal.kernel.util.OrderByComparator obc)
307         throws com.liferay.portal.SystemException,
308             com.liferay.portlet.documentlibrary.NoSuchFolderException {
309         return getPersistence().findByP_N_Last(parentFolderId, name, obc);
310     }
311 
312     public static com.liferay.portlet.documentlibrary.model.DLFolder[] findByP_N_PrevAndNext(
313         long folderId, long parentFolderId, java.lang.String name,
314         com.liferay.portal.kernel.util.OrderByComparator obc)
315         throws com.liferay.portal.SystemException,
316             com.liferay.portlet.documentlibrary.NoSuchFolderException {
317         return getPersistence()
318                    .findByP_N_PrevAndNext(folderId, parentFolderId, name, obc);
319     }
320 
321     public static com.liferay.portlet.documentlibrary.model.DLFolder findByG_P_N(
322         long groupId, long parentFolderId, java.lang.String name)
323         throws com.liferay.portal.SystemException,
324             com.liferay.portlet.documentlibrary.NoSuchFolderException {
325         return getPersistence().findByG_P_N(groupId, parentFolderId, name);
326     }
327 
328     public static com.liferay.portlet.documentlibrary.model.DLFolder fetchByG_P_N(
329         long groupId, long parentFolderId, java.lang.String name)
330         throws com.liferay.portal.SystemException {
331         return getPersistence().fetchByG_P_N(groupId, parentFolderId, name);
332     }
333 
334     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> findWithDynamicQuery(
335         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
336         throws com.liferay.portal.SystemException {
337         return getPersistence().findWithDynamicQuery(queryInitializer);
338     }
339 
340     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> findWithDynamicQuery(
341         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
342         int begin, int end) throws com.liferay.portal.SystemException {
343         return getPersistence()
344                    .findWithDynamicQuery(queryInitializer, begin, end);
345     }
346 
347     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> findAll()
348         throws com.liferay.portal.SystemException {
349         return getPersistence().findAll();
350     }
351 
352     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> findAll(
353         int begin, int end) throws com.liferay.portal.SystemException {
354         return getPersistence().findAll(begin, end);
355     }
356 
357     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> findAll(
358         int begin, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
359         throws com.liferay.portal.SystemException {
360         return getPersistence().findAll(begin, end, obc);
361     }
362 
363     public static void removeByUuid(java.lang.String uuid)
364         throws com.liferay.portal.SystemException {
365         getPersistence().removeByUuid(uuid);
366     }
367 
368     public static void removeByUUID_G(java.lang.String uuid, long groupId)
369         throws com.liferay.portal.SystemException,
370             com.liferay.portlet.documentlibrary.NoSuchFolderException {
371         getPersistence().removeByUUID_G(uuid, groupId);
372     }
373 
374     public static void removeByGroupId(long groupId)
375         throws com.liferay.portal.SystemException {
376         getPersistence().removeByGroupId(groupId);
377     }
378 
379     public static void removeByCompanyId(long companyId)
380         throws com.liferay.portal.SystemException {
381         getPersistence().removeByCompanyId(companyId);
382     }
383 
384     public static void removeByG_P(long groupId, long parentFolderId)
385         throws com.liferay.portal.SystemException {
386         getPersistence().removeByG_P(groupId, parentFolderId);
387     }
388 
389     public static void removeByP_N(long parentFolderId, java.lang.String name)
390         throws com.liferay.portal.SystemException {
391         getPersistence().removeByP_N(parentFolderId, name);
392     }
393 
394     public static void removeByG_P_N(long groupId, long parentFolderId,
395         java.lang.String name)
396         throws com.liferay.portal.SystemException,
397             com.liferay.portlet.documentlibrary.NoSuchFolderException {
398         getPersistence().removeByG_P_N(groupId, parentFolderId, name);
399     }
400 
401     public static void removeAll() throws com.liferay.portal.SystemException {
402         getPersistence().removeAll();
403     }
404 
405     public static int countByUuid(java.lang.String uuid)
406         throws com.liferay.portal.SystemException {
407         return getPersistence().countByUuid(uuid);
408     }
409 
410     public static int countByUUID_G(java.lang.String uuid, long groupId)
411         throws com.liferay.portal.SystemException {
412         return getPersistence().countByUUID_G(uuid, groupId);
413     }
414 
415     public static int countByGroupId(long groupId)
416         throws com.liferay.portal.SystemException {
417         return getPersistence().countByGroupId(groupId);
418     }
419 
420     public static int countByCompanyId(long companyId)
421         throws com.liferay.portal.SystemException {
422         return getPersistence().countByCompanyId(companyId);
423     }
424 
425     public static int countByG_P(long groupId, long parentFolderId)
426         throws com.liferay.portal.SystemException {
427         return getPersistence().countByG_P(groupId, parentFolderId);
428     }
429 
430     public static int countByP_N(long parentFolderId, java.lang.String name)
431         throws com.liferay.portal.SystemException {
432         return getPersistence().countByP_N(parentFolderId, name);
433     }
434 
435     public static int countByG_P_N(long groupId, long parentFolderId,
436         java.lang.String name) throws com.liferay.portal.SystemException {
437         return getPersistence().countByG_P_N(groupId, parentFolderId, name);
438     }
439 
440     public static int countAll() throws com.liferay.portal.SystemException {
441         return getPersistence().countAll();
442     }
443 
444     public static DLFolderPersistence getPersistence() {
445         return _getUtil()._persistence;
446     }
447 
448     public void setPersistence(DLFolderPersistence persistence) {
449         _persistence = persistence;
450     }
451 
452     private static DLFolderUtil _getUtil() {
453         if (_util == null) {
454             _util = (DLFolderUtil)com.liferay.portal.kernel.bean.BeanLocatorUtil.locate(_UTIL);
455         }
456 
457         return _util;
458     }
459 
460     private static final String _UTIL = DLFolderUtil.class.getName();
461     private static DLFolderUtil _util;
462     private DLFolderPersistence _persistence;
463 }