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 com.liferay.portlet.documentlibrary.model.DLFileShortcut create(
33          long fileShortcutId) {
34          return getPersistence().create(fileShortcutId);
35      }
36  
37      public static com.liferay.portlet.documentlibrary.model.DLFileShortcut remove(
38          long fileShortcutId)
39          throws com.liferay.portal.SystemException,
40              com.liferay.portlet.documentlibrary.NoSuchFileShortcutException {
41          return getPersistence().remove(fileShortcutId);
42      }
43  
44      public static com.liferay.portlet.documentlibrary.model.DLFileShortcut remove(
45          com.liferay.portlet.documentlibrary.model.DLFileShortcut dlFileShortcut)
46          throws com.liferay.portal.SystemException {
47          return getPersistence().remove(dlFileShortcut);
48      }
49  
50      /**
51       * @deprecated Use <code>update(DLFileShortcut dlFileShortcut, boolean merge)</code>.
52       */
53      public static com.liferay.portlet.documentlibrary.model.DLFileShortcut update(
54          com.liferay.portlet.documentlibrary.model.DLFileShortcut dlFileShortcut)
55          throws com.liferay.portal.SystemException {
56          return getPersistence().update(dlFileShortcut);
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        dlFileShortcut 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 dlFileShortcut 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.DLFileShortcut update(
73          com.liferay.portlet.documentlibrary.model.DLFileShortcut dlFileShortcut,
74          boolean merge) throws com.liferay.portal.SystemException {
75          return getPersistence().update(dlFileShortcut, merge);
76      }
77  
78      public static com.liferay.portlet.documentlibrary.model.DLFileShortcut updateImpl(
79          com.liferay.portlet.documentlibrary.model.DLFileShortcut dlFileShortcut,
80          boolean merge) throws com.liferay.portal.SystemException {
81          return getPersistence().updateImpl(dlFileShortcut, merge);
82      }
83  
84      public static com.liferay.portlet.documentlibrary.model.DLFileShortcut findByPrimaryKey(
85          long fileShortcutId)
86          throws com.liferay.portal.SystemException,
87              com.liferay.portlet.documentlibrary.NoSuchFileShortcutException {
88          return getPersistence().findByPrimaryKey(fileShortcutId);
89      }
90  
91      public static com.liferay.portlet.documentlibrary.model.DLFileShortcut fetchByPrimaryKey(
92          long fileShortcutId) throws com.liferay.portal.SystemException {
93          return getPersistence().fetchByPrimaryKey(fileShortcutId);
94      }
95  
96      public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> 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.DLFileShortcut> findByUuid(
102         java.lang.String uuid, int start, int end)
103         throws com.liferay.portal.SystemException {
104         return getPersistence().findByUuid(uuid, start, end);
105     }
106 
107     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> findByUuid(
108         java.lang.String uuid, int start, int end,
109         com.liferay.portal.kernel.util.OrderByComparator obc)
110         throws com.liferay.portal.SystemException {
111         return getPersistence().findByUuid(uuid, start, end, obc);
112     }
113 
114     public static com.liferay.portlet.documentlibrary.model.DLFileShortcut 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.NoSuchFileShortcutException {
119         return getPersistence().findByUuid_First(uuid, obc);
120     }
121 
122     public static com.liferay.portlet.documentlibrary.model.DLFileShortcut 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.NoSuchFileShortcutException {
127         return getPersistence().findByUuid_Last(uuid, obc);
128     }
129 
130     public static com.liferay.portlet.documentlibrary.model.DLFileShortcut[] findByUuid_PrevAndNext(
131         long fileShortcutId, java.lang.String uuid,
132         com.liferay.portal.kernel.util.OrderByComparator obc)
133         throws com.liferay.portal.SystemException,
134             com.liferay.portlet.documentlibrary.NoSuchFileShortcutException {
135         return getPersistence().findByUuid_PrevAndNext(fileShortcutId, uuid, obc);
136     }
137 
138     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> findByFolderId(
139         long folderId) throws com.liferay.portal.SystemException {
140         return getPersistence().findByFolderId(folderId);
141     }
142 
143     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> findByFolderId(
144         long folderId, int start, int end)
145         throws com.liferay.portal.SystemException {
146         return getPersistence().findByFolderId(folderId, start, end);
147     }
148 
149     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> findByFolderId(
150         long folderId, int start, int end,
151         com.liferay.portal.kernel.util.OrderByComparator obc)
152         throws com.liferay.portal.SystemException {
153         return getPersistence().findByFolderId(folderId, start, end, obc);
154     }
155 
156     public static com.liferay.portlet.documentlibrary.model.DLFileShortcut findByFolderId_First(
157         long folderId, com.liferay.portal.kernel.util.OrderByComparator obc)
158         throws com.liferay.portal.SystemException,
159             com.liferay.portlet.documentlibrary.NoSuchFileShortcutException {
160         return getPersistence().findByFolderId_First(folderId, obc);
161     }
162 
163     public static com.liferay.portlet.documentlibrary.model.DLFileShortcut findByFolderId_Last(
164         long folderId, com.liferay.portal.kernel.util.OrderByComparator obc)
165         throws com.liferay.portal.SystemException,
166             com.liferay.portlet.documentlibrary.NoSuchFileShortcutException {
167         return getPersistence().findByFolderId_Last(folderId, obc);
168     }
169 
170     public static com.liferay.portlet.documentlibrary.model.DLFileShortcut[] findByFolderId_PrevAndNext(
171         long fileShortcutId, long folderId,
172         com.liferay.portal.kernel.util.OrderByComparator obc)
173         throws com.liferay.portal.SystemException,
174             com.liferay.portlet.documentlibrary.NoSuchFileShortcutException {
175         return getPersistence()
176                    .findByFolderId_PrevAndNext(fileShortcutId, folderId, obc);
177     }
178 
179     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> findByTF_TN(
180         long toFolderId, java.lang.String toName)
181         throws com.liferay.portal.SystemException {
182         return getPersistence().findByTF_TN(toFolderId, toName);
183     }
184 
185     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> findByTF_TN(
186         long toFolderId, java.lang.String toName, int start, int end)
187         throws com.liferay.portal.SystemException {
188         return getPersistence().findByTF_TN(toFolderId, toName, start, end);
189     }
190 
191     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> findByTF_TN(
192         long toFolderId, java.lang.String toName, int start, int end,
193         com.liferay.portal.kernel.util.OrderByComparator obc)
194         throws com.liferay.portal.SystemException {
195         return getPersistence().findByTF_TN(toFolderId, toName, start, end, obc);
196     }
197 
198     public static com.liferay.portlet.documentlibrary.model.DLFileShortcut findByTF_TN_First(
199         long toFolderId, java.lang.String toName,
200         com.liferay.portal.kernel.util.OrderByComparator obc)
201         throws com.liferay.portal.SystemException,
202             com.liferay.portlet.documentlibrary.NoSuchFileShortcutException {
203         return getPersistence().findByTF_TN_First(toFolderId, toName, obc);
204     }
205 
206     public static com.liferay.portlet.documentlibrary.model.DLFileShortcut findByTF_TN_Last(
207         long toFolderId, java.lang.String toName,
208         com.liferay.portal.kernel.util.OrderByComparator obc)
209         throws com.liferay.portal.SystemException,
210             com.liferay.portlet.documentlibrary.NoSuchFileShortcutException {
211         return getPersistence().findByTF_TN_Last(toFolderId, toName, obc);
212     }
213 
214     public static com.liferay.portlet.documentlibrary.model.DLFileShortcut[] findByTF_TN_PrevAndNext(
215         long fileShortcutId, long toFolderId, java.lang.String toName,
216         com.liferay.portal.kernel.util.OrderByComparator obc)
217         throws com.liferay.portal.SystemException,
218             com.liferay.portlet.documentlibrary.NoSuchFileShortcutException {
219         return getPersistence()
220                    .findByTF_TN_PrevAndNext(fileShortcutId, toFolderId, toName,
221             obc);
222     }
223 
224     public static java.util.List<Object> findWithDynamicQuery(
225         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
226         throws com.liferay.portal.SystemException {
227         return getPersistence().findWithDynamicQuery(dynamicQuery);
228     }
229 
230     public static java.util.List<Object> findWithDynamicQuery(
231         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
232         int end) throws com.liferay.portal.SystemException {
233         return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
234     }
235 
236     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> findAll()
237         throws com.liferay.portal.SystemException {
238         return getPersistence().findAll();
239     }
240 
241     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> findAll(
242         int start, int end) throws com.liferay.portal.SystemException {
243         return getPersistence().findAll(start, end);
244     }
245 
246     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> findAll(
247         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
248         throws com.liferay.portal.SystemException {
249         return getPersistence().findAll(start, end, obc);
250     }
251 
252     public static void removeByUuid(java.lang.String uuid)
253         throws com.liferay.portal.SystemException {
254         getPersistence().removeByUuid(uuid);
255     }
256 
257     public static void removeByFolderId(long folderId)
258         throws com.liferay.portal.SystemException {
259         getPersistence().removeByFolderId(folderId);
260     }
261 
262     public static void removeByTF_TN(long toFolderId, java.lang.String toName)
263         throws com.liferay.portal.SystemException {
264         getPersistence().removeByTF_TN(toFolderId, toName);
265     }
266 
267     public static void removeAll() throws com.liferay.portal.SystemException {
268         getPersistence().removeAll();
269     }
270 
271     public static int countByUuid(java.lang.String uuid)
272         throws com.liferay.portal.SystemException {
273         return getPersistence().countByUuid(uuid);
274     }
275 
276     public static int countByFolderId(long folderId)
277         throws com.liferay.portal.SystemException {
278         return getPersistence().countByFolderId(folderId);
279     }
280 
281     public static int countByTF_TN(long toFolderId, java.lang.String toName)
282         throws com.liferay.portal.SystemException {
283         return getPersistence().countByTF_TN(toFolderId, toName);
284     }
285 
286     public static int countAll() throws com.liferay.portal.SystemException {
287         return getPersistence().countAll();
288     }
289 
290     public static DLFileShortcutPersistence getPersistence() {
291         return _persistence;
292     }
293 
294     public void setPersistence(DLFileShortcutPersistence persistence) {
295         _persistence = persistence;
296     }
297 
298     private static DLFileShortcutPersistence _persistence;
299 }