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