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