001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.mobiledevicerules.service.persistence;
016    
017    import com.liferay.portal.service.persistence.BasePersistence;
018    
019    import com.liferay.portlet.mobiledevicerules.model.MDRRule;
020    
021    /**
022     * The persistence interface for the m d r rule service.
023     *
024     * <p>
025     * Caching information and settings can be found in <code>portal.properties</code>
026     * </p>
027     *
028     * @author Edward C. Han
029     * @see MDRRulePersistenceImpl
030     * @see MDRRuleUtil
031     * @generated
032     */
033    public interface MDRRulePersistence extends BasePersistence<MDRRule> {
034            /*
035             * NOTE FOR DEVELOPERS:
036             *
037             * Never modify or reference this interface directly. Always use {@link MDRRuleUtil} to access the m d r rule persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface.
038             */
039    
040            /**
041            * Caches the m d r rule in the entity cache if it is enabled.
042            *
043            * @param mdrRule the m d r rule
044            */
045            public void cacheResult(
046                    com.liferay.portlet.mobiledevicerules.model.MDRRule mdrRule);
047    
048            /**
049            * Caches the m d r rules in the entity cache if it is enabled.
050            *
051            * @param mdrRules the m d r rules
052            */
053            public void cacheResult(
054                    java.util.List<com.liferay.portlet.mobiledevicerules.model.MDRRule> mdrRules);
055    
056            /**
057            * Creates a new m d r rule with the primary key. Does not add the m d r rule to the database.
058            *
059            * @param ruleId the primary key for the new m d r rule
060            * @return the new m d r rule
061            */
062            public com.liferay.portlet.mobiledevicerules.model.MDRRule create(
063                    long ruleId);
064    
065            /**
066            * Removes the m d r rule with the primary key from the database. Also notifies the appropriate model listeners.
067            *
068            * @param ruleId the primary key of the m d r rule
069            * @return the m d r rule that was removed
070            * @throws com.liferay.portlet.mobiledevicerules.NoSuchRuleException if a m d r rule with the primary key could not be found
071            * @throws SystemException if a system exception occurred
072            */
073            public com.liferay.portlet.mobiledevicerules.model.MDRRule remove(
074                    long ruleId)
075                    throws com.liferay.portal.kernel.exception.SystemException,
076                            com.liferay.portlet.mobiledevicerules.NoSuchRuleException;
077    
078            public com.liferay.portlet.mobiledevicerules.model.MDRRule updateImpl(
079                    com.liferay.portlet.mobiledevicerules.model.MDRRule mdrRule,
080                    boolean merge)
081                    throws com.liferay.portal.kernel.exception.SystemException;
082    
083            /**
084            * 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.
085            *
086            * @param ruleId the primary key of the m d r rule
087            * @return the m d r rule
088            * @throws com.liferay.portlet.mobiledevicerules.NoSuchRuleException if a m d r rule with the primary key could not be found
089            * @throws SystemException if a system exception occurred
090            */
091            public com.liferay.portlet.mobiledevicerules.model.MDRRule findByPrimaryKey(
092                    long ruleId)
093                    throws com.liferay.portal.kernel.exception.SystemException,
094                            com.liferay.portlet.mobiledevicerules.NoSuchRuleException;
095    
096            /**
097            * Returns the m d r rule with the primary key or returns <code>null</code> if it could not be found.
098            *
099            * @param ruleId the primary key of the m d r rule
100            * @return the m d r rule, or <code>null</code> if a m d r rule with the primary key could not be found
101            * @throws SystemException if a system exception occurred
102            */
103            public com.liferay.portlet.mobiledevicerules.model.MDRRule fetchByPrimaryKey(
104                    long ruleId) throws com.liferay.portal.kernel.exception.SystemException;
105    
106            /**
107            * Returns all the m d r rules where uuid = &#63;.
108            *
109            * @param uuid the uuid
110            * @return the matching m d r rules
111            * @throws SystemException if a system exception occurred
112            */
113            public java.util.List<com.liferay.portlet.mobiledevicerules.model.MDRRule> findByUuid(
114                    java.lang.String uuid)
115                    throws com.liferay.portal.kernel.exception.SystemException;
116    
117            /**
118            * Returns a range of all the m d r rules where uuid = &#63;.
119            *
120            * <p>
121            * 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.
122            * </p>
123            *
124            * @param uuid the uuid
125            * @param start the lower bound of the range of m d r rules
126            * @param end the upper bound of the range of m d r rules (not inclusive)
127            * @return the range of matching m d r rules
128            * @throws SystemException if a system exception occurred
129            */
130            public java.util.List<com.liferay.portlet.mobiledevicerules.model.MDRRule> findByUuid(
131                    java.lang.String uuid, int start, int end)
132                    throws com.liferay.portal.kernel.exception.SystemException;
133    
134            /**
135            * Returns an ordered range of all the m d r rules where uuid = &#63;.
136            *
137            * <p>
138            * 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.
139            * </p>
140            *
141            * @param uuid the uuid
142            * @param start the lower bound of the range of m d r rules
143            * @param end the upper bound of the range of m d r rules (not inclusive)
144            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
145            * @return the ordered range of matching m d r rules
146            * @throws SystemException if a system exception occurred
147            */
148            public java.util.List<com.liferay.portlet.mobiledevicerules.model.MDRRule> findByUuid(
149                    java.lang.String uuid, int start, int end,
150                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
151                    throws com.liferay.portal.kernel.exception.SystemException;
152    
153            /**
154            * Returns the first m d r rule in the ordered set where uuid = &#63;.
155            *
156            * @param uuid the uuid
157            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
158            * @return the first matching m d r rule
159            * @throws com.liferay.portlet.mobiledevicerules.NoSuchRuleException if a matching m d r rule could not be found
160            * @throws SystemException if a system exception occurred
161            */
162            public com.liferay.portlet.mobiledevicerules.model.MDRRule findByUuid_First(
163                    java.lang.String uuid,
164                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
165                    throws com.liferay.portal.kernel.exception.SystemException,
166                            com.liferay.portlet.mobiledevicerules.NoSuchRuleException;
167    
168            /**
169            * Returns the first m d r rule in the ordered set where uuid = &#63;.
170            *
171            * @param uuid the uuid
172            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
173            * @return the first matching m d r rule, or <code>null</code> if a matching m d r rule could not be found
174            * @throws SystemException if a system exception occurred
175            */
176            public com.liferay.portlet.mobiledevicerules.model.MDRRule fetchByUuid_First(
177                    java.lang.String uuid,
178                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
179                    throws com.liferay.portal.kernel.exception.SystemException;
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 com.liferay.portlet.mobiledevicerules.NoSuchRuleException if a matching m d r rule could not be found
188            * @throws SystemException if a system exception occurred
189            */
190            public com.liferay.portlet.mobiledevicerules.model.MDRRule findByUuid_Last(
191                    java.lang.String uuid,
192                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
193                    throws com.liferay.portal.kernel.exception.SystemException,
194                            com.liferay.portlet.mobiledevicerules.NoSuchRuleException;
195    
196            /**
197            * Returns the last m d r rule in the ordered set where uuid = &#63;.
198            *
199            * @param uuid the uuid
200            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
201            * @return the last matching m d r rule, or <code>null</code> if a matching m d r rule could not be found
202            * @throws SystemException if a system exception occurred
203            */
204            public com.liferay.portlet.mobiledevicerules.model.MDRRule fetchByUuid_Last(
205                    java.lang.String uuid,
206                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
207                    throws com.liferay.portal.kernel.exception.SystemException;
208    
209            /**
210            * Returns the m d r rules before and after the current m d r rule in the ordered set where uuid = &#63;.
211            *
212            * @param ruleId the primary key of the current m d r rule
213            * @param uuid the uuid
214            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
215            * @return the previous, current, and next m d r rule
216            * @throws com.liferay.portlet.mobiledevicerules.NoSuchRuleException if a m d r rule with the primary key could not be found
217            * @throws SystemException if a system exception occurred
218            */
219            public com.liferay.portlet.mobiledevicerules.model.MDRRule[] findByUuid_PrevAndNext(
220                    long ruleId, java.lang.String uuid,
221                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
222                    throws com.liferay.portal.kernel.exception.SystemException,
223                            com.liferay.portlet.mobiledevicerules.NoSuchRuleException;
224    
225            /**
226            * 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.
227            *
228            * @param uuid the uuid
229            * @param groupId the group ID
230            * @return the matching m d r rule
231            * @throws com.liferay.portlet.mobiledevicerules.NoSuchRuleException if a matching m d r rule could not be found
232            * @throws SystemException if a system exception occurred
233            */
234            public com.liferay.portlet.mobiledevicerules.model.MDRRule findByUUID_G(
235                    java.lang.String uuid, long groupId)
236                    throws com.liferay.portal.kernel.exception.SystemException,
237                            com.liferay.portlet.mobiledevicerules.NoSuchRuleException;
238    
239            /**
240            * 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.
241            *
242            * @param uuid the uuid
243            * @param groupId the group ID
244            * @return the matching m d r rule, or <code>null</code> if a matching m d r rule could not be found
245            * @throws SystemException if a system exception occurred
246            */
247            public com.liferay.portlet.mobiledevicerules.model.MDRRule fetchByUUID_G(
248                    java.lang.String uuid, long groupId)
249                    throws com.liferay.portal.kernel.exception.SystemException;
250    
251            /**
252            * 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.
253            *
254            * @param uuid the uuid
255            * @param groupId the group ID
256            * @param retrieveFromCache whether to use the finder cache
257            * @return the matching m d r rule, or <code>null</code> if a matching m d r rule could not be found
258            * @throws SystemException if a system exception occurred
259            */
260            public com.liferay.portlet.mobiledevicerules.model.MDRRule fetchByUUID_G(
261                    java.lang.String uuid, long groupId, boolean retrieveFromCache)
262                    throws com.liferay.portal.kernel.exception.SystemException;
263    
264            /**
265            * Returns all the m d r rules where ruleGroupId = &#63;.
266            *
267            * @param ruleGroupId the rule group ID
268            * @return the matching m d r rules
269            * @throws SystemException if a system exception occurred
270            */
271            public java.util.List<com.liferay.portlet.mobiledevicerules.model.MDRRule> findByRuleGroupId(
272                    long ruleGroupId)
273                    throws com.liferay.portal.kernel.exception.SystemException;
274    
275            /**
276            * Returns a range of all the m d r rules where ruleGroupId = &#63;.
277            *
278            * <p>
279            * 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.
280            * </p>
281            *
282            * @param ruleGroupId the rule group ID
283            * @param start the lower bound of the range of m d r rules
284            * @param end the upper bound of the range of m d r rules (not inclusive)
285            * @return the range of matching m d r rules
286            * @throws SystemException if a system exception occurred
287            */
288            public java.util.List<com.liferay.portlet.mobiledevicerules.model.MDRRule> findByRuleGroupId(
289                    long ruleGroupId, int start, int end)
290                    throws com.liferay.portal.kernel.exception.SystemException;
291    
292            /**
293            * Returns an ordered range of all the m d r rules where ruleGroupId = &#63;.
294            *
295            * <p>
296            * 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.
297            * </p>
298            *
299            * @param ruleGroupId the rule group ID
300            * @param start the lower bound of the range of m d r rules
301            * @param end the upper bound of the range of m d r rules (not inclusive)
302            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
303            * @return the ordered range of matching m d r rules
304            * @throws SystemException if a system exception occurred
305            */
306            public java.util.List<com.liferay.portlet.mobiledevicerules.model.MDRRule> findByRuleGroupId(
307                    long ruleGroupId, int start, int end,
308                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
309                    throws com.liferay.portal.kernel.exception.SystemException;
310    
311            /**
312            * Returns the first m d r rule in the ordered set where ruleGroupId = &#63;.
313            *
314            * @param ruleGroupId the rule group ID
315            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
316            * @return the first matching m d r rule
317            * @throws com.liferay.portlet.mobiledevicerules.NoSuchRuleException if a matching m d r rule could not be found
318            * @throws SystemException if a system exception occurred
319            */
320            public com.liferay.portlet.mobiledevicerules.model.MDRRule findByRuleGroupId_First(
321                    long ruleGroupId,
322                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
323                    throws com.liferay.portal.kernel.exception.SystemException,
324                            com.liferay.portlet.mobiledevicerules.NoSuchRuleException;
325    
326            /**
327            * Returns the first m d r rule in the ordered set where ruleGroupId = &#63;.
328            *
329            * @param ruleGroupId the rule group ID
330            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
331            * @return the first matching m d r rule, or <code>null</code> if a matching m d r rule could not be found
332            * @throws SystemException if a system exception occurred
333            */
334            public com.liferay.portlet.mobiledevicerules.model.MDRRule fetchByRuleGroupId_First(
335                    long ruleGroupId,
336                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
337                    throws com.liferay.portal.kernel.exception.SystemException;
338    
339            /**
340            * Returns the last m d r rule in the ordered set where ruleGroupId = &#63;.
341            *
342            * @param ruleGroupId the rule group ID
343            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
344            * @return the last matching m d r rule
345            * @throws com.liferay.portlet.mobiledevicerules.NoSuchRuleException if a matching m d r rule could not be found
346            * @throws SystemException if a system exception occurred
347            */
348            public com.liferay.portlet.mobiledevicerules.model.MDRRule findByRuleGroupId_Last(
349                    long ruleGroupId,
350                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
351                    throws com.liferay.portal.kernel.exception.SystemException,
352                            com.liferay.portlet.mobiledevicerules.NoSuchRuleException;
353    
354            /**
355            * Returns the last m d r rule in the ordered set where ruleGroupId = &#63;.
356            *
357            * @param ruleGroupId the rule group ID
358            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
359            * @return the last matching m d r rule, or <code>null</code> if a matching m d r rule could not be found
360            * @throws SystemException if a system exception occurred
361            */
362            public com.liferay.portlet.mobiledevicerules.model.MDRRule fetchByRuleGroupId_Last(
363                    long ruleGroupId,
364                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
365                    throws com.liferay.portal.kernel.exception.SystemException;
366    
367            /**
368            * Returns the m d r rules before and after the current m d r rule in the ordered set where ruleGroupId = &#63;.
369            *
370            * @param ruleId the primary key of the current m d r rule
371            * @param ruleGroupId the rule group ID
372            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
373            * @return the previous, current, and next m d r rule
374            * @throws com.liferay.portlet.mobiledevicerules.NoSuchRuleException if a m d r rule with the primary key could not be found
375            * @throws SystemException if a system exception occurred
376            */
377            public com.liferay.portlet.mobiledevicerules.model.MDRRule[] findByRuleGroupId_PrevAndNext(
378                    long ruleId, long ruleGroupId,
379                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
380                    throws com.liferay.portal.kernel.exception.SystemException,
381                            com.liferay.portlet.mobiledevicerules.NoSuchRuleException;
382    
383            /**
384            * Returns all the m d r rules.
385            *
386            * @return the m d r rules
387            * @throws SystemException if a system exception occurred
388            */
389            public java.util.List<com.liferay.portlet.mobiledevicerules.model.MDRRule> findAll()
390                    throws com.liferay.portal.kernel.exception.SystemException;
391    
392            /**
393            * Returns a range of all the m d r rules.
394            *
395            * <p>
396            * 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.
397            * </p>
398            *
399            * @param start the lower bound of the range of m d r rules
400            * @param end the upper bound of the range of m d r rules (not inclusive)
401            * @return the range of m d r rules
402            * @throws SystemException if a system exception occurred
403            */
404            public java.util.List<com.liferay.portlet.mobiledevicerules.model.MDRRule> findAll(
405                    int start, int end)
406                    throws com.liferay.portal.kernel.exception.SystemException;
407    
408            /**
409            * Returns an ordered range of all the m d r rules.
410            *
411            * <p>
412            * 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.
413            * </p>
414            *
415            * @param start the lower bound of the range of m d r rules
416            * @param end the upper bound of the range of m d r rules (not inclusive)
417            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
418            * @return the ordered range of m d r rules
419            * @throws SystemException if a system exception occurred
420            */
421            public java.util.List<com.liferay.portlet.mobiledevicerules.model.MDRRule> findAll(
422                    int start, int end,
423                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
424                    throws com.liferay.portal.kernel.exception.SystemException;
425    
426            /**
427            * Removes all the m d r rules where uuid = &#63; from the database.
428            *
429            * @param uuid the uuid
430            * @throws SystemException if a system exception occurred
431            */
432            public void removeByUuid(java.lang.String uuid)
433                    throws com.liferay.portal.kernel.exception.SystemException;
434    
435            /**
436            * Removes the m d r rule where uuid = &#63; and groupId = &#63; from the database.
437            *
438            * @param uuid the uuid
439            * @param groupId the group ID
440            * @return the m d r rule that was removed
441            * @throws SystemException if a system exception occurred
442            */
443            public com.liferay.portlet.mobiledevicerules.model.MDRRule removeByUUID_G(
444                    java.lang.String uuid, long groupId)
445                    throws com.liferay.portal.kernel.exception.SystemException,
446                            com.liferay.portlet.mobiledevicerules.NoSuchRuleException;
447    
448            /**
449            * Removes all the m d r rules where ruleGroupId = &#63; from the database.
450            *
451            * @param ruleGroupId the rule group ID
452            * @throws SystemException if a system exception occurred
453            */
454            public void removeByRuleGroupId(long ruleGroupId)
455                    throws com.liferay.portal.kernel.exception.SystemException;
456    
457            /**
458            * Removes all the m d r rules from the database.
459            *
460            * @throws SystemException if a system exception occurred
461            */
462            public void removeAll()
463                    throws com.liferay.portal.kernel.exception.SystemException;
464    
465            /**
466            * Returns the number of m d r rules where uuid = &#63;.
467            *
468            * @param uuid the uuid
469            * @return the number of matching m d r rules
470            * @throws SystemException if a system exception occurred
471            */
472            public int countByUuid(java.lang.String uuid)
473                    throws com.liferay.portal.kernel.exception.SystemException;
474    
475            /**
476            * Returns the number of m d r rules where uuid = &#63; and groupId = &#63;.
477            *
478            * @param uuid the uuid
479            * @param groupId the group ID
480            * @return the number of matching m d r rules
481            * @throws SystemException if a system exception occurred
482            */
483            public int countByUUID_G(java.lang.String uuid, long groupId)
484                    throws com.liferay.portal.kernel.exception.SystemException;
485    
486            /**
487            * Returns the number of m d r rules where ruleGroupId = &#63;.
488            *
489            * @param ruleGroupId the rule group ID
490            * @return the number of matching m d r rules
491            * @throws SystemException if a system exception occurred
492            */
493            public int countByRuleGroupId(long ruleGroupId)
494                    throws com.liferay.portal.kernel.exception.SystemException;
495    
496            /**
497            * Returns the number of m d r rules.
498            *
499            * @return the number of m d r rules
500            * @throws SystemException if a system exception occurred
501            */
502            public int countAll()
503                    throws com.liferay.portal.kernel.exception.SystemException;
504    }