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