1   /**
2    * Copyright (c) 2000-2008 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 begin, int end)
103         throws com.liferay.portal.SystemException {
104         return getPersistence().findByUuid(uuid, begin, end);
105     }
106 
107     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> findByUuid(
108         java.lang.String uuid, int begin, int end,
109         com.liferay.portal.kernel.util.OrderByComparator obc)
110         throws com.liferay.portal.SystemException {
111         return getPersistence().findByUuid(uuid, begin, 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 begin, int end)
145         throws com.liferay.portal.SystemException {
146         return getPersistence().findByFolderId(folderId, begin, end);
147     }
148 
149     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> findByFolderId(
150         long folderId, int begin, int end,
151         com.liferay.portal.kernel.util.OrderByComparator obc)
152         throws com.liferay.portal.SystemException {
153         return getPersistence().findByFolderId(folderId, begin, 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 begin, int end)
187         throws com.liferay.portal.SystemException {
188         return getPersistence().findByTF_TN(toFolderId, toName, begin, 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 begin, int end,
193         com.liferay.portal.kernel.util.OrderByComparator obc)
194         throws com.liferay.portal.SystemException {
195         return getPersistence().findByTF_TN(toFolderId, toName, begin, 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<com.liferay.portlet.documentlibrary.model.DLFileShortcut> findWithDynamicQuery(
225         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
226         throws com.liferay.portal.SystemException {
227         return getPersistence().findWithDynamicQuery(queryInitializer);
228     }
229 
230     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> findWithDynamicQuery(
231         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
232         int begin, int end) throws com.liferay.portal.SystemException {
233         return getPersistence()
234                    .findWithDynamicQuery(queryInitializer, begin, end);
235     }
236 
237     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> findAll()
238         throws com.liferay.portal.SystemException {
239         return getPersistence().findAll();
240     }
241 
242     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> findAll(
243         int begin, int end) throws com.liferay.portal.SystemException {
244         return getPersistence().findAll(begin, end);
245     }
246 
247     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileShortcut> findAll(
248         int begin, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
249         throws com.liferay.portal.SystemException {
250         return getPersistence().findAll(begin, end, obc);
251     }
252 
253     public static void removeByUuid(java.lang.String uuid)
254         throws com.liferay.portal.SystemException {
255         getPersistence().removeByUuid(uuid);
256     }
257 
258     public static void removeByFolderId(long folderId)
259         throws com.liferay.portal.SystemException {
260         getPersistence().removeByFolderId(folderId);
261     }
262 
263     public static void removeByTF_TN(long toFolderId, java.lang.String toName)
264         throws com.liferay.portal.SystemException {
265         getPersistence().removeByTF_TN(toFolderId, toName);
266     }
267 
268     public static void removeAll() throws com.liferay.portal.SystemException {
269         getPersistence().removeAll();
270     }
271 
272     public static int countByUuid(java.lang.String uuid)
273         throws com.liferay.portal.SystemException {
274         return getPersistence().countByUuid(uuid);
275     }
276 
277     public static int countByFolderId(long folderId)
278         throws com.liferay.portal.SystemException {
279         return getPersistence().countByFolderId(folderId);
280     }
281 
282     public static int countByTF_TN(long toFolderId, java.lang.String toName)
283         throws com.liferay.portal.SystemException {
284         return getPersistence().countByTF_TN(toFolderId, toName);
285     }
286 
287     public static int countAll() throws com.liferay.portal.SystemException {
288         return getPersistence().countAll();
289     }
290 
291     public static DLFileShortcutPersistence getPersistence() {
292         return _getUtil()._persistence;
293     }
294 
295     public void setPersistence(DLFileShortcutPersistence persistence) {
296         _persistence = persistence;
297     }
298 
299     private static DLFileShortcutUtil _getUtil() {
300         if (_util == null) {
301             _util = (DLFileShortcutUtil)com.liferay.portal.kernel.bean.BeanLocatorUtil.locate(_UTIL);
302         }
303 
304         return _util;
305     }
306 
307     private static final String _UTIL = DLFileShortcutUtil.class.getName();
308     private static DLFileShortcutUtil _util;
309     private DLFileShortcutPersistence _persistence;
310 }