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