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.portal.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 PluginSetting. This utility wraps
024     * {@link com.liferay.portal.service.impl.PluginSettingLocalServiceImpl} 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 Brian Wing Shun Chan
031     * @see PluginSettingLocalService
032     * @see com.liferay.portal.service.base.PluginSettingLocalServiceBaseImpl
033     * @see com.liferay.portal.service.impl.PluginSettingLocalServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class PluginSettingLocalServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.PluginSettingLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
042             */
043    
044            /**
045            * Adds the plugin setting to the database. Also notifies the appropriate model listeners.
046            *
047            * @param pluginSetting the plugin setting
048            * @return the plugin setting that was added
049            */
050            public static com.liferay.portal.model.PluginSetting addPluginSetting(
051                    com.liferay.portal.model.PluginSetting pluginSetting) {
052                    return getService().addPluginSetting(pluginSetting);
053            }
054    
055            public static void checkPermission(long userId, java.lang.String pluginId,
056                    java.lang.String pluginType)
057                    throws com.liferay.portal.kernel.exception.PortalException {
058                    getService().checkPermission(userId, pluginId, pluginType);
059            }
060    
061            /**
062            * Creates a new plugin setting with the primary key. Does not add the plugin setting to the database.
063            *
064            * @param pluginSettingId the primary key for the new plugin setting
065            * @return the new plugin setting
066            */
067            public static com.liferay.portal.model.PluginSetting createPluginSetting(
068                    long pluginSettingId) {
069                    return getService().createPluginSetting(pluginSettingId);
070            }
071    
072            /**
073            * @throws PortalException
074            */
075            public static com.liferay.portal.model.PersistedModel deletePersistedModel(
076                    com.liferay.portal.model.PersistedModel persistedModel)
077                    throws com.liferay.portal.kernel.exception.PortalException {
078                    return getService().deletePersistedModel(persistedModel);
079            }
080    
081            /**
082            * Deletes the plugin setting from the database. Also notifies the appropriate model listeners.
083            *
084            * @param pluginSetting the plugin setting
085            * @return the plugin setting that was removed
086            */
087            public static com.liferay.portal.model.PluginSetting deletePluginSetting(
088                    com.liferay.portal.model.PluginSetting pluginSetting) {
089                    return getService().deletePluginSetting(pluginSetting);
090            }
091    
092            /**
093            * Deletes the plugin setting with the primary key from the database. Also notifies the appropriate model listeners.
094            *
095            * @param pluginSettingId the primary key of the plugin setting
096            * @return the plugin setting that was removed
097            * @throws PortalException if a plugin setting with the primary key could not be found
098            */
099            public static com.liferay.portal.model.PluginSetting deletePluginSetting(
100                    long pluginSettingId)
101                    throws com.liferay.portal.kernel.exception.PortalException {
102                    return getService().deletePluginSetting(pluginSettingId);
103            }
104    
105            public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
106                    return getService().dynamicQuery();
107            }
108    
109            /**
110            * Performs a dynamic query on the database and returns the matching rows.
111            *
112            * @param dynamicQuery the dynamic query
113            * @return the matching rows
114            */
115            public static <T> java.util.List<T> dynamicQuery(
116                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
117                    return getService().dynamicQuery(dynamicQuery);
118            }
119    
120            /**
121            * Performs a dynamic query on the database and returns a range of the matching rows.
122            *
123            * <p>
124            * 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.portal.model.impl.PluginSettingModelImpl}. 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.
125            * </p>
126            *
127            * @param dynamicQuery the dynamic query
128            * @param start the lower bound of the range of model instances
129            * @param end the upper bound of the range of model instances (not inclusive)
130            * @return the range of matching rows
131            */
132            public static <T> java.util.List<T> dynamicQuery(
133                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
134                    int end) {
135                    return getService().dynamicQuery(dynamicQuery, start, end);
136            }
137    
138            /**
139            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
140            *
141            * <p>
142            * 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.portal.model.impl.PluginSettingModelImpl}. 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.
143            * </p>
144            *
145            * @param dynamicQuery the dynamic query
146            * @param start the lower bound of the range of model instances
147            * @param end the upper bound of the range of model instances (not inclusive)
148            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
149            * @return the ordered range of matching rows
150            */
151            public static <T> java.util.List<T> dynamicQuery(
152                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
153                    int end,
154                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) {
155                    return getService()
156                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
157            }
158    
159            /**
160            * Returns the number of rows matching the dynamic query.
161            *
162            * @param dynamicQuery the dynamic query
163            * @return the number of rows matching the dynamic query
164            */
165            public static long dynamicQueryCount(
166                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
167                    return getService().dynamicQueryCount(dynamicQuery);
168            }
169    
170            /**
171            * Returns the number of rows matching the dynamic query.
172            *
173            * @param dynamicQuery the dynamic query
174            * @param projection the projection to apply to the query
175            * @return the number of rows matching the dynamic query
176            */
177            public static long dynamicQueryCount(
178                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
179                    com.liferay.portal.kernel.dao.orm.Projection projection) {
180                    return getService().dynamicQueryCount(dynamicQuery, projection);
181            }
182    
183            public static com.liferay.portal.model.PluginSetting fetchPluginSetting(
184                    long pluginSettingId) {
185                    return getService().fetchPluginSetting(pluginSettingId);
186            }
187    
188            public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() {
189                    return getService().getActionableDynamicQuery();
190            }
191    
192            /**
193            * Returns the Spring bean ID for this bean.
194            *
195            * @return the Spring bean ID for this bean
196            */
197            public static java.lang.String getBeanIdentifier() {
198                    return getService().getBeanIdentifier();
199            }
200    
201            public static com.liferay.portal.model.PluginSetting getDefaultPluginSetting() {
202                    return getService().getDefaultPluginSetting();
203            }
204    
205            public static com.liferay.portal.model.PersistedModel getPersistedModel(
206                    java.io.Serializable primaryKeyObj)
207                    throws com.liferay.portal.kernel.exception.PortalException {
208                    return getService().getPersistedModel(primaryKeyObj);
209            }
210    
211            public static com.liferay.portal.model.PluginSetting getPluginSetting(
212                    long companyId, java.lang.String pluginId, java.lang.String pluginType) {
213                    return getService().getPluginSetting(companyId, pluginId, pluginType);
214            }
215    
216            /**
217            * Returns the plugin setting with the primary key.
218            *
219            * @param pluginSettingId the primary key of the plugin setting
220            * @return the plugin setting
221            * @throws PortalException if a plugin setting with the primary key could not be found
222            */
223            public static com.liferay.portal.model.PluginSetting getPluginSetting(
224                    long pluginSettingId)
225                    throws com.liferay.portal.kernel.exception.PortalException {
226                    return getService().getPluginSetting(pluginSettingId);
227            }
228    
229            /**
230            * Returns a range of all the plugin settings.
231            *
232            * <p>
233            * 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.portal.model.impl.PluginSettingModelImpl}. 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.
234            * </p>
235            *
236            * @param start the lower bound of the range of plugin settings
237            * @param end the upper bound of the range of plugin settings (not inclusive)
238            * @return the range of plugin settings
239            */
240            public static java.util.List<com.liferay.portal.model.PluginSetting> getPluginSettings(
241                    int start, int end) {
242                    return getService().getPluginSettings(start, end);
243            }
244    
245            /**
246            * Returns the number of plugin settings.
247            *
248            * @return the number of plugin settings
249            */
250            public static int getPluginSettingsCount() {
251                    return getService().getPluginSettingsCount();
252            }
253    
254            public static boolean hasPermission(long userId, java.lang.String pluginId,
255                    java.lang.String pluginType) {
256                    return getService().hasPermission(userId, pluginId, pluginType);
257            }
258    
259            /**
260            * Sets the Spring bean ID for this bean.
261            *
262            * @param beanIdentifier the Spring bean ID for this bean
263            */
264            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
265                    getService().setBeanIdentifier(beanIdentifier);
266            }
267    
268            public static com.liferay.portal.model.PluginSetting updatePluginSetting(
269                    long companyId, java.lang.String pluginId, java.lang.String pluginType,
270                    java.lang.String roles, boolean active) {
271                    return getService()
272                                       .updatePluginSetting(companyId, pluginId, pluginType, roles,
273                            active);
274            }
275    
276            /**
277            * Updates the plugin setting in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
278            *
279            * @param pluginSetting the plugin setting
280            * @return the plugin setting that was updated
281            */
282            public static com.liferay.portal.model.PluginSetting updatePluginSetting(
283                    com.liferay.portal.model.PluginSetting pluginSetting) {
284                    return getService().updatePluginSetting(pluginSetting);
285            }
286    
287            public static PluginSettingLocalService getService() {
288                    if (_service == null) {
289                            _service = (PluginSettingLocalService)PortalBeanLocatorUtil.locate(PluginSettingLocalService.class.getName());
290    
291                            ReferenceRegistry.registerReference(PluginSettingLocalServiceUtil.class,
292                                    "_service");
293                    }
294    
295                    return _service;
296            }
297    
298            /**
299             * @deprecated As of 6.2.0
300             */
301            @Deprecated
302            public void setService(PluginSettingLocalService service) {
303            }
304    
305            private static PluginSettingLocalService _service;
306    }