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