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