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            public static com.liferay.portlet.social.model.SocialActivitySet getClassActivitySet(
202                    long classNameId, long classPK, int type) {
203                    return getService().getClassActivitySet(classNameId, classPK, type);
204            }
205    
206            public static com.liferay.portlet.social.model.SocialActivitySet getClassActivitySet(
207                    long userId, long classNameId, long classPK, int type) {
208                    return getService()
209                                       .getClassActivitySet(userId, classNameId, classPK, type);
210            }
211    
212            public static java.util.List<com.liferay.portlet.social.model.SocialActivitySet> getGroupActivitySets(
213                    long groupId, int start, int end) {
214                    return getService().getGroupActivitySets(groupId, start, end);
215            }
216    
217            public static int getGroupActivitySetsCount(long groupId) {
218                    return getService().getGroupActivitySetsCount(groupId);
219            }
220    
221            public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() {
222                    return getService().getIndexableActionableDynamicQuery();
223            }
224    
225            /**
226            * Returns the OSGi service identifier.
227            *
228            * @return the OSGi service identifier
229            */
230            public static java.lang.String getOSGiServiceIdentifier() {
231                    return getService().getOSGiServiceIdentifier();
232            }
233    
234            public static com.liferay.portal.model.PersistedModel getPersistedModel(
235                    java.io.Serializable primaryKeyObj)
236                    throws com.liferay.portal.kernel.exception.PortalException {
237                    return getService().getPersistedModel(primaryKeyObj);
238            }
239    
240            public static java.util.List<com.liferay.portlet.social.model.SocialActivitySet> getRelationActivitySets(
241                    long userId, int start, int end) {
242                    return getService().getRelationActivitySets(userId, start, end);
243            }
244    
245            public static java.util.List<com.liferay.portlet.social.model.SocialActivitySet> getRelationActivitySets(
246                    long userId, int type, int start, int end) {
247                    return getService().getRelationActivitySets(userId, type, start, end);
248            }
249    
250            public static int getRelationActivitySetsCount(long userId) {
251                    return getService().getRelationActivitySetsCount(userId);
252            }
253    
254            public static int getRelationActivitySetsCount(long userId, int type) {
255                    return getService().getRelationActivitySetsCount(userId, type);
256            }
257    
258            /**
259            * Returns the social activity set with the primary key.
260            *
261            * @param activitySetId the primary key of the social activity set
262            * @return the social activity set
263            * @throws PortalException if a social activity set with the primary key could not be found
264            */
265            public static com.liferay.portlet.social.model.SocialActivitySet getSocialActivitySet(
266                    long activitySetId)
267                    throws com.liferay.portal.kernel.exception.PortalException {
268                    return getService().getSocialActivitySet(activitySetId);
269            }
270    
271            /**
272            * Returns a range of all the social activity sets.
273            *
274            * <p>
275            * 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.
276            * </p>
277            *
278            * @param start the lower bound of the range of social activity sets
279            * @param end the upper bound of the range of social activity sets (not inclusive)
280            * @return the range of social activity sets
281            */
282            public static java.util.List<com.liferay.portlet.social.model.SocialActivitySet> getSocialActivitySets(
283                    int start, int end) {
284                    return getService().getSocialActivitySets(start, end);
285            }
286    
287            /**
288            * Returns the number of social activity sets.
289            *
290            * @return the number of social activity sets
291            */
292            public static int getSocialActivitySetsCount() {
293                    return getService().getSocialActivitySetsCount();
294            }
295    
296            public static com.liferay.portlet.social.model.SocialActivitySet getUserActivitySet(
297                    long groupId, long userId, long classNameId, int type) {
298                    return getService()
299                                       .getUserActivitySet(groupId, userId, classNameId, type);
300            }
301    
302            public static com.liferay.portlet.social.model.SocialActivitySet getUserActivitySet(
303                    long groupId, long userId, int type) {
304                    return getService().getUserActivitySet(groupId, userId, type);
305            }
306    
307            public static java.util.List<com.liferay.portlet.social.model.SocialActivitySet> getUserActivitySets(
308                    long userId, int start, int end) {
309                    return getService().getUserActivitySets(userId, start, end);
310            }
311    
312            public static int getUserActivitySetsCount(long userId) {
313                    return getService().getUserActivitySetsCount(userId);
314            }
315    
316            public static java.util.List<com.liferay.portlet.social.model.SocialActivitySet> getUserGroupsActivitySets(
317                    long userId, int start, int end) {
318                    return getService().getUserGroupsActivitySets(userId, start, end);
319            }
320    
321            public static int getUserGroupsActivitySetsCount(long userId) {
322                    return getService().getUserGroupsActivitySetsCount(userId);
323            }
324    
325            public static java.util.List<com.liferay.portlet.social.model.SocialActivitySet> getUserViewableActivitySets(
326                    long userId, int start, int end) {
327                    return getService().getUserViewableActivitySets(userId, start, end);
328            }
329    
330            public static int getUserViewableActivitySetsCount(long userId) {
331                    return getService().getUserViewableActivitySetsCount(userId);
332            }
333    
334            public static void incrementActivityCount(long activitySetId,
335                    long activityId)
336                    throws com.liferay.portal.kernel.exception.PortalException {
337                    getService().incrementActivityCount(activitySetId, activityId);
338            }
339    
340            /**
341            * Updates the social activity set in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
342            *
343            * @param socialActivitySet the social activity set
344            * @return the social activity set that was updated
345            */
346            public static com.liferay.portlet.social.model.SocialActivitySet updateSocialActivitySet(
347                    com.liferay.portlet.social.model.SocialActivitySet socialActivitySet) {
348                    return getService().updateSocialActivitySet(socialActivitySet);
349            }
350    
351            public static SocialActivitySetLocalService getService() {
352                    if (_service == null) {
353                            _service = (SocialActivitySetLocalService)PortalBeanLocatorUtil.locate(SocialActivitySetLocalService.class.getName());
354    
355                            ReferenceRegistry.registerReference(SocialActivitySetLocalServiceUtil.class,
356                                    "_service");
357                    }
358    
359                    return _service;
360            }
361    
362            private static SocialActivitySetLocalService _service;
363    }