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