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