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="DLFileRankUtil.java.html"><b><i>View Source</i></b></a>
24   *
25   * @author Brian Wing Shun Chan
26   *
27   */
28  public class DLFileRankUtil {
29      public static void cacheResult(
30          com.liferay.portlet.documentlibrary.model.DLFileRank dlFileRank) {
31          getPersistence().cacheResult(dlFileRank);
32      }
33  
34      public static void cacheResult(
35          java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> dlFileRanks) {
36          getPersistence().cacheResult(dlFileRanks);
37      }
38  
39      public static void clearCache() {
40          getPersistence().clearCache();
41      }
42  
43      public static com.liferay.portlet.documentlibrary.model.DLFileRank create(
44          long fileRankId) {
45          return getPersistence().create(fileRankId);
46      }
47  
48      public static com.liferay.portlet.documentlibrary.model.DLFileRank remove(
49          long fileRankId)
50          throws com.liferay.portal.SystemException,
51              com.liferay.portlet.documentlibrary.NoSuchFileRankException {
52          return getPersistence().remove(fileRankId);
53      }
54  
55      public static com.liferay.portlet.documentlibrary.model.DLFileRank remove(
56          com.liferay.portlet.documentlibrary.model.DLFileRank dlFileRank)
57          throws com.liferay.portal.SystemException {
58          return getPersistence().remove(dlFileRank);
59      }
60  
61      /**
62       * @deprecated Use <code>update(DLFileRank dlFileRank, boolean merge)</code>.
63       */
64      public static com.liferay.portlet.documentlibrary.model.DLFileRank update(
65          com.liferay.portlet.documentlibrary.model.DLFileRank dlFileRank)
66          throws com.liferay.portal.SystemException {
67          return getPersistence().update(dlFileRank);
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        dlFileRank 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 dlFileRank 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.DLFileRank update(
84          com.liferay.portlet.documentlibrary.model.DLFileRank dlFileRank,
85          boolean merge) throws com.liferay.portal.SystemException {
86          return getPersistence().update(dlFileRank, merge);
87      }
88  
89      public static com.liferay.portlet.documentlibrary.model.DLFileRank updateImpl(
90          com.liferay.portlet.documentlibrary.model.DLFileRank dlFileRank,
91          boolean merge) throws com.liferay.portal.SystemException {
92          return getPersistence().updateImpl(dlFileRank, merge);
93      }
94  
95      public static com.liferay.portlet.documentlibrary.model.DLFileRank findByPrimaryKey(
96          long fileRankId)
97          throws com.liferay.portal.SystemException,
98              com.liferay.portlet.documentlibrary.NoSuchFileRankException {
99          return getPersistence().findByPrimaryKey(fileRankId);
100     }
101 
102     public static com.liferay.portlet.documentlibrary.model.DLFileRank fetchByPrimaryKey(
103         long fileRankId) throws com.liferay.portal.SystemException {
104         return getPersistence().fetchByPrimaryKey(fileRankId);
105     }
106 
107     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> findByUserId(
108         long userId) throws com.liferay.portal.SystemException {
109         return getPersistence().findByUserId(userId);
110     }
111 
112     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> findByUserId(
113         long userId, int start, int end)
114         throws com.liferay.portal.SystemException {
115         return getPersistence().findByUserId(userId, start, end);
116     }
117 
118     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> findByUserId(
119         long userId, int start, int end,
120         com.liferay.portal.kernel.util.OrderByComparator obc)
121         throws com.liferay.portal.SystemException {
122         return getPersistence().findByUserId(userId, start, end, obc);
123     }
124 
125     public static com.liferay.portlet.documentlibrary.model.DLFileRank findByUserId_First(
126         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
127         throws com.liferay.portal.SystemException,
128             com.liferay.portlet.documentlibrary.NoSuchFileRankException {
129         return getPersistence().findByUserId_First(userId, obc);
130     }
131 
132     public static com.liferay.portlet.documentlibrary.model.DLFileRank findByUserId_Last(
133         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
134         throws com.liferay.portal.SystemException,
135             com.liferay.portlet.documentlibrary.NoSuchFileRankException {
136         return getPersistence().findByUserId_Last(userId, obc);
137     }
138 
139     public static com.liferay.portlet.documentlibrary.model.DLFileRank[] findByUserId_PrevAndNext(
140         long fileRankId, long userId,
141         com.liferay.portal.kernel.util.OrderByComparator obc)
142         throws com.liferay.portal.SystemException,
143             com.liferay.portlet.documentlibrary.NoSuchFileRankException {
144         return getPersistence().findByUserId_PrevAndNext(fileRankId, userId, obc);
145     }
146 
147     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> findByG_U(
148         long groupId, long userId) throws com.liferay.portal.SystemException {
149         return getPersistence().findByG_U(groupId, userId);
150     }
151 
152     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> findByG_U(
153         long groupId, long userId, int start, int end)
154         throws com.liferay.portal.SystemException {
155         return getPersistence().findByG_U(groupId, userId, start, end);
156     }
157 
158     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> findByG_U(
159         long groupId, long userId, int start, int end,
160         com.liferay.portal.kernel.util.OrderByComparator obc)
161         throws com.liferay.portal.SystemException {
162         return getPersistence().findByG_U(groupId, userId, start, end, obc);
163     }
164 
165     public static com.liferay.portlet.documentlibrary.model.DLFileRank findByG_U_First(
166         long groupId, long userId,
167         com.liferay.portal.kernel.util.OrderByComparator obc)
168         throws com.liferay.portal.SystemException,
169             com.liferay.portlet.documentlibrary.NoSuchFileRankException {
170         return getPersistence().findByG_U_First(groupId, userId, obc);
171     }
172 
173     public static com.liferay.portlet.documentlibrary.model.DLFileRank findByG_U_Last(
174         long groupId, long userId,
175         com.liferay.portal.kernel.util.OrderByComparator obc)
176         throws com.liferay.portal.SystemException,
177             com.liferay.portlet.documentlibrary.NoSuchFileRankException {
178         return getPersistence().findByG_U_Last(groupId, userId, obc);
179     }
180 
181     public static com.liferay.portlet.documentlibrary.model.DLFileRank[] findByG_U_PrevAndNext(
182         long fileRankId, long groupId, long userId,
183         com.liferay.portal.kernel.util.OrderByComparator obc)
184         throws com.liferay.portal.SystemException,
185             com.liferay.portlet.documentlibrary.NoSuchFileRankException {
186         return getPersistence()
187                    .findByG_U_PrevAndNext(fileRankId, groupId, userId, obc);
188     }
189 
190     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> findByF_N(
191         long folderId, java.lang.String name)
192         throws com.liferay.portal.SystemException {
193         return getPersistence().findByF_N(folderId, name);
194     }
195 
196     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> findByF_N(
197         long folderId, java.lang.String name, int start, int end)
198         throws com.liferay.portal.SystemException {
199         return getPersistence().findByF_N(folderId, name, start, end);
200     }
201 
202     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> findByF_N(
203         long folderId, java.lang.String name, int start, int end,
204         com.liferay.portal.kernel.util.OrderByComparator obc)
205         throws com.liferay.portal.SystemException {
206         return getPersistence().findByF_N(folderId, name, start, end, obc);
207     }
208 
209     public static com.liferay.portlet.documentlibrary.model.DLFileRank findByF_N_First(
210         long folderId, java.lang.String name,
211         com.liferay.portal.kernel.util.OrderByComparator obc)
212         throws com.liferay.portal.SystemException,
213             com.liferay.portlet.documentlibrary.NoSuchFileRankException {
214         return getPersistence().findByF_N_First(folderId, name, obc);
215     }
216 
217     public static com.liferay.portlet.documentlibrary.model.DLFileRank findByF_N_Last(
218         long folderId, java.lang.String name,
219         com.liferay.portal.kernel.util.OrderByComparator obc)
220         throws com.liferay.portal.SystemException,
221             com.liferay.portlet.documentlibrary.NoSuchFileRankException {
222         return getPersistence().findByF_N_Last(folderId, name, obc);
223     }
224 
225     public static com.liferay.portlet.documentlibrary.model.DLFileRank[] findByF_N_PrevAndNext(
226         long fileRankId, long folderId, java.lang.String name,
227         com.liferay.portal.kernel.util.OrderByComparator obc)
228         throws com.liferay.portal.SystemException,
229             com.liferay.portlet.documentlibrary.NoSuchFileRankException {
230         return getPersistence()
231                    .findByF_N_PrevAndNext(fileRankId, folderId, name, obc);
232     }
233 
234     public static com.liferay.portlet.documentlibrary.model.DLFileRank findByC_U_F_N(
235         long companyId, long userId, long folderId, java.lang.String name)
236         throws com.liferay.portal.SystemException,
237             com.liferay.portlet.documentlibrary.NoSuchFileRankException {
238         return getPersistence().findByC_U_F_N(companyId, userId, folderId, name);
239     }
240 
241     public static com.liferay.portlet.documentlibrary.model.DLFileRank fetchByC_U_F_N(
242         long companyId, long userId, long folderId, java.lang.String name)
243         throws com.liferay.portal.SystemException {
244         return getPersistence().fetchByC_U_F_N(companyId, userId, folderId, name);
245     }
246 
247     public static com.liferay.portlet.documentlibrary.model.DLFileRank fetchByC_U_F_N(
248         long companyId, long userId, long folderId, java.lang.String name,
249         boolean retrieveFromCache) throws com.liferay.portal.SystemException {
250         return getPersistence()
251                    .fetchByC_U_F_N(companyId, userId, folderId, name,
252             retrieveFromCache);
253     }
254 
255     public static java.util.List<Object> findWithDynamicQuery(
256         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
257         throws com.liferay.portal.SystemException {
258         return getPersistence().findWithDynamicQuery(dynamicQuery);
259     }
260 
261     public static java.util.List<Object> findWithDynamicQuery(
262         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
263         int end) throws com.liferay.portal.SystemException {
264         return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
265     }
266 
267     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> findAll()
268         throws com.liferay.portal.SystemException {
269         return getPersistence().findAll();
270     }
271 
272     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> findAll(
273         int start, int end) throws com.liferay.portal.SystemException {
274         return getPersistence().findAll(start, end);
275     }
276 
277     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> findAll(
278         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
279         throws com.liferay.portal.SystemException {
280         return getPersistence().findAll(start, end, obc);
281     }
282 
283     public static void removeByUserId(long userId)
284         throws com.liferay.portal.SystemException {
285         getPersistence().removeByUserId(userId);
286     }
287 
288     public static void removeByG_U(long groupId, long userId)
289         throws com.liferay.portal.SystemException {
290         getPersistence().removeByG_U(groupId, userId);
291     }
292 
293     public static void removeByF_N(long folderId, java.lang.String name)
294         throws com.liferay.portal.SystemException {
295         getPersistence().removeByF_N(folderId, name);
296     }
297 
298     public static void removeByC_U_F_N(long companyId, long userId,
299         long folderId, java.lang.String name)
300         throws com.liferay.portal.SystemException,
301             com.liferay.portlet.documentlibrary.NoSuchFileRankException {
302         getPersistence().removeByC_U_F_N(companyId, userId, folderId, name);
303     }
304 
305     public static void removeAll() throws com.liferay.portal.SystemException {
306         getPersistence().removeAll();
307     }
308 
309     public static int countByUserId(long userId)
310         throws com.liferay.portal.SystemException {
311         return getPersistence().countByUserId(userId);
312     }
313 
314     public static int countByG_U(long groupId, long userId)
315         throws com.liferay.portal.SystemException {
316         return getPersistence().countByG_U(groupId, userId);
317     }
318 
319     public static int countByF_N(long folderId, java.lang.String name)
320         throws com.liferay.portal.SystemException {
321         return getPersistence().countByF_N(folderId, name);
322     }
323 
324     public static int countByC_U_F_N(long companyId, long userId,
325         long folderId, java.lang.String name)
326         throws com.liferay.portal.SystemException {
327         return getPersistence().countByC_U_F_N(companyId, userId, folderId, name);
328     }
329 
330     public static int countAll() throws com.liferay.portal.SystemException {
331         return getPersistence().countAll();
332     }
333 
334     public static DLFileRankPersistence getPersistence() {
335         return _persistence;
336     }
337 
338     public void setPersistence(DLFileRankPersistence persistence) {
339         _persistence = persistence;
340     }
341 
342     private static DLFileRankPersistence _persistence;
343 }