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