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