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