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