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