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