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;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.exception.PortalException;
020    import com.liferay.portal.kernel.exception.SystemException;
021    import com.liferay.portal.kernel.search.IndexableType;
022    import com.liferay.portal.kernel.transaction.Isolation;
023    import com.liferay.portal.kernel.transaction.Propagation;
024    import com.liferay.portal.kernel.transaction.Transactional;
025    import com.liferay.portal.model.SystemEventConstants;
026    import com.liferay.portal.service.BaseLocalService;
027    import com.liferay.portal.service.PersistedModelLocalService;
028    
029    /**
030     * Provides the local service interface for MDRRule. Methods of this
031     * service will not have security checks based on the propagated JAAS
032     * credentials because this service can only be accessed from within the same
033     * VM.
034     *
035     * @author Edward C. Han
036     * @see MDRRuleLocalServiceUtil
037     * @see com.liferay.portlet.mobiledevicerules.service.base.MDRRuleLocalServiceBaseImpl
038     * @see com.liferay.portlet.mobiledevicerules.service.impl.MDRRuleLocalServiceImpl
039     * @generated
040     */
041    @ProviderType
042    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
043            PortalException.class, SystemException.class})
044    public interface MDRRuleLocalService extends BaseLocalService,
045            PersistedModelLocalService {
046            /*
047             * NOTE FOR DEVELOPERS:
048             *
049             * Never modify or reference this interface directly. Always use {@link MDRRuleLocalServiceUtil} to access the m d r rule local service. Add custom service methods to {@link com.liferay.portlet.mobiledevicerules.service.impl.MDRRuleLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
050             */
051    
052            /**
053            * Adds the m d r rule to the database. Also notifies the appropriate model listeners.
054            *
055            * @param mdrRule the m d r rule
056            * @return the m d r rule that was added
057            * @throws SystemException if a system exception occurred
058            */
059            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
060            public com.liferay.portlet.mobiledevicerules.model.MDRRule addMDRRule(
061                    com.liferay.portlet.mobiledevicerules.model.MDRRule mdrRule)
062                    throws com.liferay.portal.kernel.exception.SystemException;
063    
064            /**
065            * Creates a new m d r rule with the primary key. Does not add the m d r rule to the database.
066            *
067            * @param ruleId the primary key for the new m d r rule
068            * @return the new m d r rule
069            */
070            public com.liferay.portlet.mobiledevicerules.model.MDRRule createMDRRule(
071                    long ruleId);
072    
073            /**
074            * Deletes the m d r rule with the primary key from the database. Also notifies the appropriate model listeners.
075            *
076            * @param ruleId the primary key of the m d r rule
077            * @return the m d r rule that was removed
078            * @throws PortalException if a m d r rule with the primary key could not be found
079            * @throws SystemException if a system exception occurred
080            */
081            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
082            public com.liferay.portlet.mobiledevicerules.model.MDRRule deleteMDRRule(
083                    long ruleId)
084                    throws com.liferay.portal.kernel.exception.PortalException,
085                            com.liferay.portal.kernel.exception.SystemException;
086    
087            /**
088            * Deletes the m d r rule from the database. Also notifies the appropriate model listeners.
089            *
090            * @param mdrRule the m d r rule
091            * @return the m d r rule that was removed
092            * @throws SystemException if a system exception occurred
093            */
094            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
095            public com.liferay.portlet.mobiledevicerules.model.MDRRule deleteMDRRule(
096                    com.liferay.portlet.mobiledevicerules.model.MDRRule mdrRule)
097                    throws com.liferay.portal.kernel.exception.SystemException;
098    
099            public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery();
100    
101            /**
102            * Performs a dynamic query on the database and returns the matching rows.
103            *
104            * @param dynamicQuery the dynamic query
105            * @return the matching rows
106            * @throws SystemException if a system exception occurred
107            */
108            @SuppressWarnings("rawtypes")
109            public java.util.List dynamicQuery(
110                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
111                    throws com.liferay.portal.kernel.exception.SystemException;
112    
113            /**
114            * Performs a dynamic query on the database and returns a range of the matching rows.
115            *
116            * <p>
117            * 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.
118            * </p>
119            *
120            * @param dynamicQuery the dynamic query
121            * @param start the lower bound of the range of model instances
122            * @param end the upper bound of the range of model instances (not inclusive)
123            * @return the range of matching rows
124            * @throws SystemException if a system exception occurred
125            */
126            @SuppressWarnings("rawtypes")
127            public java.util.List dynamicQuery(
128                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
129                    int end) throws com.liferay.portal.kernel.exception.SystemException;
130    
131            /**
132            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
133            *
134            * <p>
135            * 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.
136            * </p>
137            *
138            * @param dynamicQuery the dynamic query
139            * @param start the lower bound of the range of model instances
140            * @param end the upper bound of the range of model instances (not inclusive)
141            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
142            * @return the ordered range of matching rows
143            * @throws SystemException if a system exception occurred
144            */
145            @SuppressWarnings("rawtypes")
146            public java.util.List dynamicQuery(
147                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
148                    int end,
149                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
150                    throws com.liferay.portal.kernel.exception.SystemException;
151    
152            /**
153            * Returns the number of rows that match the dynamic query.
154            *
155            * @param dynamicQuery the dynamic query
156            * @return the number of rows that match the dynamic query
157            * @throws SystemException if a system exception occurred
158            */
159            public long dynamicQueryCount(
160                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
161                    throws com.liferay.portal.kernel.exception.SystemException;
162    
163            /**
164            * Returns the number of rows that match the dynamic query.
165            *
166            * @param dynamicQuery the dynamic query
167            * @param projection the projection to apply to the query
168            * @return the number of rows that match the dynamic query
169            * @throws SystemException if a system exception occurred
170            */
171            public long dynamicQueryCount(
172                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
173                    com.liferay.portal.kernel.dao.orm.Projection projection)
174                    throws com.liferay.portal.kernel.exception.SystemException;
175    
176            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
177            public com.liferay.portlet.mobiledevicerules.model.MDRRule fetchMDRRule(
178                    long ruleId) throws com.liferay.portal.kernel.exception.SystemException;
179    
180            /**
181            * Returns the m d r rule with the matching UUID and company.
182            *
183            * @param uuid the m d r rule's UUID
184            * @param companyId the primary key of the company
185            * @return the matching m d r rule, or <code>null</code> if a matching m d r rule could not be found
186            * @throws SystemException if a system exception occurred
187            */
188            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
189            public com.liferay.portlet.mobiledevicerules.model.MDRRule fetchMDRRuleByUuidAndCompanyId(
190                    java.lang.String uuid, long companyId)
191                    throws com.liferay.portal.kernel.exception.SystemException;
192    
193            /**
194            * Returns the m d r rule matching the UUID and group.
195            *
196            * @param uuid the m d r rule's UUID
197            * @param groupId the primary key of the group
198            * @return the matching m d r rule, or <code>null</code> if a matching m d r rule could not be found
199            * @throws SystemException if a system exception occurred
200            */
201            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
202            public com.liferay.portlet.mobiledevicerules.model.MDRRule fetchMDRRuleByUuidAndGroupId(
203                    java.lang.String uuid, long groupId)
204                    throws com.liferay.portal.kernel.exception.SystemException;
205    
206            /**
207            * Returns the m d r rule with the primary key.
208            *
209            * @param ruleId the primary key of the m d r rule
210            * @return the m d r rule
211            * @throws PortalException if a m d r rule with the primary key could not be found
212            * @throws SystemException if a system exception occurred
213            */
214            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
215            public com.liferay.portlet.mobiledevicerules.model.MDRRule getMDRRule(
216                    long ruleId)
217                    throws com.liferay.portal.kernel.exception.PortalException,
218                            com.liferay.portal.kernel.exception.SystemException;
219    
220            @Override
221            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
222            public com.liferay.portal.model.PersistedModel getPersistedModel(
223                    java.io.Serializable primaryKeyObj)
224                    throws com.liferay.portal.kernel.exception.PortalException,
225                            com.liferay.portal.kernel.exception.SystemException;
226    
227            /**
228            * Returns the m d r rule with the matching UUID and company.
229            *
230            * @param uuid the m d r rule's UUID
231            * @param companyId the primary key of the company
232            * @return the matching m d r rule
233            * @throws PortalException if a matching m d r rule could not be found
234            * @throws SystemException if a system exception occurred
235            */
236            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
237            public com.liferay.portlet.mobiledevicerules.model.MDRRule getMDRRuleByUuidAndCompanyId(
238                    java.lang.String uuid, long companyId)
239                    throws com.liferay.portal.kernel.exception.PortalException,
240                            com.liferay.portal.kernel.exception.SystemException;
241    
242            /**
243            * Returns the m d r rule matching the UUID and group.
244            *
245            * @param uuid the m d r rule's UUID
246            * @param groupId the primary key of the group
247            * @return the matching m d r rule
248            * @throws PortalException if a matching m d r rule could not be found
249            * @throws SystemException if a system exception occurred
250            */
251            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
252            public com.liferay.portlet.mobiledevicerules.model.MDRRule getMDRRuleByUuidAndGroupId(
253                    java.lang.String uuid, long groupId)
254                    throws com.liferay.portal.kernel.exception.PortalException,
255                            com.liferay.portal.kernel.exception.SystemException;
256    
257            /**
258            * Returns a range of all the m d r rules.
259            *
260            * <p>
261            * 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.
262            * </p>
263            *
264            * @param start the lower bound of the range of m d r rules
265            * @param end the upper bound of the range of m d r rules (not inclusive)
266            * @return the range of m d r rules
267            * @throws SystemException if a system exception occurred
268            */
269            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
270            public java.util.List<com.liferay.portlet.mobiledevicerules.model.MDRRule> getMDRRules(
271                    int start, int end)
272                    throws com.liferay.portal.kernel.exception.SystemException;
273    
274            /**
275            * Returns the number of m d r rules.
276            *
277            * @return the number of m d r rules
278            * @throws SystemException if a system exception occurred
279            */
280            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
281            public int getMDRRulesCount()
282                    throws com.liferay.portal.kernel.exception.SystemException;
283    
284            /**
285            * Updates the m d r rule in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
286            *
287            * @param mdrRule the m d r rule
288            * @return the m d r rule that was updated
289            * @throws SystemException if a system exception occurred
290            */
291            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
292            public com.liferay.portlet.mobiledevicerules.model.MDRRule updateMDRRule(
293                    com.liferay.portlet.mobiledevicerules.model.MDRRule mdrRule)
294                    throws com.liferay.portal.kernel.exception.SystemException;
295    
296            /**
297            * Returns the Spring bean ID for this bean.
298            *
299            * @return the Spring bean ID for this bean
300            */
301            public java.lang.String getBeanIdentifier();
302    
303            /**
304            * Sets the Spring bean ID for this bean.
305            *
306            * @param beanIdentifier the Spring bean ID for this bean
307            */
308            public void setBeanIdentifier(java.lang.String beanIdentifier);
309    
310            public com.liferay.portlet.mobiledevicerules.model.MDRRule addRule(
311                    long ruleGroupId,
312                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
313                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
314                    java.lang.String type, java.lang.String typeSettings,
315                    com.liferay.portal.service.ServiceContext serviceContext)
316                    throws com.liferay.portal.kernel.exception.PortalException,
317                            com.liferay.portal.kernel.exception.SystemException;
318    
319            public com.liferay.portlet.mobiledevicerules.model.MDRRule addRule(
320                    long ruleGroupId,
321                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
322                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
323                    java.lang.String type,
324                    com.liferay.portal.kernel.util.UnicodeProperties typeSettingsProperties,
325                    com.liferay.portal.service.ServiceContext serviceContext)
326                    throws com.liferay.portal.kernel.exception.PortalException,
327                            com.liferay.portal.kernel.exception.SystemException;
328    
329            public com.liferay.portlet.mobiledevicerules.model.MDRRule copyRule(
330                    long ruleId, long ruleGroupId,
331                    com.liferay.portal.service.ServiceContext serviceContext)
332                    throws com.liferay.portal.kernel.exception.PortalException,
333                            com.liferay.portal.kernel.exception.SystemException;
334    
335            public com.liferay.portlet.mobiledevicerules.model.MDRRule copyRule(
336                    com.liferay.portlet.mobiledevicerules.model.MDRRule rule,
337                    long ruleGroupId,
338                    com.liferay.portal.service.ServiceContext serviceContext)
339                    throws com.liferay.portal.kernel.exception.PortalException,
340                            com.liferay.portal.kernel.exception.SystemException;
341    
342            public void deleteRule(long ruleId)
343                    throws com.liferay.portal.kernel.exception.SystemException;
344    
345            @com.liferay.portal.kernel.systemevent.SystemEvent(type = SystemEventConstants.TYPE_DELETE)
346            public void deleteRule(
347                    com.liferay.portlet.mobiledevicerules.model.MDRRule rule)
348                    throws com.liferay.portal.kernel.exception.SystemException;
349    
350            public void deleteRules(long ruleGroupId)
351                    throws com.liferay.portal.kernel.exception.SystemException;
352    
353            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
354            public com.liferay.portlet.mobiledevicerules.model.MDRRule fetchRule(
355                    long ruleId) throws com.liferay.portal.kernel.exception.SystemException;
356    
357            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
358            public com.liferay.portlet.mobiledevicerules.model.MDRRule getRule(
359                    long ruleId)
360                    throws com.liferay.portal.kernel.exception.PortalException,
361                            com.liferay.portal.kernel.exception.SystemException;
362    
363            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
364            public java.util.List<com.liferay.portlet.mobiledevicerules.model.MDRRule> getRules(
365                    long ruleGroupId)
366                    throws com.liferay.portal.kernel.exception.SystemException;
367    
368            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
369            public java.util.List<com.liferay.portlet.mobiledevicerules.model.MDRRule> getRules(
370                    long ruleGroupId, int start, int end)
371                    throws com.liferay.portal.kernel.exception.SystemException;
372    
373            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
374            public int getRulesCount(long ruleGroupId)
375                    throws com.liferay.portal.kernel.exception.SystemException;
376    
377            public com.liferay.portlet.mobiledevicerules.model.MDRRule updateRule(
378                    long ruleId, java.util.Map<java.util.Locale, java.lang.String> nameMap,
379                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
380                    java.lang.String type, java.lang.String typeSettings,
381                    com.liferay.portal.service.ServiceContext serviceContext)
382                    throws com.liferay.portal.kernel.exception.PortalException,
383                            com.liferay.portal.kernel.exception.SystemException;
384    
385            public com.liferay.portlet.mobiledevicerules.model.MDRRule updateRule(
386                    long ruleId, java.util.Map<java.util.Locale, java.lang.String> nameMap,
387                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
388                    java.lang.String type,
389                    com.liferay.portal.kernel.util.UnicodeProperties typeSettingsProperties,
390                    com.liferay.portal.service.ServiceContext serviceContext)
391                    throws com.liferay.portal.kernel.exception.PortalException,
392                            com.liferay.portal.kernel.exception.SystemException;
393    }