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="DLFileRankUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * @author Brian Wing Shun Chan
29   *
30   */
31  public class DLFileRankUtil {
32      public static com.liferay.portlet.documentlibrary.model.DLFileRank create(
33          long fileRankId) {
34          return getPersistence().create(fileRankId);
35      }
36  
37      public static com.liferay.portlet.documentlibrary.model.DLFileRank remove(
38          long fileRankId)
39          throws com.liferay.portal.SystemException, 
40              com.liferay.portlet.documentlibrary.NoSuchFileRankException {
41          return getPersistence().remove(fileRankId);
42      }
43  
44      public static com.liferay.portlet.documentlibrary.model.DLFileRank remove(
45          com.liferay.portlet.documentlibrary.model.DLFileRank dlFileRank)
46          throws com.liferay.portal.SystemException {
47          return getPersistence().remove(dlFileRank);
48      }
49  
50      public static com.liferay.portlet.documentlibrary.model.DLFileRank update(
51          com.liferay.portlet.documentlibrary.model.DLFileRank dlFileRank)
52          throws com.liferay.portal.SystemException {
53          return getPersistence().update(dlFileRank);
54      }
55  
56      public static com.liferay.portlet.documentlibrary.model.DLFileRank update(
57          com.liferay.portlet.documentlibrary.model.DLFileRank dlFileRank,
58          boolean merge) throws com.liferay.portal.SystemException {
59          return getPersistence().update(dlFileRank, merge);
60      }
61  
62      public static com.liferay.portlet.documentlibrary.model.DLFileRank updateImpl(
63          com.liferay.portlet.documentlibrary.model.DLFileRank dlFileRank,
64          boolean merge) throws com.liferay.portal.SystemException {
65          return getPersistence().updateImpl(dlFileRank, merge);
66      }
67  
68      public static com.liferay.portlet.documentlibrary.model.DLFileRank findByPrimaryKey(
69          long fileRankId)
70          throws com.liferay.portal.SystemException, 
71              com.liferay.portlet.documentlibrary.NoSuchFileRankException {
72          return getPersistence().findByPrimaryKey(fileRankId);
73      }
74  
75      public static com.liferay.portlet.documentlibrary.model.DLFileRank fetchByPrimaryKey(
76          long fileRankId) throws com.liferay.portal.SystemException {
77          return getPersistence().fetchByPrimaryKey(fileRankId);
78      }
79  
80      public static java.util.List findByUserId(long userId)
81          throws com.liferay.portal.SystemException {
82          return getPersistence().findByUserId(userId);
83      }
84  
85      public static java.util.List findByUserId(long userId, int begin, int end)
86          throws com.liferay.portal.SystemException {
87          return getPersistence().findByUserId(userId, begin, end);
88      }
89  
90      public static java.util.List findByUserId(long userId, int begin, int end,
91          com.liferay.portal.kernel.util.OrderByComparator obc)
92          throws com.liferay.portal.SystemException {
93          return getPersistence().findByUserId(userId, begin, end, obc);
94      }
95  
96      public static com.liferay.portlet.documentlibrary.model.DLFileRank findByUserId_First(
97          long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
98          throws com.liferay.portal.SystemException, 
99              com.liferay.portlet.documentlibrary.NoSuchFileRankException {
100         return getPersistence().findByUserId_First(userId, obc);
101     }
102 
103     public static com.liferay.portlet.documentlibrary.model.DLFileRank findByUserId_Last(
104         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
105         throws com.liferay.portal.SystemException, 
106             com.liferay.portlet.documentlibrary.NoSuchFileRankException {
107         return getPersistence().findByUserId_Last(userId, obc);
108     }
109 
110     public static com.liferay.portlet.documentlibrary.model.DLFileRank[] findByUserId_PrevAndNext(
111         long fileRankId, long userId,
112         com.liferay.portal.kernel.util.OrderByComparator obc)
113         throws com.liferay.portal.SystemException, 
114             com.liferay.portlet.documentlibrary.NoSuchFileRankException {
115         return getPersistence().findByUserId_PrevAndNext(fileRankId, userId, obc);
116     }
117 
118     public static java.util.List findByF_N(long folderId, java.lang.String name)
119         throws com.liferay.portal.SystemException {
120         return getPersistence().findByF_N(folderId, name);
121     }
122 
123     public static java.util.List findByF_N(long folderId,
124         java.lang.String name, int begin, int end)
125         throws com.liferay.portal.SystemException {
126         return getPersistence().findByF_N(folderId, name, begin, end);
127     }
128 
129     public static java.util.List findByF_N(long folderId,
130         java.lang.String name, int begin, int end,
131         com.liferay.portal.kernel.util.OrderByComparator obc)
132         throws com.liferay.portal.SystemException {
133         return getPersistence().findByF_N(folderId, name, begin, end, obc);
134     }
135 
136     public static com.liferay.portlet.documentlibrary.model.DLFileRank findByF_N_First(
137         long folderId, java.lang.String name,
138         com.liferay.portal.kernel.util.OrderByComparator obc)
139         throws com.liferay.portal.SystemException, 
140             com.liferay.portlet.documentlibrary.NoSuchFileRankException {
141         return getPersistence().findByF_N_First(folderId, name, obc);
142     }
143 
144     public static com.liferay.portlet.documentlibrary.model.DLFileRank findByF_N_Last(
145         long folderId, java.lang.String name,
146         com.liferay.portal.kernel.util.OrderByComparator obc)
147         throws com.liferay.portal.SystemException, 
148             com.liferay.portlet.documentlibrary.NoSuchFileRankException {
149         return getPersistence().findByF_N_Last(folderId, name, obc);
150     }
151 
152     public static com.liferay.portlet.documentlibrary.model.DLFileRank[] findByF_N_PrevAndNext(
153         long fileRankId, long folderId, java.lang.String name,
154         com.liferay.portal.kernel.util.OrderByComparator obc)
155         throws com.liferay.portal.SystemException, 
156             com.liferay.portlet.documentlibrary.NoSuchFileRankException {
157         return getPersistence().findByF_N_PrevAndNext(fileRankId, folderId,
158             name, obc);
159     }
160 
161     public static com.liferay.portlet.documentlibrary.model.DLFileRank findByC_U_F_N(
162         long companyId, long userId, long folderId, java.lang.String name)
163         throws com.liferay.portal.SystemException, 
164             com.liferay.portlet.documentlibrary.NoSuchFileRankException {
165         return getPersistence().findByC_U_F_N(companyId, userId, folderId, name);
166     }
167 
168     public static com.liferay.portlet.documentlibrary.model.DLFileRank fetchByC_U_F_N(
169         long companyId, long userId, long folderId, java.lang.String name)
170         throws com.liferay.portal.SystemException {
171         return getPersistence().fetchByC_U_F_N(companyId, userId, folderId, name);
172     }
173 
174     public static java.util.List findWithDynamicQuery(
175         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
176         throws com.liferay.portal.SystemException {
177         return getPersistence().findWithDynamicQuery(queryInitializer);
178     }
179 
180     public static java.util.List findWithDynamicQuery(
181         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
182         int begin, int end) throws com.liferay.portal.SystemException {
183         return getPersistence().findWithDynamicQuery(queryInitializer, begin,
184             end);
185     }
186 
187     public static java.util.List findAll()
188         throws com.liferay.portal.SystemException {
189         return getPersistence().findAll();
190     }
191 
192     public static java.util.List findAll(int begin, int end)
193         throws com.liferay.portal.SystemException {
194         return getPersistence().findAll(begin, end);
195     }
196 
197     public static java.util.List findAll(int begin, int end,
198         com.liferay.portal.kernel.util.OrderByComparator obc)
199         throws com.liferay.portal.SystemException {
200         return getPersistence().findAll(begin, end, obc);
201     }
202 
203     public static void removeByUserId(long userId)
204         throws com.liferay.portal.SystemException {
205         getPersistence().removeByUserId(userId);
206     }
207 
208     public static void removeByF_N(long folderId, java.lang.String name)
209         throws com.liferay.portal.SystemException {
210         getPersistence().removeByF_N(folderId, name);
211     }
212 
213     public static void removeByC_U_F_N(long companyId, long userId,
214         long folderId, java.lang.String name)
215         throws com.liferay.portal.SystemException, 
216             com.liferay.portlet.documentlibrary.NoSuchFileRankException {
217         getPersistence().removeByC_U_F_N(companyId, userId, folderId, name);
218     }
219 
220     public static void removeAll() throws com.liferay.portal.SystemException {
221         getPersistence().removeAll();
222     }
223 
224     public static int countByUserId(long userId)
225         throws com.liferay.portal.SystemException {
226         return getPersistence().countByUserId(userId);
227     }
228 
229     public static int countByF_N(long folderId, java.lang.String name)
230         throws com.liferay.portal.SystemException {
231         return getPersistence().countByF_N(folderId, name);
232     }
233 
234     public static int countByC_U_F_N(long companyId, long userId,
235         long folderId, java.lang.String name)
236         throws com.liferay.portal.SystemException {
237         return getPersistence().countByC_U_F_N(companyId, userId, folderId, name);
238     }
239 
240     public static int countAll() throws com.liferay.portal.SystemException {
241         return getPersistence().countAll();
242     }
243 
244     public static DLFileRankPersistence getPersistence() {
245         return _getUtil()._persistence;
246     }
247 
248     public void setPersistence(DLFileRankPersistence persistence) {
249         _persistence = persistence;
250     }
251 
252     private static DLFileRankUtil _getUtil() {
253         if (_util == null) {
254             _util = (DLFileRankUtil)com.liferay.portal.kernel.bean.BeanLocatorUtil.locate(_UTIL);
255         }
256 
257         return _util;
258     }
259 
260     private static final String _UTIL = DLFileRankUtil.class.getName();
261     private static DLFileRankUtil _util;
262     private DLFileRankPersistence _persistence;
263 }