001    /**
002     * Copyright (c) 2000-2011 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 com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    import com.liferay.portal.kernel.util.MethodCache;
019    import com.liferay.portal.kernel.util.ReferenceRegistry;
020    
021    /**
022     * The utility for the social activity achievement local service. This utility wraps {@link com.liferay.portlet.social.service.impl.SocialActivityAchievementLocalServiceImpl} and is the primary access point for service operations in application layer code running on the local server.
023     *
024     * <p>
025     * This is a local service. Methods of this service will not have security checks based on the propagated JAAS credentials because this service can only be accessed from within the same VM.
026     * </p>
027     *
028     * @author Brian Wing Shun Chan
029     * @see SocialActivityAchievementLocalService
030     * @see com.liferay.portlet.social.service.base.SocialActivityAchievementLocalServiceBaseImpl
031     * @see com.liferay.portlet.social.service.impl.SocialActivityAchievementLocalServiceImpl
032     * @generated
033     */
034    public class SocialActivityAchievementLocalServiceUtil {
035            /*
036             * NOTE FOR DEVELOPERS:
037             *
038             * 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.
039             */
040    
041            /**
042            * Adds the social activity achievement to the database. Also notifies the appropriate model listeners.
043            *
044            * @param socialActivityAchievement the social activity achievement
045            * @return the social activity achievement that was added
046            * @throws SystemException if a system exception occurred
047            */
048            public static com.liferay.portlet.social.model.SocialActivityAchievement addSocialActivityAchievement(
049                    com.liferay.portlet.social.model.SocialActivityAchievement socialActivityAchievement)
050                    throws com.liferay.portal.kernel.exception.SystemException {
051                    return getService()
052                                       .addSocialActivityAchievement(socialActivityAchievement);
053            }
054    
055            /**
056            * Creates a new social activity achievement with the primary key. Does not add the social activity achievement to the database.
057            *
058            * @param activityAchievementId the primary key for the new social activity achievement
059            * @return the new social activity achievement
060            */
061            public static com.liferay.portlet.social.model.SocialActivityAchievement createSocialActivityAchievement(
062                    long activityAchievementId) {
063                    return getService()
064                                       .createSocialActivityAchievement(activityAchievementId);
065            }
066    
067            /**
068            * Deletes the social activity achievement with the primary key from the database. Also notifies the appropriate model listeners.
069            *
070            * @param activityAchievementId the primary key of the social activity achievement
071            * @throws PortalException if a social activity achievement with the primary key could not be found
072            * @throws SystemException if a system exception occurred
073            */
074            public static void deleteSocialActivityAchievement(
075                    long activityAchievementId)
076                    throws com.liferay.portal.kernel.exception.PortalException,
077                            com.liferay.portal.kernel.exception.SystemException {
078                    getService().deleteSocialActivityAchievement(activityAchievementId);
079            }
080    
081            /**
082            * Deletes the social activity achievement from the database. Also notifies the appropriate model listeners.
083            *
084            * @param socialActivityAchievement the social activity achievement
085            * @throws SystemException if a system exception occurred
086            */
087            public static void deleteSocialActivityAchievement(
088                    com.liferay.portlet.social.model.SocialActivityAchievement socialActivityAchievement)
089                    throws com.liferay.portal.kernel.exception.SystemException {
090                    getService().deleteSocialActivityAchievement(socialActivityAchievement);
091            }
092    
093            /**
094            * Performs a dynamic query on the database and returns the matching rows.
095            *
096            * @param dynamicQuery the dynamic query
097            * @return the matching rows
098            * @throws SystemException if a system exception occurred
099            */
100            @SuppressWarnings("rawtypes")
101            public static java.util.List dynamicQuery(
102                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
103                    throws com.liferay.portal.kernel.exception.SystemException {
104                    return getService().dynamicQuery(dynamicQuery);
105            }
106    
107            /**
108            * Performs a dynamic query on the database and returns a range of the matching rows.
109            *
110            * <p>
111            * 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.
112            * </p>
113            *
114            * @param dynamicQuery the dynamic query
115            * @param start the lower bound of the range of model instances
116            * @param end the upper bound of the range of model instances (not inclusive)
117            * @return the range of matching rows
118            * @throws SystemException if a system exception occurred
119            */
120            @SuppressWarnings("rawtypes")
121            public static java.util.List dynamicQuery(
122                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
123                    int end) throws com.liferay.portal.kernel.exception.SystemException {
124                    return getService().dynamicQuery(dynamicQuery, start, end);
125            }
126    
127            /**
128            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
129            *
130            * <p>
131            * 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.
132            * </p>
133            *
134            * @param dynamicQuery the dynamic query
135            * @param start the lower bound of the range of model instances
136            * @param end the upper bound of the range of model instances (not inclusive)
137            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
138            * @return the ordered range of matching rows
139            * @throws SystemException if a system exception occurred
140            */
141            @SuppressWarnings("rawtypes")
142            public static java.util.List dynamicQuery(
143                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
144                    int end,
145                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
146                    throws com.liferay.portal.kernel.exception.SystemException {
147                    return getService()
148                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
149            }
150    
151            /**
152            * Returns the number of rows that match the dynamic query.
153            *
154            * @param dynamicQuery the dynamic query
155            * @return the number of rows that match the dynamic query
156            * @throws SystemException if a system exception occurred
157            */
158            public static long dynamicQueryCount(
159                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
160                    throws com.liferay.portal.kernel.exception.SystemException {
161                    return getService().dynamicQueryCount(dynamicQuery);
162            }
163    
164            /**
165            * Returns the social activity achievement with the primary key.
166            *
167            * @param activityAchievementId the primary key of the social activity achievement
168            * @return the social activity achievement
169            * @throws PortalException if a social activity achievement with the primary key could not be found
170            * @throws SystemException if a system exception occurred
171            */
172            public static com.liferay.portlet.social.model.SocialActivityAchievement getSocialActivityAchievement(
173                    long activityAchievementId)
174                    throws com.liferay.portal.kernel.exception.PortalException,
175                            com.liferay.portal.kernel.exception.SystemException {
176                    return getService().getSocialActivityAchievement(activityAchievementId);
177            }
178    
179            public static com.liferay.portal.model.PersistedModel getPersistedModel(
180                    java.io.Serializable primaryKeyObj)
181                    throws com.liferay.portal.kernel.exception.PortalException,
182                            com.liferay.portal.kernel.exception.SystemException {
183                    return getService().getPersistedModel(primaryKeyObj);
184            }
185    
186            /**
187            * Returns a range of all the social activity achievements.
188            *
189            * <p>
190            * 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.
191            * </p>
192            *
193            * @param start the lower bound of the range of social activity achievements
194            * @param end the upper bound of the range of social activity achievements (not inclusive)
195            * @return the range of social activity achievements
196            * @throws SystemException if a system exception occurred
197            */
198            public static java.util.List<com.liferay.portlet.social.model.SocialActivityAchievement> getSocialActivityAchievements(
199                    int start, int end)
200                    throws com.liferay.portal.kernel.exception.SystemException {
201                    return getService().getSocialActivityAchievements(start, end);
202            }
203    
204            /**
205            * Returns the number of social activity achievements.
206            *
207            * @return the number of social activity achievements
208            * @throws SystemException if a system exception occurred
209            */
210            public static int getSocialActivityAchievementsCount()
211                    throws com.liferay.portal.kernel.exception.SystemException {
212                    return getService().getSocialActivityAchievementsCount();
213            }
214    
215            /**
216            * Updates the social activity achievement in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
217            *
218            * @param socialActivityAchievement the social activity achievement
219            * @return the social activity achievement that was updated
220            * @throws SystemException if a system exception occurred
221            */
222            public static com.liferay.portlet.social.model.SocialActivityAchievement updateSocialActivityAchievement(
223                    com.liferay.portlet.social.model.SocialActivityAchievement socialActivityAchievement)
224                    throws com.liferay.portal.kernel.exception.SystemException {
225                    return getService()
226                                       .updateSocialActivityAchievement(socialActivityAchievement);
227            }
228    
229            /**
230            * Updates the social activity achievement in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
231            *
232            * @param socialActivityAchievement the social activity achievement
233            * @param merge whether to merge the social activity achievement with the current session. See {@link com.liferay.portal.service.persistence.BatchSession#update(com.liferay.portal.kernel.dao.orm.Session, com.liferay.portal.model.BaseModel, boolean)} for an explanation.
234            * @return the social activity achievement that was updated
235            * @throws SystemException if a system exception occurred
236            */
237            public static com.liferay.portlet.social.model.SocialActivityAchievement updateSocialActivityAchievement(
238                    com.liferay.portlet.social.model.SocialActivityAchievement socialActivityAchievement,
239                    boolean merge)
240                    throws com.liferay.portal.kernel.exception.SystemException {
241                    return getService()
242                                       .updateSocialActivityAchievement(socialActivityAchievement,
243                            merge);
244            }
245    
246            /**
247            * Returns the Spring bean ID for this bean.
248            *
249            * @return the Spring bean ID for this bean
250            */
251            public static java.lang.String getBeanIdentifier() {
252                    return getService().getBeanIdentifier();
253            }
254    
255            /**
256            * Sets the Spring bean ID for this bean.
257            *
258            * @param beanIdentifier the Spring bean ID for this bean
259            */
260            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
261                    getService().setBeanIdentifier(beanIdentifier);
262            }
263    
264            public static SocialActivityAchievementLocalService getService() {
265                    if (_service == null) {
266                            _service = (SocialActivityAchievementLocalService)PortalBeanLocatorUtil.locate(SocialActivityAchievementLocalService.class.getName());
267    
268                            ReferenceRegistry.registerReference(SocialActivityAchievementLocalServiceUtil.class,
269                                    "_service");
270                            MethodCache.remove(SocialActivityAchievementLocalService.class);
271                    }
272    
273                    return _service;
274            }
275    
276            public void setService(SocialActivityAchievementLocalService service) {
277                    MethodCache.remove(SocialActivityAchievementLocalService.class);
278    
279                    _service = service;
280    
281                    ReferenceRegistry.registerReference(SocialActivityAchievementLocalServiceUtil.class,
282                            "_service");
283                    MethodCache.remove(SocialActivityAchievementLocalService.class);
284            }
285    
286            private static SocialActivityAchievementLocalService _service;
287    }