1   /**
2    * Copyright (c) 2000-2009 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="DLFileShortcutUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * @author Brian Wing Shun Chan
29   *
30   */
31  public class DLFileShortcutUtil {
32      public static void cacheResult(
33          com.liferay.portlet.documentlibrary.model.DLFileShortcut dlFileShortcut) {
34          getPersistence().cacheResult(dlFileShortcut);
35      }
36  
37      public static void cacheResult(
38          java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> dlFileShortcuts) {
39          getPersistence().cacheResult(dlFileShortcuts);
40      }
41  
42      public static void clearCache() {
43          getPersistence().clearCache();
44      }
45  
46      public static com.liferay.portlet.documentlibrary.model.DLFileShortcut create(
47          long fileShortcutId) {
48          return getPersistence().create(fileShortcutId);
49      }
50  
51      public static com.liferay.portlet.documentlibrary.model.DLFileShortcut remove(
52          long fileShortcutId)
53          throws com.liferay.portal.SystemException,
54              com.liferay.portlet.documentlibrary.NoSuchFileShortcutException {
55          return getPersistence().remove(fileShortcutId);
56      }
57  
58      public static com.liferay.portlet.documentlibrary.model.DLFileShortcut remove(
59          com.liferay.portlet.documentlibrary.model.DLFileShortcut dlFileShortcut)
60          throws com.liferay.portal.SystemException {
61          return getPersistence().remove(dlFileShortcut);
62      }
63  
64      /**
65       * @deprecated Use <code>update(DLFileShortcut dlFileShortcut, boolean merge)</code>.
66       */
67      public static com.liferay.portlet.documentlibrary.model.DLFileShortcut update(
68          com.liferay.portlet.documentlibrary.model.DLFileShortcut dlFileShortcut)
69          throws com.liferay.portal.SystemException {
70          return getPersistence().update(dlFileShortcut);
71      }
72  
73      /**
74       * Add, update, or merge, the entity. This method also calls the model
75       * listeners to trigger the proper events associated with adding, deleting,
76       * or updating an entity.
77       *
78       * @param        dlFileShortcut the entity to add, update, or merge
79       * @param        merge boolean value for whether to merge the entity. The
80       *                default value is false. Setting merge to true is more
81       *                expensive and should only be true when dlFileShortcut is
82       *                transient. See LEP-5473 for a detailed discussion of this
83       *                method.
84       * @return        true if the portlet can be displayed via Ajax
85       */
86      public static com.liferay.portlet.documentlibrary.model.DLFileShortcut update(
87          com.liferay.portlet.documentlibrary.model.DLFileShortcut dlFileShortcut,
88          boolean merge) throws com.liferay.portal.SystemException {
89          return getPersistence().update(dlFileShortcut, merge);
90      }
91  
92      public static com.liferay.portlet.documentlibrary.model.DLFileShortcut updateImpl(
93          com.liferay.portlet.documentlibrary.model.DLFileShortcut dlFileShortcut,
94          boolean merge) throws com.liferay.portal.SystemException {
95          return getPersistence().updateImpl(dlFileShortcut, merge);
96      }
97  
98      public static com.liferay.portlet.documentlibrary.model.DLFileShortcut findByPrimaryKey(
99          long fileShortcutId)
100         throws com.liferay.portal.SystemException,
101             com.liferay.portlet.documentlibrary.NoSuchFileShortcutException {
102         return getPersistence().findByPrimaryKey(fileShortcutId);
103     }
104 
105     public static com.liferay.portlet.documentlibrary.model.DLFileShortcut fetchByPrimaryKey(
106         long fileShortcutId) throws com.liferay.portal.SystemException {
107         return getPersistence().fetchByPrimaryKey(fileShortcutId);
108     }
109 
110     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> findByUuid(
111         java.lang.String uuid) throws com.liferay.portal.SystemException {
112         return getPersistence().findByUuid(uuid);
113     }
114 
115     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> findByUuid(
116         java.lang.String uuid, int start, int end)
117         throws com.liferay.portal.SystemException {
118         return getPersistence().findByUuid(uuid, start, end);
119     }
120 
121     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> findByUuid(
122         java.lang.String uuid, int start, int end,
123         com.liferay.portal.kernel.util.OrderByComparator obc)
124         throws com.liferay.portal.SystemException {
125         return getPersistence().findByUuid(uuid, start, end, obc);
126     }
127 
128     public static com.liferay.portlet.documentlibrary.model.DLFileShortcut findByUuid_First(
129         java.lang.String uuid,
130         com.liferay.portal.kernel.util.OrderByComparator obc)
131         throws com.liferay.portal.SystemException,
132             com.liferay.portlet.documentlibrary.NoSuchFileShortcutException {
133         return getPersistence().findByUuid_First(uuid, obc);
134     }
135 
136     public static com.liferay.portlet.documentlibrary.model.DLFileShortcut findByUuid_Last(
137         java.lang.String uuid,
138         com.liferay.portal.kernel.util.OrderByComparator obc)
139         throws com.liferay.portal.SystemException,
140             com.liferay.portlet.documentlibrary.NoSuchFileShortcutException {
141         return getPersistence().findByUuid_Last(uuid, obc);
142     }
143 
144     public static com.liferay.portlet.documentlibrary.model.DLFileShortcut[] findByUuid_PrevAndNext(
145         long fileShortcutId, java.lang.String uuid,
146         com.liferay.portal.kernel.util.OrderByComparator obc)
147         throws com.liferay.portal.SystemException,
148             com.liferay.portlet.documentlibrary.NoSuchFileShortcutException {
149         return getPersistence().findByUuid_PrevAndNext(fileShortcutId, uuid, obc);
150     }
151 
152     public static com.liferay.portlet.documentlibrary.model.DLFileShortcut findByUUID_G(
153         java.lang.String uuid, long groupId)
154         throws com.liferay.portal.SystemException,
155             com.liferay.portlet.documentlibrary.NoSuchFileShortcutException {
156         return getPersistence().findByUUID_G(uuid, groupId);
157     }
158 
159     public static com.liferay.portlet.documentlibrary.model.DLFileShortcut fetchByUUID_G(
160         java.lang.String uuid, long groupId)
161         throws com.liferay.portal.SystemException {
162         return getPersistence().fetchByUUID_G(uuid, groupId);
163     }
164 
165     public static com.liferay.portlet.documentlibrary.model.DLFileShortcut fetchByUUID_G(
166         java.lang.String uuid, long groupId, boolean retrieveFromCache)
167         throws com.liferay.portal.SystemException {
168         return getPersistence().fetchByUUID_G(uuid, groupId, retrieveFromCache);
169     }
170 
171     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> findByFolderId(
172         long folderId) throws com.liferay.portal.SystemException {
173         return getPersistence().findByFolderId(folderId);
174     }
175 
176     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> findByFolderId(
177         long folderId, int start, int end)
178         throws com.liferay.portal.SystemException {
179         return getPersistence().findByFolderId(folderId, start, end);
180     }
181 
182     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> findByFolderId(
183         long folderId, int start, int end,
184         com.liferay.portal.kernel.util.OrderByComparator obc)
185         throws com.liferay.portal.SystemException {
186         return getPersistence().findByFolderId(folderId, start, end, obc);
187     }
188 
189     public static com.liferay.portlet.documentlibrary.model.DLFileShortcut findByFolderId_First(
190         long folderId, com.liferay.portal.kernel.util.OrderByComparator obc)
191         throws com.liferay.portal.SystemException,
192             com.liferay.portlet.documentlibrary.NoSuchFileShortcutException {
193         return getPersistence().findByFolderId_First(folderId, obc);
194     }
195 
196     public static com.liferay.portlet.documentlibrary.model.DLFileShortcut findByFolderId_Last(
197         long folderId, com.liferay.portal.kernel.util.OrderByComparator obc)
198         throws com.liferay.portal.SystemException,
199             com.liferay.portlet.documentlibrary.NoSuchFileShortcutException {
200         return getPersistence().findByFolderId_Last(folderId, obc);
201     }
202 
203     public static com.liferay.portlet.documentlibrary.model.DLFileShortcut[] findByFolderId_PrevAndNext(
204         long fileShortcutId, long folderId,
205         com.liferay.portal.kernel.util.OrderByComparator obc)
206         throws com.liferay.portal.SystemException,
207             com.liferay.portlet.documentlibrary.NoSuchFileShortcutException {
208         return getPersistence()
209                    .findByFolderId_PrevAndNext(fileShortcutId, folderId, obc);
210     }
211 
212     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> findByTF_TN(
213         long toFolderId, java.lang.String toName)
214         throws com.liferay.portal.SystemException {
215         return getPersistence().findByTF_TN(toFolderId, toName);
216     }
217 
218     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> findByTF_TN(
219         long toFolderId, java.lang.String toName, int start, int end)
220         throws com.liferay.portal.SystemException {
221         return getPersistence().findByTF_TN(toFolderId, toName, start, end);
222     }
223 
224     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> findByTF_TN(
225         long toFolderId, java.lang.String toName, int start, int end,
226         com.liferay.portal.kernel.util.OrderByComparator obc)
227         throws com.liferay.portal.SystemException {
228         return getPersistence().findByTF_TN(toFolderId, toName, start, end, obc);
229     }
230 
231     public static com.liferay.portlet.documentlibrary.model.DLFileShortcut findByTF_TN_First(
232         long toFolderId, java.lang.String toName,
233         com.liferay.portal.kernel.util.OrderByComparator obc)
234         throws com.liferay.portal.SystemException,
235             com.liferay.portlet.documentlibrary.NoSuchFileShortcutException {
236         return getPersistence().findByTF_TN_First(toFolderId, toName, obc);
237     }
238 
239     public static com.liferay.portlet.documentlibrary.model.DLFileShortcut findByTF_TN_Last(
240         long toFolderId, java.lang.String toName,
241         com.liferay.portal.kernel.util.OrderByComparator obc)
242         throws com.liferay.portal.SystemException,
243             com.liferay.portlet.documentlibrary.NoSuchFileShortcutException {
244         return getPersistence().findByTF_TN_Last(toFolderId, toName, obc);
245     }
246 
247     public static com.liferay.portlet.documentlibrary.model.DLFileShortcut[] findByTF_TN_PrevAndNext(
248         long fileShortcutId, long toFolderId, java.lang.String toName,
249         com.liferay.portal.kernel.util.OrderByComparator obc)
250         throws com.liferay.portal.SystemException,
251             com.liferay.portlet.documentlibrary.NoSuchFileShortcutException {
252         return getPersistence()
253                    .findByTF_TN_PrevAndNext(fileShortcutId, toFolderId, toName,
254             obc);
255     }
256 
257     public static java.util.List<Object> findWithDynamicQuery(
258         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
259         throws com.liferay.portal.SystemException {
260         return getPersistence().findWithDynamicQuery(dynamicQuery);
261     }
262 
263     public static java.util.List<Object> findWithDynamicQuery(
264         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
265         int end) throws com.liferay.portal.SystemException {
266         return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
267     }
268 
269     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> findAll()
270         throws com.liferay.portal.SystemException {
271         return getPersistence().findAll();
272     }
273 
274     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> findAll(
275         int start, int end) throws com.liferay.portal.SystemException {
276         return getPersistence().findAll(start, end);
277     }
278 
279     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> findAll(
280         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
281         throws com.liferay.portal.SystemException {
282         return getPersistence().findAll(start, end, obc);
283     }
284 
285     public static void removeByUuid(java.lang.String uuid)
286         throws com.liferay.portal.SystemException {
287         getPersistence().removeByUuid(uuid);
288     }
289 
290     public static void removeByUUID_G(java.lang.String uuid, long groupId)
291         throws com.liferay.portal.SystemException,
292             com.liferay.portlet.documentlibrary.NoSuchFileShortcutException {
293         getPersistence().removeByUUID_G(uuid, groupId);
294     }
295 
296     public static void removeByFolderId(long folderId)
297         throws com.liferay.portal.SystemException {
298         getPersistence().removeByFolderId(folderId);
299     }
300 
301     public static void removeByTF_TN(long toFolderId, java.lang.String toName)
302         throws com.liferay.portal.SystemException {
303         getPersistence().removeByTF_TN(toFolderId, toName);
304     }
305 
306     public static void removeAll() throws com.liferay.portal.SystemException {
307         getPersistence().removeAll();
308     }
309 
310     public static int countByUuid(java.lang.String uuid)
311         throws com.liferay.portal.SystemException {
312         return getPersistence().countByUuid(uuid);
313     }
314 
315     public static int countByUUID_G(java.lang.String uuid, long groupId)
316         throws com.liferay.portal.SystemException {
317         return getPersistence().countByUUID_G(uuid, groupId);
318     }
319 
320     public static int countByFolderId(long folderId)
321         throws com.liferay.portal.SystemException {
322         return getPersistence().countByFolderId(folderId);
323     }
324 
325     public static int countByTF_TN(long toFolderId, java.lang.String toName)
326         throws com.liferay.portal.SystemException {
327         return getPersistence().countByTF_TN(toFolderId, toName);
328     }
329 
330     public static int countAll() throws com.liferay.portal.SystemException {
331         return getPersistence().countAll();
332     }
333 
334     public static DLFileShortcutPersistence getPersistence() {
335         return _persistence;
336     }
337 
338     public void setPersistence(DLFileShortcutPersistence persistence) {
339         _persistence = persistence;
340     }
341 
342     private static DLFileShortcutPersistence _persistence;
343 }