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