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;
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            */
058            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
059            public com.liferay.portlet.mobiledevicerules.model.MDRRule addMDRRule(
060                    com.liferay.portlet.mobiledevicerules.model.MDRRule mdrRule);
061    
062            public com.liferay.portlet.mobiledevicerules.model.MDRRule addRule(
063                    long ruleGroupId,
064                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
065                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
066                    java.lang.String type, java.lang.String typeSettings,
067                    com.liferay.portal.service.ServiceContext serviceContext)
068                    throws com.liferay.portal.kernel.exception.PortalException;
069    
070            public com.liferay.portlet.mobiledevicerules.model.MDRRule addRule(
071                    long ruleGroupId,
072                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
073                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
074                    java.lang.String type,
075                    com.liferay.portal.kernel.util.UnicodeProperties typeSettingsProperties,
076                    com.liferay.portal.service.ServiceContext serviceContext)
077                    throws com.liferay.portal.kernel.exception.PortalException;
078    
079            public com.liferay.portlet.mobiledevicerules.model.MDRRule copyRule(
080                    com.liferay.portlet.mobiledevicerules.model.MDRRule rule,
081                    long ruleGroupId,
082                    com.liferay.portal.service.ServiceContext serviceContext)
083                    throws com.liferay.portal.kernel.exception.PortalException;
084    
085            public com.liferay.portlet.mobiledevicerules.model.MDRRule copyRule(
086                    long ruleId, long ruleGroupId,
087                    com.liferay.portal.service.ServiceContext serviceContext)
088                    throws com.liferay.portal.kernel.exception.PortalException;
089    
090            /**
091            * Creates a new m d r rule with the primary key. Does not add the m d r rule to the database.
092            *
093            * @param ruleId the primary key for the new m d r rule
094            * @return the new m d r rule
095            */
096            public com.liferay.portlet.mobiledevicerules.model.MDRRule createMDRRule(
097                    long ruleId);
098    
099            /**
100            * Deletes the m d r rule from the database. Also notifies the appropriate model listeners.
101            *
102            * @param mdrRule the m d r rule
103            * @return the m d r rule that was removed
104            */
105            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
106            public com.liferay.portlet.mobiledevicerules.model.MDRRule deleteMDRRule(
107                    com.liferay.portlet.mobiledevicerules.model.MDRRule mdrRule);
108    
109            /**
110            * Deletes the m d r rule with the primary key from the database. Also notifies the appropriate model listeners.
111            *
112            * @param ruleId the primary key of the m d r rule
113            * @return the m d r rule that was removed
114            * @throws PortalException if a m d r rule with the primary key could not be found
115            */
116            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
117            public com.liferay.portlet.mobiledevicerules.model.MDRRule deleteMDRRule(
118                    long ruleId) throws com.liferay.portal.kernel.exception.PortalException;
119    
120            /**
121            * @throws PortalException
122            */
123            @Override
124            public com.liferay.portal.model.PersistedModel deletePersistedModel(
125                    com.liferay.portal.model.PersistedModel persistedModel)
126                    throws com.liferay.portal.kernel.exception.PortalException;
127    
128            @com.liferay.portal.kernel.systemevent.SystemEvent(type = SystemEventConstants.TYPE_DELETE)
129            public void deleteRule(
130                    com.liferay.portlet.mobiledevicerules.model.MDRRule rule);
131    
132            public void deleteRule(long ruleId);
133    
134            public void deleteRules(long ruleGroupId);
135    
136            public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery();
137    
138            /**
139            * Performs a dynamic query on the database and returns the matching rows.
140            *
141            * @param dynamicQuery the dynamic query
142            * @return the matching rows
143            */
144            public <T> java.util.List<T> dynamicQuery(
145                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
146    
147            /**
148            * Performs a dynamic query on the database and returns a range of the matching rows.
149            *
150            * <p>
151            * 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.
152            * </p>
153            *
154            * @param dynamicQuery the dynamic query
155            * @param start the lower bound of the range of model instances
156            * @param end the upper bound of the range of model instances (not inclusive)
157            * @return the range of matching rows
158            */
159            public <T> java.util.List<T> dynamicQuery(
160                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
161                    int end);
162    
163            /**
164            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
165            *
166            * <p>
167            * 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.
168            * </p>
169            *
170            * @param dynamicQuery the dynamic query
171            * @param start the lower bound of the range of model instances
172            * @param end the upper bound of the range of model instances (not inclusive)
173            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
174            * @return the ordered range of matching rows
175            */
176            public <T> java.util.List<T> dynamicQuery(
177                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
178                    int end,
179                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator);
180    
181            /**
182            * Returns the number of rows matching the dynamic query.
183            *
184            * @param dynamicQuery the dynamic query
185            * @return the number of rows matching the dynamic query
186            */
187            public long dynamicQueryCount(
188                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
189    
190            /**
191            * Returns the number of rows matching the dynamic query.
192            *
193            * @param dynamicQuery the dynamic query
194            * @param projection the projection to apply to the query
195            * @return the number of rows matching the dynamic query
196            */
197            public long dynamicQueryCount(
198                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
199                    com.liferay.portal.kernel.dao.orm.Projection projection);
200    
201            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
202            public com.liferay.portlet.mobiledevicerules.model.MDRRule fetchMDRRule(
203                    long ruleId);
204    
205            /**
206            * Returns the m d r rule matching the UUID and group.
207            *
208            * @param uuid the m d r rule's UUID
209            * @param groupId the primary key of the group
210            * @return the matching m d r rule, or <code>null</code> if a matching m d r rule could not be found
211            */
212            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
213            public com.liferay.portlet.mobiledevicerules.model.MDRRule fetchMDRRuleByUuidAndGroupId(
214                    java.lang.String uuid, long groupId);
215    
216            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
217            public com.liferay.portlet.mobiledevicerules.model.MDRRule fetchRule(
218                    long ruleId);
219    
220            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
221            public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery();
222    
223            /**
224            * Returns the Spring bean ID for this bean.
225            *
226            * @return the Spring bean ID for this bean
227            */
228            public java.lang.String getBeanIdentifier();
229    
230            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
231            public com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(
232                    com.liferay.portal.kernel.lar.PortletDataContext portletDataContext);
233    
234            /**
235            * Returns the m d r rule with the primary key.
236            *
237            * @param ruleId the primary key of the m d r rule
238            * @return the m d r rule
239            * @throws PortalException if a m d r rule with the primary key could not be found
240            */
241            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
242            public com.liferay.portlet.mobiledevicerules.model.MDRRule getMDRRule(
243                    long ruleId) throws com.liferay.portal.kernel.exception.PortalException;
244    
245            /**
246            * Returns the m d r rule matching the UUID and group.
247            *
248            * @param uuid the m d r rule's UUID
249            * @param groupId the primary key of the group
250            * @return the matching m d r rule
251            * @throws PortalException if a matching m d r rule could not be found
252            */
253            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
254            public com.liferay.portlet.mobiledevicerules.model.MDRRule getMDRRuleByUuidAndGroupId(
255                    java.lang.String uuid, long groupId)
256                    throws com.liferay.portal.kernel.exception.PortalException;
257    
258            /**
259            * Returns a range of all the m d r rules.
260            *
261            * <p>
262            * 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.
263            * </p>
264            *
265            * @param start the lower bound of the range of m d r rules
266            * @param end the upper bound of the range of m d r rules (not inclusive)
267            * @return the range of m d r rules
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    
273            /**
274            * Returns all the m d r rules matching the UUID and company.
275            *
276            * @param uuid the UUID of the m d r rules
277            * @param companyId the primary key of the company
278            * @return the matching m d r rules, or an empty list if no matches were found
279            */
280            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
281            public java.util.List<com.liferay.portlet.mobiledevicerules.model.MDRRule> getMDRRulesByUuidAndCompanyId(
282                    java.lang.String uuid, long companyId);
283    
284            /**
285            * Returns a range of m d r rules matching the UUID and company.
286            *
287            * @param uuid the UUID of the m d r rules
288            * @param companyId the primary key of the company
289            * @param start the lower bound of the range of m d r rules
290            * @param end the upper bound of the range of m d r rules (not inclusive)
291            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
292            * @return the range of matching m d r rules, or an empty list if no matches were found
293            */
294            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
295            public java.util.List<com.liferay.portlet.mobiledevicerules.model.MDRRule> getMDRRulesByUuidAndCompanyId(
296                    java.lang.String uuid, long companyId, int start, int end,
297                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.mobiledevicerules.model.MDRRule> orderByComparator);
298    
299            /**
300            * Returns the number of m d r rules.
301            *
302            * @return the number of m d r rules
303            */
304            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
305            public int getMDRRulesCount();
306    
307            @Override
308            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
309            public com.liferay.portal.model.PersistedModel getPersistedModel(
310                    java.io.Serializable primaryKeyObj)
311                    throws com.liferay.portal.kernel.exception.PortalException;
312    
313            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
314            public com.liferay.portlet.mobiledevicerules.model.MDRRule getRule(
315                    long ruleId) throws com.liferay.portal.kernel.exception.PortalException;
316    
317            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
318            public java.util.List<com.liferay.portlet.mobiledevicerules.model.MDRRule> getRules(
319                    long ruleGroupId);
320    
321            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
322            public java.util.List<com.liferay.portlet.mobiledevicerules.model.MDRRule> getRules(
323                    long ruleGroupId, int start, int end);
324    
325            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
326            public int getRulesCount(long ruleGroupId);
327    
328            /**
329            * Sets the Spring bean ID for this bean.
330            *
331            * @param beanIdentifier the Spring bean ID for this bean
332            */
333            public void setBeanIdentifier(java.lang.String beanIdentifier);
334    
335            /**
336            * Updates the m d r rule in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
337            *
338            * @param mdrRule the m d r rule
339            * @return the m d r rule that was updated
340            */
341            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
342            public com.liferay.portlet.mobiledevicerules.model.MDRRule updateMDRRule(
343                    com.liferay.portlet.mobiledevicerules.model.MDRRule mdrRule);
344    
345            public com.liferay.portlet.mobiledevicerules.model.MDRRule updateRule(
346                    long ruleId, java.util.Map<java.util.Locale, java.lang.String> nameMap,
347                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
348                    java.lang.String type, java.lang.String typeSettings,
349                    com.liferay.portal.service.ServiceContext serviceContext)
350                    throws com.liferay.portal.kernel.exception.PortalException;
351    
352            public com.liferay.portlet.mobiledevicerules.model.MDRRule updateRule(
353                    long ruleId, java.util.Map<java.util.Locale, java.lang.String> nameMap,
354                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
355                    java.lang.String type,
356                    com.liferay.portal.kernel.util.UnicodeProperties typeSettingsProperties,
357                    com.liferay.portal.service.ServiceContext serviceContext)
358                    throws com.liferay.portal.kernel.exception.PortalException;
359    }