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