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="DLFileEntryUtil.java.html"><b><i>View Source</i></b></a>
24   *
25   * @author Brian Wing Shun Chan
26   *
27   */
28  public class DLFileEntryUtil {
29      public static void cacheResult(
30          com.liferay.portlet.documentlibrary.model.DLFileEntry dlFileEntry) {
31          getPersistence().cacheResult(dlFileEntry);
32      }
33  
34      public static void cacheResult(
35          java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> dlFileEntries) {
36          getPersistence().cacheResult(dlFileEntries);
37      }
38  
39      public static void clearCache() {
40          getPersistence().clearCache();
41      }
42  
43      public static com.liferay.portlet.documentlibrary.model.DLFileEntry create(
44          long fileEntryId) {
45          return getPersistence().create(fileEntryId);
46      }
47  
48      public static com.liferay.portlet.documentlibrary.model.DLFileEntry remove(
49          long fileEntryId)
50          throws com.liferay.portal.SystemException,
51              com.liferay.portlet.documentlibrary.NoSuchFileEntryException {
52          return getPersistence().remove(fileEntryId);
53      }
54  
55      public static com.liferay.portlet.documentlibrary.model.DLFileEntry remove(
56          com.liferay.portlet.documentlibrary.model.DLFileEntry dlFileEntry)
57          throws com.liferay.portal.SystemException {
58          return getPersistence().remove(dlFileEntry);
59      }
60  
61      /**
62       * @deprecated Use <code>update(DLFileEntry dlFileEntry, boolean merge)</code>.
63       */
64      public static com.liferay.portlet.documentlibrary.model.DLFileEntry update(
65          com.liferay.portlet.documentlibrary.model.DLFileEntry dlFileEntry)
66          throws com.liferay.portal.SystemException {
67          return getPersistence().update(dlFileEntry);
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        dlFileEntry 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 dlFileEntry 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.DLFileEntry update(
84          com.liferay.portlet.documentlibrary.model.DLFileEntry dlFileEntry,
85          boolean merge) throws com.liferay.portal.SystemException {
86          return getPersistence().update(dlFileEntry, merge);
87      }
88  
89      public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateImpl(
90          com.liferay.portlet.documentlibrary.model.DLFileEntry dlFileEntry,
91          boolean merge) throws com.liferay.portal.SystemException {
92          return getPersistence().updateImpl(dlFileEntry, merge);
93      }
94  
95      public static com.liferay.portlet.documentlibrary.model.DLFileEntry findByPrimaryKey(
96          long fileEntryId)
97          throws com.liferay.portal.SystemException,
98              com.liferay.portlet.documentlibrary.NoSuchFileEntryException {
99          return getPersistence().findByPrimaryKey(fileEntryId);
100     }
101 
102     public static com.liferay.portlet.documentlibrary.model.DLFileEntry fetchByPrimaryKey(
103         long fileEntryId) throws com.liferay.portal.SystemException {
104         return getPersistence().fetchByPrimaryKey(fileEntryId);
105     }
106 
107     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> 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.DLFileEntry> 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.DLFileEntry> 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.DLFileEntry 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.NoSuchFileEntryException {
130         return getPersistence().findByUuid_First(uuid, obc);
131     }
132 
133     public static com.liferay.portlet.documentlibrary.model.DLFileEntry 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.NoSuchFileEntryException {
138         return getPersistence().findByUuid_Last(uuid, obc);
139     }
140 
141     public static com.liferay.portlet.documentlibrary.model.DLFileEntry[] findByUuid_PrevAndNext(
142         long fileEntryId, java.lang.String uuid,
143         com.liferay.portal.kernel.util.OrderByComparator obc)
144         throws com.liferay.portal.SystemException,
145             com.liferay.portlet.documentlibrary.NoSuchFileEntryException {
146         return getPersistence().findByUuid_PrevAndNext(fileEntryId, uuid, obc);
147     }
148 
149     public static com.liferay.portlet.documentlibrary.model.DLFileEntry findByUUID_G(
150         java.lang.String uuid, long groupId)
151         throws com.liferay.portal.SystemException,
152             com.liferay.portlet.documentlibrary.NoSuchFileEntryException {
153         return getPersistence().findByUUID_G(uuid, groupId);
154     }
155 
156     public static com.liferay.portlet.documentlibrary.model.DLFileEntry 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.DLFileEntry 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.DLFileEntry> 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.DLFileEntry> 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.DLFileEntry> 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.DLFileEntry findByGroupId_First(
187         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
188         throws com.liferay.portal.SystemException,
189             com.liferay.portlet.documentlibrary.NoSuchFileEntryException {
190         return getPersistence().findByGroupId_First(groupId, obc);
191     }
192 
193     public static com.liferay.portlet.documentlibrary.model.DLFileEntry findByGroupId_Last(
194         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
195         throws com.liferay.portal.SystemException,
196             com.liferay.portlet.documentlibrary.NoSuchFileEntryException {
197         return getPersistence().findByGroupId_Last(groupId, obc);
198     }
199 
200     public static com.liferay.portlet.documentlibrary.model.DLFileEntry[] findByGroupId_PrevAndNext(
201         long fileEntryId, long groupId,
202         com.liferay.portal.kernel.util.OrderByComparator obc)
203         throws com.liferay.portal.SystemException,
204             com.liferay.portlet.documentlibrary.NoSuchFileEntryException {
205         return getPersistence()
206                    .findByGroupId_PrevAndNext(fileEntryId, groupId, obc);
207     }
208 
209     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findByCompanyId(
210         long companyId) throws com.liferay.portal.SystemException {
211         return getPersistence().findByCompanyId(companyId);
212     }
213 
214     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findByCompanyId(
215         long companyId, int start, int end)
216         throws com.liferay.portal.SystemException {
217         return getPersistence().findByCompanyId(companyId, start, end);
218     }
219 
220     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findByCompanyId(
221         long companyId, int start, int end,
222         com.liferay.portal.kernel.util.OrderByComparator obc)
223         throws com.liferay.portal.SystemException {
224         return getPersistence().findByCompanyId(companyId, start, end, obc);
225     }
226 
227     public static com.liferay.portlet.documentlibrary.model.DLFileEntry findByCompanyId_First(
228         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
229         throws com.liferay.portal.SystemException,
230             com.liferay.portlet.documentlibrary.NoSuchFileEntryException {
231         return getPersistence().findByCompanyId_First(companyId, obc);
232     }
233 
234     public static com.liferay.portlet.documentlibrary.model.DLFileEntry findByCompanyId_Last(
235         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
236         throws com.liferay.portal.SystemException,
237             com.liferay.portlet.documentlibrary.NoSuchFileEntryException {
238         return getPersistence().findByCompanyId_Last(companyId, obc);
239     }
240 
241     public static com.liferay.portlet.documentlibrary.model.DLFileEntry[] findByCompanyId_PrevAndNext(
242         long fileEntryId, long companyId,
243         com.liferay.portal.kernel.util.OrderByComparator obc)
244         throws com.liferay.portal.SystemException,
245             com.liferay.portlet.documentlibrary.NoSuchFileEntryException {
246         return getPersistence()
247                    .findByCompanyId_PrevAndNext(fileEntryId, companyId, obc);
248     }
249 
250     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findByFolderId(
251         long folderId) throws com.liferay.portal.SystemException {
252         return getPersistence().findByFolderId(folderId);
253     }
254 
255     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findByFolderId(
256         long folderId, int start, int end)
257         throws com.liferay.portal.SystemException {
258         return getPersistence().findByFolderId(folderId, start, end);
259     }
260 
261     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findByFolderId(
262         long folderId, int start, int end,
263         com.liferay.portal.kernel.util.OrderByComparator obc)
264         throws com.liferay.portal.SystemException {
265         return getPersistence().findByFolderId(folderId, start, end, obc);
266     }
267 
268     public static com.liferay.portlet.documentlibrary.model.DLFileEntry findByFolderId_First(
269         long folderId, com.liferay.portal.kernel.util.OrderByComparator obc)
270         throws com.liferay.portal.SystemException,
271             com.liferay.portlet.documentlibrary.NoSuchFileEntryException {
272         return getPersistence().findByFolderId_First(folderId, obc);
273     }
274 
275     public static com.liferay.portlet.documentlibrary.model.DLFileEntry findByFolderId_Last(
276         long folderId, com.liferay.portal.kernel.util.OrderByComparator obc)
277         throws com.liferay.portal.SystemException,
278             com.liferay.portlet.documentlibrary.NoSuchFileEntryException {
279         return getPersistence().findByFolderId_Last(folderId, obc);
280     }
281 
282     public static com.liferay.portlet.documentlibrary.model.DLFileEntry[] findByFolderId_PrevAndNext(
283         long fileEntryId, long folderId,
284         com.liferay.portal.kernel.util.OrderByComparator obc)
285         throws com.liferay.portal.SystemException,
286             com.liferay.portlet.documentlibrary.NoSuchFileEntryException {
287         return getPersistence()
288                    .findByFolderId_PrevAndNext(fileEntryId, folderId, obc);
289     }
290 
291     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findByG_U(
292         long groupId, long userId) throws com.liferay.portal.SystemException {
293         return getPersistence().findByG_U(groupId, userId);
294     }
295 
296     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findByG_U(
297         long groupId, long userId, int start, int end)
298         throws com.liferay.portal.SystemException {
299         return getPersistence().findByG_U(groupId, userId, start, end);
300     }
301 
302     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findByG_U(
303         long groupId, long userId, int start, int end,
304         com.liferay.portal.kernel.util.OrderByComparator obc)
305         throws com.liferay.portal.SystemException {
306         return getPersistence().findByG_U(groupId, userId, start, end, obc);
307     }
308 
309     public static com.liferay.portlet.documentlibrary.model.DLFileEntry findByG_U_First(
310         long groupId, long userId,
311         com.liferay.portal.kernel.util.OrderByComparator obc)
312         throws com.liferay.portal.SystemException,
313             com.liferay.portlet.documentlibrary.NoSuchFileEntryException {
314         return getPersistence().findByG_U_First(groupId, userId, obc);
315     }
316 
317     public static com.liferay.portlet.documentlibrary.model.DLFileEntry findByG_U_Last(
318         long groupId, long userId,
319         com.liferay.portal.kernel.util.OrderByComparator obc)
320         throws com.liferay.portal.SystemException,
321             com.liferay.portlet.documentlibrary.NoSuchFileEntryException {
322         return getPersistence().findByG_U_Last(groupId, userId, obc);
323     }
324 
325     public static com.liferay.portlet.documentlibrary.model.DLFileEntry[] findByG_U_PrevAndNext(
326         long fileEntryId, long groupId, long userId,
327         com.liferay.portal.kernel.util.OrderByComparator obc)
328         throws com.liferay.portal.SystemException,
329             com.liferay.portlet.documentlibrary.NoSuchFileEntryException {
330         return getPersistence()
331                    .findByG_U_PrevAndNext(fileEntryId, groupId, userId, obc);
332     }
333 
334     public static com.liferay.portlet.documentlibrary.model.DLFileEntry findByF_N(
335         long folderId, java.lang.String name)
336         throws com.liferay.portal.SystemException,
337             com.liferay.portlet.documentlibrary.NoSuchFileEntryException {
338         return getPersistence().findByF_N(folderId, name);
339     }
340 
341     public static com.liferay.portlet.documentlibrary.model.DLFileEntry fetchByF_N(
342         long folderId, java.lang.String name)
343         throws com.liferay.portal.SystemException {
344         return getPersistence().fetchByF_N(folderId, name);
345     }
346 
347     public static com.liferay.portlet.documentlibrary.model.DLFileEntry fetchByF_N(
348         long folderId, java.lang.String name, boolean retrieveFromCache)
349         throws com.liferay.portal.SystemException {
350         return getPersistence().fetchByF_N(folderId, name, retrieveFromCache);
351     }
352 
353     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findByF_T(
354         long folderId, java.lang.String title)
355         throws com.liferay.portal.SystemException {
356         return getPersistence().findByF_T(folderId, title);
357     }
358 
359     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findByF_T(
360         long folderId, java.lang.String title, int start, int end)
361         throws com.liferay.portal.SystemException {
362         return getPersistence().findByF_T(folderId, title, start, end);
363     }
364 
365     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findByF_T(
366         long folderId, java.lang.String title, int start, int end,
367         com.liferay.portal.kernel.util.OrderByComparator obc)
368         throws com.liferay.portal.SystemException {
369         return getPersistence().findByF_T(folderId, title, start, end, obc);
370     }
371 
372     public static com.liferay.portlet.documentlibrary.model.DLFileEntry findByF_T_First(
373         long folderId, java.lang.String title,
374         com.liferay.portal.kernel.util.OrderByComparator obc)
375         throws com.liferay.portal.SystemException,
376             com.liferay.portlet.documentlibrary.NoSuchFileEntryException {
377         return getPersistence().findByF_T_First(folderId, title, obc);
378     }
379 
380     public static com.liferay.portlet.documentlibrary.model.DLFileEntry findByF_T_Last(
381         long folderId, java.lang.String title,
382         com.liferay.portal.kernel.util.OrderByComparator obc)
383         throws com.liferay.portal.SystemException,
384             com.liferay.portlet.documentlibrary.NoSuchFileEntryException {
385         return getPersistence().findByF_T_Last(folderId, title, obc);
386     }
387 
388     public static com.liferay.portlet.documentlibrary.model.DLFileEntry[] findByF_T_PrevAndNext(
389         long fileEntryId, long folderId, java.lang.String title,
390         com.liferay.portal.kernel.util.OrderByComparator obc)
391         throws com.liferay.portal.SystemException,
392             com.liferay.portlet.documentlibrary.NoSuchFileEntryException {
393         return getPersistence()
394                    .findByF_T_PrevAndNext(fileEntryId, folderId, title, obc);
395     }
396 
397     public static java.util.List<Object> findWithDynamicQuery(
398         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
399         throws com.liferay.portal.SystemException {
400         return getPersistence().findWithDynamicQuery(dynamicQuery);
401     }
402 
403     public static java.util.List<Object> findWithDynamicQuery(
404         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
405         int end) throws com.liferay.portal.SystemException {
406         return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
407     }
408 
409     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findAll()
410         throws com.liferay.portal.SystemException {
411         return getPersistence().findAll();
412     }
413 
414     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findAll(
415         int start, int end) throws com.liferay.portal.SystemException {
416         return getPersistence().findAll(start, end);
417     }
418 
419     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntry> findAll(
420         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
421         throws com.liferay.portal.SystemException {
422         return getPersistence().findAll(start, end, obc);
423     }
424 
425     public static void removeByUuid(java.lang.String uuid)
426         throws com.liferay.portal.SystemException {
427         getPersistence().removeByUuid(uuid);
428     }
429 
430     public static void removeByUUID_G(java.lang.String uuid, long groupId)
431         throws com.liferay.portal.SystemException,
432             com.liferay.portlet.documentlibrary.NoSuchFileEntryException {
433         getPersistence().removeByUUID_G(uuid, groupId);
434     }
435 
436     public static void removeByGroupId(long groupId)
437         throws com.liferay.portal.SystemException {
438         getPersistence().removeByGroupId(groupId);
439     }
440 
441     public static void removeByCompanyId(long companyId)
442         throws com.liferay.portal.SystemException {
443         getPersistence().removeByCompanyId(companyId);
444     }
445 
446     public static void removeByFolderId(long folderId)
447         throws com.liferay.portal.SystemException {
448         getPersistence().removeByFolderId(folderId);
449     }
450 
451     public static void removeByG_U(long groupId, long userId)
452         throws com.liferay.portal.SystemException {
453         getPersistence().removeByG_U(groupId, userId);
454     }
455 
456     public static void removeByF_N(long folderId, java.lang.String name)
457         throws com.liferay.portal.SystemException,
458             com.liferay.portlet.documentlibrary.NoSuchFileEntryException {
459         getPersistence().removeByF_N(folderId, name);
460     }
461 
462     public static void removeByF_T(long folderId, java.lang.String title)
463         throws com.liferay.portal.SystemException {
464         getPersistence().removeByF_T(folderId, title);
465     }
466 
467     public static void removeAll() throws com.liferay.portal.SystemException {
468         getPersistence().removeAll();
469     }
470 
471     public static int countByUuid(java.lang.String uuid)
472         throws com.liferay.portal.SystemException {
473         return getPersistence().countByUuid(uuid);
474     }
475 
476     public static int countByUUID_G(java.lang.String uuid, long groupId)
477         throws com.liferay.portal.SystemException {
478         return getPersistence().countByUUID_G(uuid, groupId);
479     }
480 
481     public static int countByGroupId(long groupId)
482         throws com.liferay.portal.SystemException {
483         return getPersistence().countByGroupId(groupId);
484     }
485 
486     public static int countByCompanyId(long companyId)
487         throws com.liferay.portal.SystemException {
488         return getPersistence().countByCompanyId(companyId);
489     }
490 
491     public static int countByFolderId(long folderId)
492         throws com.liferay.portal.SystemException {
493         return getPersistence().countByFolderId(folderId);
494     }
495 
496     public static int countByG_U(long groupId, long userId)
497         throws com.liferay.portal.SystemException {
498         return getPersistence().countByG_U(groupId, userId);
499     }
500 
501     public static int countByF_N(long folderId, java.lang.String name)
502         throws com.liferay.portal.SystemException {
503         return getPersistence().countByF_N(folderId, name);
504     }
505 
506     public static int countByF_T(long folderId, java.lang.String title)
507         throws com.liferay.portal.SystemException {
508         return getPersistence().countByF_T(folderId, title);
509     }
510 
511     public static int countAll() throws com.liferay.portal.SystemException {
512         return getPersistence().countAll();
513     }
514 
515     public static DLFileEntryPersistence getPersistence() {
516         return _persistence;
517     }
518 
519     public void setPersistence(DLFileEntryPersistence persistence) {
520         _persistence = persistence;
521     }
522 
523     private static DLFileEntryPersistence _persistence;
524 }