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