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 SocialActivitySetting. This utility wraps 024 * {@link com.liferay.portlet.social.service.impl.SocialActivitySettingLocalServiceImpl} 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 SocialActivitySettingLocalService 032 * @see com.liferay.portlet.social.service.base.SocialActivitySettingLocalServiceBaseImpl 033 * @see com.liferay.portlet.social.service.impl.SocialActivitySettingLocalServiceImpl 034 * @generated 035 */ 036 @ProviderType 037 public class SocialActivitySettingLocalServiceUtil { 038 /* 039 * NOTE FOR DEVELOPERS: 040 * 041 * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.social.service.impl.SocialActivitySettingLocalServiceImpl} and rerun ServiceBuilder to regenerate this class. 042 */ 043 044 /** 045 * Adds the social activity setting to the database. Also notifies the appropriate model listeners. 046 * 047 * @param socialActivitySetting the social activity setting 048 * @return the social activity setting that was added 049 */ 050 public static com.liferay.portlet.social.model.SocialActivitySetting addSocialActivitySetting( 051 com.liferay.portlet.social.model.SocialActivitySetting socialActivitySetting) { 052 return getService().addSocialActivitySetting(socialActivitySetting); 053 } 054 055 /** 056 * Creates a new social activity setting with the primary key. Does not add the social activity setting to the database. 057 * 058 * @param activitySettingId the primary key for the new social activity setting 059 * @return the new social activity setting 060 */ 061 public static com.liferay.portlet.social.model.SocialActivitySetting createSocialActivitySetting( 062 long activitySettingId) { 063 return getService().createSocialActivitySetting(activitySettingId); 064 } 065 066 public static void deleteActivitySetting(long groupId, 067 java.lang.String className, long classPK) { 068 getService().deleteActivitySetting(groupId, className, classPK); 069 } 070 071 public static void deleteActivitySettings(long groupId) { 072 getService().deleteActivitySettings(groupId); 073 } 074 075 /** 076 * @throws PortalException 077 */ 078 public static com.liferay.portal.model.PersistedModel deletePersistedModel( 079 com.liferay.portal.model.PersistedModel persistedModel) 080 throws com.liferay.portal.kernel.exception.PortalException { 081 return getService().deletePersistedModel(persistedModel); 082 } 083 084 /** 085 * Deletes the social activity setting with the primary key from the database. Also notifies the appropriate model listeners. 086 * 087 * @param activitySettingId the primary key of the social activity setting 088 * @return the social activity setting that was removed 089 * @throws PortalException if a social activity setting with the primary key could not be found 090 */ 091 public static com.liferay.portlet.social.model.SocialActivitySetting deleteSocialActivitySetting( 092 long activitySettingId) 093 throws com.liferay.portal.kernel.exception.PortalException { 094 return getService().deleteSocialActivitySetting(activitySettingId); 095 } 096 097 /** 098 * Deletes the social activity setting from the database. Also notifies the appropriate model listeners. 099 * 100 * @param socialActivitySetting the social activity setting 101 * @return the social activity setting that was removed 102 */ 103 public static com.liferay.portlet.social.model.SocialActivitySetting deleteSocialActivitySetting( 104 com.liferay.portlet.social.model.SocialActivitySetting socialActivitySetting) { 105 return getService().deleteSocialActivitySetting(socialActivitySetting); 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.SocialActivitySettingModelImpl}. 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.SocialActivitySettingModelImpl}. 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.SocialActivitySetting fetchSocialActivitySetting( 187 long activitySettingId) { 188 return getService().fetchSocialActivitySetting(activitySettingId); 189 } 190 191 public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() { 192 return getService().getActionableDynamicQuery(); 193 } 194 195 public static com.liferay.portlet.social.model.SocialActivityDefinition getActivityDefinition( 196 long groupId, java.lang.String className, int activityType) { 197 return getService() 198 .getActivityDefinition(groupId, className, activityType); 199 } 200 201 public static java.util.List<com.liferay.portlet.social.model.SocialActivityDefinition> getActivityDefinitions( 202 long groupId, java.lang.String className) { 203 return getService().getActivityDefinitions(groupId, className); 204 } 205 206 public static java.util.List<com.liferay.portlet.social.model.SocialActivitySetting> getActivitySettings( 207 long groupId) { 208 return getService().getActivitySettings(groupId); 209 } 210 211 /** 212 * Returns the OSGi service identifier. 213 * 214 * @return the OSGi service identifier 215 */ 216 public static java.lang.String getOSGiServiceIdentifier() { 217 return getService().getOSGiServiceIdentifier(); 218 } 219 220 public static com.liferay.portal.model.PersistedModel getPersistedModel( 221 java.io.Serializable primaryKeyObj) 222 throws com.liferay.portal.kernel.exception.PortalException { 223 return getService().getPersistedModel(primaryKeyObj); 224 } 225 226 /** 227 * Returns the social activity setting with the primary key. 228 * 229 * @param activitySettingId the primary key of the social activity setting 230 * @return the social activity setting 231 * @throws PortalException if a social activity setting with the primary key could not be found 232 */ 233 public static com.liferay.portlet.social.model.SocialActivitySetting getSocialActivitySetting( 234 long activitySettingId) 235 throws com.liferay.portal.kernel.exception.PortalException { 236 return getService().getSocialActivitySetting(activitySettingId); 237 } 238 239 /** 240 * Returns a range of all the social activity settings. 241 * 242 * <p> 243 * 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.SocialActivitySettingModelImpl}. 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. 244 * </p> 245 * 246 * @param start the lower bound of the range of social activity settings 247 * @param end the upper bound of the range of social activity settings (not inclusive) 248 * @return the range of social activity settings 249 */ 250 public static java.util.List<com.liferay.portlet.social.model.SocialActivitySetting> getSocialActivitySettings( 251 int start, int end) { 252 return getService().getSocialActivitySettings(start, end); 253 } 254 255 /** 256 * Returns the number of social activity settings. 257 * 258 * @return the number of social activity settings 259 */ 260 public static int getSocialActivitySettingsCount() { 261 return getService().getSocialActivitySettingsCount(); 262 } 263 264 public static boolean isEnabled(long groupId, long classNameId) { 265 return getService().isEnabled(groupId, classNameId); 266 } 267 268 public static boolean isEnabled(long groupId, long classNameId, long classPK) { 269 return getService().isEnabled(groupId, classNameId, classPK); 270 } 271 272 public static void updateActivitySetting(long groupId, 273 java.lang.String className, int activityType, 274 com.liferay.portlet.social.model.SocialActivityCounterDefinition activityCounterDefinition) 275 throws com.liferay.portal.kernel.exception.PortalException { 276 getService() 277 .updateActivitySetting(groupId, className, activityType, 278 activityCounterDefinition); 279 } 280 281 public static void updateActivitySetting(long groupId, 282 java.lang.String className, long classPK, boolean enabled) 283 throws com.liferay.portal.kernel.exception.PortalException { 284 getService().updateActivitySetting(groupId, className, classPK, enabled); 285 } 286 287 public static void updateActivitySetting(long groupId, 288 java.lang.String className, boolean enabled) 289 throws com.liferay.portal.kernel.exception.PortalException { 290 getService().updateActivitySetting(groupId, className, enabled); 291 } 292 293 public static void updateActivitySettings(long groupId, 294 java.lang.String className, int activityType, 295 java.util.List<com.liferay.portlet.social.model.SocialActivityCounterDefinition> activityCounterDefinitions) 296 throws com.liferay.portal.kernel.exception.PortalException { 297 getService() 298 .updateActivitySettings(groupId, className, activityType, 299 activityCounterDefinitions); 300 } 301 302 /** 303 * Updates the social activity setting in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 304 * 305 * @param socialActivitySetting the social activity setting 306 * @return the social activity setting that was updated 307 */ 308 public static com.liferay.portlet.social.model.SocialActivitySetting updateSocialActivitySetting( 309 com.liferay.portlet.social.model.SocialActivitySetting socialActivitySetting) { 310 return getService().updateSocialActivitySetting(socialActivitySetting); 311 } 312 313 public static SocialActivitySettingLocalService getService() { 314 if (_service == null) { 315 _service = (SocialActivitySettingLocalService)PortalBeanLocatorUtil.locate(SocialActivitySettingLocalService.class.getName()); 316 317 ReferenceRegistry.registerReference(SocialActivitySettingLocalServiceUtil.class, 318 "_service"); 319 } 320 321 return _service; 322 } 323 324 /** 325 * @deprecated As of 6.2.0 326 */ 327 @Deprecated 328 public void setService(SocialActivitySettingLocalService service) { 329 } 330 331 private static SocialActivitySettingLocalService _service; 332 }