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