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