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 that match the dynamic query.
183            *
184            * @param dynamicQuery the dynamic query
185            * @return the number of rows that match 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 that match 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 that match 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            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
274            public java.util.List<com.liferay.portlet.mobiledevicerules.model.MDRRule> getMDRRulesByUuidAndCompanyId(
275                    java.lang.String uuid, long companyId);
276    
277            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
278            public java.util.List<com.liferay.portlet.mobiledevicerules.model.MDRRule> getMDRRulesByUuidAndCompanyId(
279                    java.lang.String uuid, long companyId, int start, int end,
280                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.mobiledevicerules.model.MDRRule> orderByComparator);
281    
282            /**
283            * Returns the number of m d r rules.
284            *
285            * @return the number of m d r rules
286            */
287            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
288            public int getMDRRulesCount();
289    
290            @Override
291            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
292            public com.liferay.portal.model.PersistedModel getPersistedModel(
293                    java.io.Serializable primaryKeyObj)
294                    throws com.liferay.portal.kernel.exception.PortalException;
295    
296            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
297            public com.liferay.portlet.mobiledevicerules.model.MDRRule getRule(
298                    long ruleId) throws com.liferay.portal.kernel.exception.PortalException;
299    
300            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
301            public java.util.List<com.liferay.portlet.mobiledevicerules.model.MDRRule> getRules(
302                    long ruleGroupId);
303    
304            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
305            public java.util.List<com.liferay.portlet.mobiledevicerules.model.MDRRule> getRules(
306                    long ruleGroupId, int start, int end);
307    
308            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
309            public int getRulesCount(long ruleGroupId);
310    
311            /**
312            * Sets the Spring bean ID for this bean.
313            *
314            * @param beanIdentifier the Spring bean ID for this bean
315            */
316            public void setBeanIdentifier(java.lang.String beanIdentifier);
317    
318            /**
319            * Updates the m d r rule in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
320            *
321            * @param mdrRule the m d r rule
322            * @return the m d r rule that was updated
323            */
324            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
325            public com.liferay.portlet.mobiledevicerules.model.MDRRule updateMDRRule(
326                    com.liferay.portlet.mobiledevicerules.model.MDRRule mdrRule);
327    
328            public com.liferay.portlet.mobiledevicerules.model.MDRRule updateRule(
329                    long ruleId, java.util.Map<java.util.Locale, java.lang.String> nameMap,
330                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
331                    java.lang.String type, java.lang.String typeSettings,
332                    com.liferay.portal.service.ServiceContext serviceContext)
333                    throws com.liferay.portal.kernel.exception.PortalException;
334    
335            public com.liferay.portlet.mobiledevicerules.model.MDRRule updateRule(
336                    long ruleId, java.util.Map<java.util.Locale, java.lang.String> nameMap,
337                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
338                    java.lang.String type,
339                    com.liferay.portal.kernel.util.UnicodeProperties typeSettingsProperties,
340                    com.liferay.portal.service.ServiceContext serviceContext)
341                    throws com.liferay.portal.kernel.exception.PortalException;
342    }