001    /**
002     * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.documentlibrary.service.persistence;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
019    import com.liferay.portal.kernel.exception.SystemException;
020    import com.liferay.portal.kernel.util.OrderByComparator;
021    import com.liferay.portal.kernel.util.ReferenceRegistry;
022    import com.liferay.portal.service.ServiceContext;
023    
024    import com.liferay.portlet.documentlibrary.model.DLContent;
025    
026    import java.util.List;
027    
028    /**
029     * The persistence utility for the document library content service. This utility wraps {@link DLContentPersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class.
030     *
031     * <p>
032     * Caching information and settings can be found in <code>portal.properties</code>
033     * </p>
034     *
035     * @author Brian Wing Shun Chan
036     * @see DLContentPersistence
037     * @see DLContentPersistenceImpl
038     * @generated
039     */
040    public class DLContentUtil {
041            /*
042             * NOTE FOR DEVELOPERS:
043             *
044             * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class.
045             */
046    
047            /**
048             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
049             */
050            public static void clearCache() {
051                    getPersistence().clearCache();
052            }
053    
054            /**
055             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
056             */
057            public static void clearCache(DLContent dlContent) {
058                    getPersistence().clearCache(dlContent);
059            }
060    
061            /**
062             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
063             */
064            public long countWithDynamicQuery(DynamicQuery dynamicQuery)
065                    throws SystemException {
066                    return getPersistence().countWithDynamicQuery(dynamicQuery);
067            }
068    
069            /**
070             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
071             */
072            public static List<DLContent> findWithDynamicQuery(
073                    DynamicQuery dynamicQuery) throws SystemException {
074                    return getPersistence().findWithDynamicQuery(dynamicQuery);
075            }
076    
077            /**
078             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
079             */
080            public static List<DLContent> findWithDynamicQuery(
081                    DynamicQuery dynamicQuery, int start, int end)
082                    throws SystemException {
083                    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
084            }
085    
086            /**
087             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
088             */
089            public static List<DLContent> findWithDynamicQuery(
090                    DynamicQuery dynamicQuery, int start, int end,
091                    OrderByComparator orderByComparator) throws SystemException {
092                    return getPersistence()
093                                       .findWithDynamicQuery(dynamicQuery, start, end,
094                            orderByComparator);
095            }
096    
097            /**
098             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
099             */
100            public static DLContent update(DLContent dlContent, boolean merge)
101                    throws SystemException {
102                    return getPersistence().update(dlContent, merge);
103            }
104    
105            /**
106             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
107             */
108            public static DLContent update(DLContent dlContent, boolean merge,
109                    ServiceContext serviceContext) throws SystemException {
110                    return getPersistence().update(dlContent, merge, serviceContext);
111            }
112    
113            /**
114            * Caches the document library content in the entity cache if it is enabled.
115            *
116            * @param dlContent the document library content
117            */
118            public static void cacheResult(
119                    com.liferay.portlet.documentlibrary.model.DLContent dlContent) {
120                    getPersistence().cacheResult(dlContent);
121            }
122    
123            /**
124            * Caches the document library contents in the entity cache if it is enabled.
125            *
126            * @param dlContents the document library contents
127            */
128            public static void cacheResult(
129                    java.util.List<com.liferay.portlet.documentlibrary.model.DLContent> dlContents) {
130                    getPersistence().cacheResult(dlContents);
131            }
132    
133            /**
134            * Creates a new document library content with the primary key. Does not add the document library content to the database.
135            *
136            * @param contentId the primary key for the new document library content
137            * @return the new document library content
138            */
139            public static com.liferay.portlet.documentlibrary.model.DLContent create(
140                    long contentId) {
141                    return getPersistence().create(contentId);
142            }
143    
144            /**
145            * Removes the document library content with the primary key from the database. Also notifies the appropriate model listeners.
146            *
147            * @param contentId the primary key of the document library content
148            * @return the document library content that was removed
149            * @throws com.liferay.portlet.documentlibrary.NoSuchContentException if a document library content with the primary key could not be found
150            * @throws SystemException if a system exception occurred
151            */
152            public static com.liferay.portlet.documentlibrary.model.DLContent remove(
153                    long contentId)
154                    throws com.liferay.portal.kernel.exception.SystemException,
155                            com.liferay.portlet.documentlibrary.NoSuchContentException {
156                    return getPersistence().remove(contentId);
157            }
158    
159            public static com.liferay.portlet.documentlibrary.model.DLContent updateImpl(
160                    com.liferay.portlet.documentlibrary.model.DLContent dlContent,
161                    boolean merge)
162                    throws com.liferay.portal.kernel.exception.SystemException {
163                    return getPersistence().updateImpl(dlContent, merge);
164            }
165    
166            /**
167            * Returns the document library content with the primary key or throws a {@link com.liferay.portlet.documentlibrary.NoSuchContentException} if it could not be found.
168            *
169            * @param contentId the primary key of the document library content
170            * @return the document library content
171            * @throws com.liferay.portlet.documentlibrary.NoSuchContentException if a document library content with the primary key could not be found
172            * @throws SystemException if a system exception occurred
173            */
174            public static com.liferay.portlet.documentlibrary.model.DLContent findByPrimaryKey(
175                    long contentId)
176                    throws com.liferay.portal.kernel.exception.SystemException,
177                            com.liferay.portlet.documentlibrary.NoSuchContentException {
178                    return getPersistence().findByPrimaryKey(contentId);
179            }
180    
181            /**
182            * Returns the document library content with the primary key or returns <code>null</code> if it could not be found.
183            *
184            * @param contentId the primary key of the document library content
185            * @return the document library content, or <code>null</code> if a document library content with the primary key could not be found
186            * @throws SystemException if a system exception occurred
187            */
188            public static com.liferay.portlet.documentlibrary.model.DLContent fetchByPrimaryKey(
189                    long contentId)
190                    throws com.liferay.portal.kernel.exception.SystemException {
191                    return getPersistence().fetchByPrimaryKey(contentId);
192            }
193    
194            /**
195            * Returns all the document library contents where companyId = &#63; and repositoryId = &#63;.
196            *
197            * @param companyId the company ID
198            * @param repositoryId the repository ID
199            * @return the matching document library contents
200            * @throws SystemException if a system exception occurred
201            */
202            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLContent> findByC_R(
203                    long companyId, long repositoryId)
204                    throws com.liferay.portal.kernel.exception.SystemException {
205                    return getPersistence().findByC_R(companyId, repositoryId);
206            }
207    
208            /**
209            * Returns a range of all the document library contents where companyId = &#63; and repositoryId = &#63;.
210            *
211            * <p>
212            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
213            * </p>
214            *
215            * @param companyId the company ID
216            * @param repositoryId the repository ID
217            * @param start the lower bound of the range of document library contents
218            * @param end the upper bound of the range of document library contents (not inclusive)
219            * @return the range of matching document library contents
220            * @throws SystemException if a system exception occurred
221            */
222            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLContent> findByC_R(
223                    long companyId, long repositoryId, int start, int end)
224                    throws com.liferay.portal.kernel.exception.SystemException {
225                    return getPersistence().findByC_R(companyId, repositoryId, start, end);
226            }
227    
228            /**
229            * Returns an ordered range of all the document library contents where companyId = &#63; and repositoryId = &#63;.
230            *
231            * <p>
232            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
233            * </p>
234            *
235            * @param companyId the company ID
236            * @param repositoryId the repository ID
237            * @param start the lower bound of the range of document library contents
238            * @param end the upper bound of the range of document library contents (not inclusive)
239            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
240            * @return the ordered range of matching document library contents
241            * @throws SystemException if a system exception occurred
242            */
243            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLContent> findByC_R(
244                    long companyId, long repositoryId, int start, int end,
245                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
246                    throws com.liferay.portal.kernel.exception.SystemException {
247                    return getPersistence()
248                                       .findByC_R(companyId, repositoryId, start, end,
249                            orderByComparator);
250            }
251    
252            /**
253            * Returns the first document library content in the ordered set where companyId = &#63; and repositoryId = &#63;.
254            *
255            * <p>
256            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
257            * </p>
258            *
259            * @param companyId the company ID
260            * @param repositoryId the repository ID
261            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
262            * @return the first matching document library content
263            * @throws com.liferay.portlet.documentlibrary.NoSuchContentException if a matching document library content could not be found
264            * @throws SystemException if a system exception occurred
265            */
266            public static com.liferay.portlet.documentlibrary.model.DLContent findByC_R_First(
267                    long companyId, long repositoryId,
268                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
269                    throws com.liferay.portal.kernel.exception.SystemException,
270                            com.liferay.portlet.documentlibrary.NoSuchContentException {
271                    return getPersistence()
272                                       .findByC_R_First(companyId, repositoryId, orderByComparator);
273            }
274    
275            /**
276            * Returns the last document library content in the ordered set where companyId = &#63; and repositoryId = &#63;.
277            *
278            * <p>
279            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
280            * </p>
281            *
282            * @param companyId the company ID
283            * @param repositoryId the repository ID
284            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
285            * @return the last matching document library content
286            * @throws com.liferay.portlet.documentlibrary.NoSuchContentException if a matching document library content could not be found
287            * @throws SystemException if a system exception occurred
288            */
289            public static com.liferay.portlet.documentlibrary.model.DLContent findByC_R_Last(
290                    long companyId, long repositoryId,
291                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
292                    throws com.liferay.portal.kernel.exception.SystemException,
293                            com.liferay.portlet.documentlibrary.NoSuchContentException {
294                    return getPersistence()
295                                       .findByC_R_Last(companyId, repositoryId, orderByComparator);
296            }
297    
298            /**
299            * Returns the document library contents before and after the current document library content in the ordered set where companyId = &#63; and repositoryId = &#63;.
300            *
301            * <p>
302            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
303            * </p>
304            *
305            * @param contentId the primary key of the current document library content
306            * @param companyId the company ID
307            * @param repositoryId the repository ID
308            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
309            * @return the previous, current, and next document library content
310            * @throws com.liferay.portlet.documentlibrary.NoSuchContentException if a document library content with the primary key could not be found
311            * @throws SystemException if a system exception occurred
312            */
313            public static com.liferay.portlet.documentlibrary.model.DLContent[] findByC_R_PrevAndNext(
314                    long contentId, long companyId, long repositoryId,
315                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
316                    throws com.liferay.portal.kernel.exception.SystemException,
317                            com.liferay.portlet.documentlibrary.NoSuchContentException {
318                    return getPersistence()
319                                       .findByC_R_PrevAndNext(contentId, companyId, repositoryId,
320                            orderByComparator);
321            }
322    
323            /**
324            * Returns all the document library contents where companyId = &#63; and repositoryId = &#63; and path = &#63;.
325            *
326            * @param companyId the company ID
327            * @param repositoryId the repository ID
328            * @param path the path
329            * @return the matching document library contents
330            * @throws SystemException if a system exception occurred
331            */
332            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLContent> findByC_R_P(
333                    long companyId, long repositoryId, java.lang.String path)
334                    throws com.liferay.portal.kernel.exception.SystemException {
335                    return getPersistence().findByC_R_P(companyId, repositoryId, path);
336            }
337    
338            /**
339            * Returns a range of all the document library contents where companyId = &#63; and repositoryId = &#63; and path = &#63;.
340            *
341            * <p>
342            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
343            * </p>
344            *
345            * @param companyId the company ID
346            * @param repositoryId the repository ID
347            * @param path the path
348            * @param start the lower bound of the range of document library contents
349            * @param end the upper bound of the range of document library contents (not inclusive)
350            * @return the range of matching document library contents
351            * @throws SystemException if a system exception occurred
352            */
353            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLContent> findByC_R_P(
354                    long companyId, long repositoryId, java.lang.String path, int start,
355                    int end) throws com.liferay.portal.kernel.exception.SystemException {
356                    return getPersistence()
357                                       .findByC_R_P(companyId, repositoryId, path, start, end);
358            }
359    
360            /**
361            * Returns an ordered range of all the document library contents where companyId = &#63; and repositoryId = &#63; and path = &#63;.
362            *
363            * <p>
364            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
365            * </p>
366            *
367            * @param companyId the company ID
368            * @param repositoryId the repository ID
369            * @param path the path
370            * @param start the lower bound of the range of document library contents
371            * @param end the upper bound of the range of document library contents (not inclusive)
372            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
373            * @return the ordered range of matching document library contents
374            * @throws SystemException if a system exception occurred
375            */
376            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLContent> findByC_R_P(
377                    long companyId, long repositoryId, java.lang.String path, int start,
378                    int end,
379                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
380                    throws com.liferay.portal.kernel.exception.SystemException {
381                    return getPersistence()
382                                       .findByC_R_P(companyId, repositoryId, path, start, end,
383                            orderByComparator);
384            }
385    
386            /**
387            * Returns the first document library content in the ordered set where companyId = &#63; and repositoryId = &#63; and path = &#63;.
388            *
389            * <p>
390            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
391            * </p>
392            *
393            * @param companyId the company ID
394            * @param repositoryId the repository ID
395            * @param path the path
396            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
397            * @return the first matching document library content
398            * @throws com.liferay.portlet.documentlibrary.NoSuchContentException if a matching document library content could not be found
399            * @throws SystemException if a system exception occurred
400            */
401            public static com.liferay.portlet.documentlibrary.model.DLContent findByC_R_P_First(
402                    long companyId, long repositoryId, java.lang.String path,
403                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
404                    throws com.liferay.portal.kernel.exception.SystemException,
405                            com.liferay.portlet.documentlibrary.NoSuchContentException {
406                    return getPersistence()
407                                       .findByC_R_P_First(companyId, repositoryId, path,
408                            orderByComparator);
409            }
410    
411            /**
412            * Returns the last document library content in the ordered set where companyId = &#63; and repositoryId = &#63; and path = &#63;.
413            *
414            * <p>
415            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
416            * </p>
417            *
418            * @param companyId the company ID
419            * @param repositoryId the repository ID
420            * @param path the path
421            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
422            * @return the last matching document library content
423            * @throws com.liferay.portlet.documentlibrary.NoSuchContentException if a matching document library content could not be found
424            * @throws SystemException if a system exception occurred
425            */
426            public static com.liferay.portlet.documentlibrary.model.DLContent findByC_R_P_Last(
427                    long companyId, long repositoryId, java.lang.String path,
428                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
429                    throws com.liferay.portal.kernel.exception.SystemException,
430                            com.liferay.portlet.documentlibrary.NoSuchContentException {
431                    return getPersistence()
432                                       .findByC_R_P_Last(companyId, repositoryId, path,
433                            orderByComparator);
434            }
435    
436            /**
437            * Returns the document library contents before and after the current document library content in the ordered set where companyId = &#63; and repositoryId = &#63; and path = &#63;.
438            *
439            * <p>
440            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
441            * </p>
442            *
443            * @param contentId the primary key of the current document library content
444            * @param companyId the company ID
445            * @param repositoryId the repository ID
446            * @param path the path
447            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
448            * @return the previous, current, and next document library content
449            * @throws com.liferay.portlet.documentlibrary.NoSuchContentException if a document library content with the primary key could not be found
450            * @throws SystemException if a system exception occurred
451            */
452            public static com.liferay.portlet.documentlibrary.model.DLContent[] findByC_R_P_PrevAndNext(
453                    long contentId, long companyId, long repositoryId,
454                    java.lang.String path,
455                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
456                    throws com.liferay.portal.kernel.exception.SystemException,
457                            com.liferay.portlet.documentlibrary.NoSuchContentException {
458                    return getPersistence()
459                                       .findByC_R_P_PrevAndNext(contentId, companyId, repositoryId,
460                            path, orderByComparator);
461            }
462    
463            /**
464            * Returns all the document library contents where companyId = &#63; and repositoryId = &#63; and path LIKE &#63;.
465            *
466            * @param companyId the company ID
467            * @param repositoryId the repository ID
468            * @param path the path
469            * @return the matching document library contents
470            * @throws SystemException if a system exception occurred
471            */
472            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLContent> findByC_R_LikeP(
473                    long companyId, long repositoryId, java.lang.String path)
474                    throws com.liferay.portal.kernel.exception.SystemException {
475                    return getPersistence().findByC_R_LikeP(companyId, repositoryId, path);
476            }
477    
478            /**
479            * Returns a range of all the document library contents where companyId = &#63; and repositoryId = &#63; and path LIKE &#63;.
480            *
481            * <p>
482            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
483            * </p>
484            *
485            * @param companyId the company ID
486            * @param repositoryId the repository ID
487            * @param path the path
488            * @param start the lower bound of the range of document library contents
489            * @param end the upper bound of the range of document library contents (not inclusive)
490            * @return the range of matching document library contents
491            * @throws SystemException if a system exception occurred
492            */
493            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLContent> findByC_R_LikeP(
494                    long companyId, long repositoryId, java.lang.String path, int start,
495                    int end) throws com.liferay.portal.kernel.exception.SystemException {
496                    return getPersistence()
497                                       .findByC_R_LikeP(companyId, repositoryId, path, start, end);
498            }
499    
500            /**
501            * Returns an ordered range of all the document library contents where companyId = &#63; and repositoryId = &#63; and path LIKE &#63;.
502            *
503            * <p>
504            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
505            * </p>
506            *
507            * @param companyId the company ID
508            * @param repositoryId the repository ID
509            * @param path the path
510            * @param start the lower bound of the range of document library contents
511            * @param end the upper bound of the range of document library contents (not inclusive)
512            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
513            * @return the ordered range of matching document library contents
514            * @throws SystemException if a system exception occurred
515            */
516            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLContent> findByC_R_LikeP(
517                    long companyId, long repositoryId, java.lang.String path, int start,
518                    int end,
519                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
520                    throws com.liferay.portal.kernel.exception.SystemException {
521                    return getPersistence()
522                                       .findByC_R_LikeP(companyId, repositoryId, path, start, end,
523                            orderByComparator);
524            }
525    
526            /**
527            * Returns the first document library content in the ordered set where companyId = &#63; and repositoryId = &#63; and path LIKE &#63;.
528            *
529            * <p>
530            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
531            * </p>
532            *
533            * @param companyId the company ID
534            * @param repositoryId the repository ID
535            * @param path the path
536            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
537            * @return the first matching document library content
538            * @throws com.liferay.portlet.documentlibrary.NoSuchContentException if a matching document library content could not be found
539            * @throws SystemException if a system exception occurred
540            */
541            public static com.liferay.portlet.documentlibrary.model.DLContent findByC_R_LikeP_First(
542                    long companyId, long repositoryId, java.lang.String path,
543                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
544                    throws com.liferay.portal.kernel.exception.SystemException,
545                            com.liferay.portlet.documentlibrary.NoSuchContentException {
546                    return getPersistence()
547                                       .findByC_R_LikeP_First(companyId, repositoryId, path,
548                            orderByComparator);
549            }
550    
551            /**
552            * Returns the last document library content in the ordered set where companyId = &#63; and repositoryId = &#63; and path LIKE &#63;.
553            *
554            * <p>
555            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
556            * </p>
557            *
558            * @param companyId the company ID
559            * @param repositoryId the repository ID
560            * @param path the path
561            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
562            * @return the last matching document library content
563            * @throws com.liferay.portlet.documentlibrary.NoSuchContentException if a matching document library content could not be found
564            * @throws SystemException if a system exception occurred
565            */
566            public static com.liferay.portlet.documentlibrary.model.DLContent findByC_R_LikeP_Last(
567                    long companyId, long repositoryId, java.lang.String path,
568                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
569                    throws com.liferay.portal.kernel.exception.SystemException,
570                            com.liferay.portlet.documentlibrary.NoSuchContentException {
571                    return getPersistence()
572                                       .findByC_R_LikeP_Last(companyId, repositoryId, path,
573                            orderByComparator);
574            }
575    
576            /**
577            * Returns the document library contents before and after the current document library content in the ordered set where companyId = &#63; and repositoryId = &#63; and path LIKE &#63;.
578            *
579            * <p>
580            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
581            * </p>
582            *
583            * @param contentId the primary key of the current document library content
584            * @param companyId the company ID
585            * @param repositoryId the repository ID
586            * @param path the path
587            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
588            * @return the previous, current, and next document library content
589            * @throws com.liferay.portlet.documentlibrary.NoSuchContentException if a document library content with the primary key could not be found
590            * @throws SystemException if a system exception occurred
591            */
592            public static com.liferay.portlet.documentlibrary.model.DLContent[] findByC_R_LikeP_PrevAndNext(
593                    long contentId, long companyId, long repositoryId,
594                    java.lang.String path,
595                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
596                    throws com.liferay.portal.kernel.exception.SystemException,
597                            com.liferay.portlet.documentlibrary.NoSuchContentException {
598                    return getPersistence()
599                                       .findByC_R_LikeP_PrevAndNext(contentId, companyId,
600                            repositoryId, path, orderByComparator);
601            }
602    
603            /**
604            * Returns the document library content where companyId = &#63; and repositoryId = &#63; and path = &#63; and version = &#63; or throws a {@link com.liferay.portlet.documentlibrary.NoSuchContentException} if it could not be found.
605            *
606            * @param companyId the company ID
607            * @param repositoryId the repository ID
608            * @param path the path
609            * @param version the version
610            * @return the matching document library content
611            * @throws com.liferay.portlet.documentlibrary.NoSuchContentException if a matching document library content could not be found
612            * @throws SystemException if a system exception occurred
613            */
614            public static com.liferay.portlet.documentlibrary.model.DLContent findByC_R_P_V(
615                    long companyId, long repositoryId, java.lang.String path,
616                    java.lang.String version)
617                    throws com.liferay.portal.kernel.exception.SystemException,
618                            com.liferay.portlet.documentlibrary.NoSuchContentException {
619                    return getPersistence()
620                                       .findByC_R_P_V(companyId, repositoryId, path, version);
621            }
622    
623            /**
624            * Returns the document library content where companyId = &#63; and repositoryId = &#63; and path = &#63; and version = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
625            *
626            * @param companyId the company ID
627            * @param repositoryId the repository ID
628            * @param path the path
629            * @param version the version
630            * @return the matching document library content, or <code>null</code> if a matching document library content could not be found
631            * @throws SystemException if a system exception occurred
632            */
633            public static com.liferay.portlet.documentlibrary.model.DLContent fetchByC_R_P_V(
634                    long companyId, long repositoryId, java.lang.String path,
635                    java.lang.String version)
636                    throws com.liferay.portal.kernel.exception.SystemException {
637                    return getPersistence()
638                                       .fetchByC_R_P_V(companyId, repositoryId, path, version);
639            }
640    
641            /**
642            * Returns the document library content where companyId = &#63; and repositoryId = &#63; and path = &#63; and version = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
643            *
644            * @param companyId the company ID
645            * @param repositoryId the repository ID
646            * @param path the path
647            * @param version the version
648            * @param retrieveFromCache whether to use the finder cache
649            * @return the matching document library content, or <code>null</code> if a matching document library content could not be found
650            * @throws SystemException if a system exception occurred
651            */
652            public static com.liferay.portlet.documentlibrary.model.DLContent fetchByC_R_P_V(
653                    long companyId, long repositoryId, java.lang.String path,
654                    java.lang.String version, boolean retrieveFromCache)
655                    throws com.liferay.portal.kernel.exception.SystemException {
656                    return getPersistence()
657                                       .fetchByC_R_P_V(companyId, repositoryId, path, version,
658                            retrieveFromCache);
659            }
660    
661            /**
662            * Returns all the document library contents.
663            *
664            * @return the document library contents
665            * @throws SystemException if a system exception occurred
666            */
667            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLContent> findAll()
668                    throws com.liferay.portal.kernel.exception.SystemException {
669                    return getPersistence().findAll();
670            }
671    
672            /**
673            * Returns a range of all the document library contents.
674            *
675            * <p>
676            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
677            * </p>
678            *
679            * @param start the lower bound of the range of document library contents
680            * @param end the upper bound of the range of document library contents (not inclusive)
681            * @return the range of document library contents
682            * @throws SystemException if a system exception occurred
683            */
684            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLContent> findAll(
685                    int start, int end)
686                    throws com.liferay.portal.kernel.exception.SystemException {
687                    return getPersistence().findAll(start, end);
688            }
689    
690            /**
691            * Returns an ordered range of all the document library contents.
692            *
693            * <p>
694            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
695            * </p>
696            *
697            * @param start the lower bound of the range of document library contents
698            * @param end the upper bound of the range of document library contents (not inclusive)
699            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
700            * @return the ordered range of document library contents
701            * @throws SystemException if a system exception occurred
702            */
703            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLContent> findAll(
704                    int start, int end,
705                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
706                    throws com.liferay.portal.kernel.exception.SystemException {
707                    return getPersistence().findAll(start, end, orderByComparator);
708            }
709    
710            /**
711            * Removes all the document library contents where companyId = &#63; and repositoryId = &#63; from the database.
712            *
713            * @param companyId the company ID
714            * @param repositoryId the repository ID
715            * @throws SystemException if a system exception occurred
716            */
717            public static void removeByC_R(long companyId, long repositoryId)
718                    throws com.liferay.portal.kernel.exception.SystemException {
719                    getPersistence().removeByC_R(companyId, repositoryId);
720            }
721    
722            /**
723            * Removes all the document library contents where companyId = &#63; and repositoryId = &#63; and path = &#63; from the database.
724            *
725            * @param companyId the company ID
726            * @param repositoryId the repository ID
727            * @param path the path
728            * @throws SystemException if a system exception occurred
729            */
730            public static void removeByC_R_P(long companyId, long repositoryId,
731                    java.lang.String path)
732                    throws com.liferay.portal.kernel.exception.SystemException {
733                    getPersistence().removeByC_R_P(companyId, repositoryId, path);
734            }
735    
736            /**
737            * Removes all the document library contents where companyId = &#63; and repositoryId = &#63; and path LIKE &#63; from the database.
738            *
739            * @param companyId the company ID
740            * @param repositoryId the repository ID
741            * @param path the path
742            * @throws SystemException if a system exception occurred
743            */
744            public static void removeByC_R_LikeP(long companyId, long repositoryId,
745                    java.lang.String path)
746                    throws com.liferay.portal.kernel.exception.SystemException {
747                    getPersistence().removeByC_R_LikeP(companyId, repositoryId, path);
748            }
749    
750            /**
751            * Removes the document library content where companyId = &#63; and repositoryId = &#63; and path = &#63; and version = &#63; from the database.
752            *
753            * @param companyId the company ID
754            * @param repositoryId the repository ID
755            * @param path the path
756            * @param version the version
757            * @throws SystemException if a system exception occurred
758            */
759            public static void removeByC_R_P_V(long companyId, long repositoryId,
760                    java.lang.String path, java.lang.String version)
761                    throws com.liferay.portal.kernel.exception.SystemException,
762                            com.liferay.portlet.documentlibrary.NoSuchContentException {
763                    getPersistence().removeByC_R_P_V(companyId, repositoryId, path, version);
764            }
765    
766            /**
767            * Removes all the document library contents from the database.
768            *
769            * @throws SystemException if a system exception occurred
770            */
771            public static void removeAll()
772                    throws com.liferay.portal.kernel.exception.SystemException {
773                    getPersistence().removeAll();
774            }
775    
776            /**
777            * Returns the number of document library contents where companyId = &#63; and repositoryId = &#63;.
778            *
779            * @param companyId the company ID
780            * @param repositoryId the repository ID
781            * @return the number of matching document library contents
782            * @throws SystemException if a system exception occurred
783            */
784            public static int countByC_R(long companyId, long repositoryId)
785                    throws com.liferay.portal.kernel.exception.SystemException {
786                    return getPersistence().countByC_R(companyId, repositoryId);
787            }
788    
789            /**
790            * Returns the number of document library contents where companyId = &#63; and repositoryId = &#63; and path = &#63;.
791            *
792            * @param companyId the company ID
793            * @param repositoryId the repository ID
794            * @param path the path
795            * @return the number of matching document library contents
796            * @throws SystemException if a system exception occurred
797            */
798            public static int countByC_R_P(long companyId, long repositoryId,
799                    java.lang.String path)
800                    throws com.liferay.portal.kernel.exception.SystemException {
801                    return getPersistence().countByC_R_P(companyId, repositoryId, path);
802            }
803    
804            /**
805            * Returns the number of document library contents where companyId = &#63; and repositoryId = &#63; and path LIKE &#63;.
806            *
807            * @param companyId the company ID
808            * @param repositoryId the repository ID
809            * @param path the path
810            * @return the number of matching document library contents
811            * @throws SystemException if a system exception occurred
812            */
813            public static int countByC_R_LikeP(long companyId, long repositoryId,
814                    java.lang.String path)
815                    throws com.liferay.portal.kernel.exception.SystemException {
816                    return getPersistence().countByC_R_LikeP(companyId, repositoryId, path);
817            }
818    
819            /**
820            * Returns the number of document library contents where companyId = &#63; and repositoryId = &#63; and path = &#63; and version = &#63;.
821            *
822            * @param companyId the company ID
823            * @param repositoryId the repository ID
824            * @param path the path
825            * @param version the version
826            * @return the number of matching document library contents
827            * @throws SystemException if a system exception occurred
828            */
829            public static int countByC_R_P_V(long companyId, long repositoryId,
830                    java.lang.String path, java.lang.String version)
831                    throws com.liferay.portal.kernel.exception.SystemException {
832                    return getPersistence()
833                                       .countByC_R_P_V(companyId, repositoryId, path, version);
834            }
835    
836            /**
837            * Returns the number of document library contents.
838            *
839            * @return the number of document library contents
840            * @throws SystemException if a system exception occurred
841            */
842            public static int countAll()
843                    throws com.liferay.portal.kernel.exception.SystemException {
844                    return getPersistence().countAll();
845            }
846    
847            public static DLContentPersistence getPersistence() {
848                    if (_persistence == null) {
849                            _persistence = (DLContentPersistence)PortalBeanLocatorUtil.locate(DLContentPersistence.class.getName());
850    
851                            ReferenceRegistry.registerReference(DLContentUtil.class,
852                                    "_persistence");
853                    }
854    
855                    return _persistence;
856            }
857    
858            public void setPersistence(DLContentPersistence persistence) {
859                    _persistence = persistence;
860    
861                    ReferenceRegistry.registerReference(DLContentUtil.class, "_persistence");
862            }
863    
864            private static DLContentPersistence _persistence;
865    }