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            public static com.liferay.portal.model.PluginSetting getDefaultPluginSetting() {
193                    return getService().getDefaultPluginSetting();
194            }
195    
196            public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() {
197                    return getService().getIndexableActionableDynamicQuery();
198            }
199    
200            /**
201            * Returns the OSGi service identifier.
202            *
203            * @return the OSGi service identifier
204            */
205            public static java.lang.String getOSGiServiceIdentifier() {
206                    return getService().getOSGiServiceIdentifier();
207            }
208    
209            public static com.liferay.portal.model.PersistedModel getPersistedModel(
210                    java.io.Serializable primaryKeyObj)
211                    throws com.liferay.portal.kernel.exception.PortalException {
212                    return getService().getPersistedModel(primaryKeyObj);
213            }
214    
215            public static com.liferay.portal.model.PluginSetting getPluginSetting(
216                    long companyId, java.lang.String pluginId, java.lang.String pluginType) {
217                    return getService().getPluginSetting(companyId, pluginId, pluginType);
218            }
219    
220            /**
221            * Returns the plugin setting with the primary key.
222            *
223            * @param pluginSettingId the primary key of the plugin setting
224            * @return the plugin setting
225            * @throws PortalException if a plugin setting with the primary key could not be found
226            */
227            public static com.liferay.portal.model.PluginSetting getPluginSetting(
228                    long pluginSettingId)
229                    throws com.liferay.portal.kernel.exception.PortalException {
230                    return getService().getPluginSetting(pluginSettingId);
231            }
232    
233            /**
234            * Returns a range of all the plugin settings.
235            *
236            * <p>
237            * 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.
238            * </p>
239            *
240            * @param start the lower bound of the range of plugin settings
241            * @param end the upper bound of the range of plugin settings (not inclusive)
242            * @return the range of plugin settings
243            */
244            public static java.util.List<com.liferay.portal.model.PluginSetting> getPluginSettings(
245                    int start, int end) {
246                    return getService().getPluginSettings(start, end);
247            }
248    
249            /**
250            * Returns the number of plugin settings.
251            *
252            * @return the number of plugin settings
253            */
254            public static int getPluginSettingsCount() {
255                    return getService().getPluginSettingsCount();
256            }
257    
258            public static boolean hasPermission(long userId, java.lang.String pluginId,
259                    java.lang.String pluginType) {
260                    return getService().hasPermission(userId, pluginId, pluginType);
261            }
262    
263            public static com.liferay.portal.model.PluginSetting updatePluginSetting(
264                    long companyId, java.lang.String pluginId, java.lang.String pluginType,
265                    java.lang.String roles, boolean active) {
266                    return getService()
267                                       .updatePluginSetting(companyId, pluginId, pluginType, roles,
268                            active);
269            }
270    
271            /**
272            * Updates the plugin setting in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
273            *
274            * @param pluginSetting the plugin setting
275            * @return the plugin setting that was updated
276            */
277            public static com.liferay.portal.model.PluginSetting updatePluginSetting(
278                    com.liferay.portal.model.PluginSetting pluginSetting) {
279                    return getService().updatePluginSetting(pluginSetting);
280            }
281    
282            public static PluginSettingLocalService getService() {
283                    if (_service == null) {
284                            _service = (PluginSettingLocalService)PortalBeanLocatorUtil.locate(PluginSettingLocalService.class.getName());
285    
286                            ReferenceRegistry.registerReference(PluginSettingLocalServiceUtil.class,
287                                    "_service");
288                    }
289    
290                    return _service;
291            }
292    
293            private static PluginSettingLocalService _service;
294    }