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