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.social.kernel.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 SocialActivityLimit. This utility wraps 024 * {@link com.liferay.portlet.social.service.impl.SocialActivityLimitLocalServiceImpl} 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 SocialActivityLimitLocalService 032 * @see com.liferay.portlet.social.service.base.SocialActivityLimitLocalServiceBaseImpl 033 * @see com.liferay.portlet.social.service.impl.SocialActivityLimitLocalServiceImpl 034 * @generated 035 */ 036 @ProviderType 037 public class SocialActivityLimitLocalServiceUtil { 038 /* 039 * NOTE FOR DEVELOPERS: 040 * 041 * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.social.service.impl.SocialActivityLimitLocalServiceImpl} and rerun ServiceBuilder to regenerate this class. 042 */ 043 public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() { 044 return getService().getActionableDynamicQuery(); 045 } 046 047 public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { 048 return getService().dynamicQuery(); 049 } 050 051 public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() { 052 return getService().getIndexableActionableDynamicQuery(); 053 } 054 055 /** 056 * @throws PortalException 057 */ 058 public static com.liferay.portal.kernel.model.PersistedModel deletePersistedModel( 059 com.liferay.portal.kernel.model.PersistedModel persistedModel) 060 throws com.liferay.portal.kernel.exception.PortalException { 061 return getService().deletePersistedModel(persistedModel); 062 } 063 064 public static com.liferay.portal.kernel.model.PersistedModel getPersistedModel( 065 java.io.Serializable primaryKeyObj) 066 throws com.liferay.portal.kernel.exception.PortalException { 067 return getService().getPersistedModel(primaryKeyObj); 068 } 069 070 public static com.liferay.social.kernel.model.SocialActivityLimit addActivityLimit( 071 long userId, long groupId, long classNameId, long classPK, 072 int activityType, java.lang.String activityCounterName, int limitPeriod) 073 throws com.liferay.portal.kernel.exception.PortalException { 074 return getService() 075 .addActivityLimit(userId, groupId, classNameId, classPK, 076 activityType, activityCounterName, limitPeriod); 077 } 078 079 /** 080 * Adds the social activity limit to the database. Also notifies the appropriate model listeners. 081 * 082 * @param socialActivityLimit the social activity limit 083 * @return the social activity limit that was added 084 */ 085 public static com.liferay.social.kernel.model.SocialActivityLimit addSocialActivityLimit( 086 com.liferay.social.kernel.model.SocialActivityLimit socialActivityLimit) { 087 return getService().addSocialActivityLimit(socialActivityLimit); 088 } 089 090 /** 091 * Creates a new social activity limit with the primary key. Does not add the social activity limit to the database. 092 * 093 * @param activityLimitId the primary key for the new social activity limit 094 * @return the new social activity limit 095 */ 096 public static com.liferay.social.kernel.model.SocialActivityLimit createSocialActivityLimit( 097 long activityLimitId) { 098 return getService().createSocialActivityLimit(activityLimitId); 099 } 100 101 /** 102 * Deletes the social activity limit from the database. Also notifies the appropriate model listeners. 103 * 104 * @param socialActivityLimit the social activity limit 105 * @return the social activity limit that was removed 106 */ 107 public static com.liferay.social.kernel.model.SocialActivityLimit deleteSocialActivityLimit( 108 com.liferay.social.kernel.model.SocialActivityLimit socialActivityLimit) { 109 return getService().deleteSocialActivityLimit(socialActivityLimit); 110 } 111 112 /** 113 * Deletes the social activity limit with the primary key from the database. Also notifies the appropriate model listeners. 114 * 115 * @param activityLimitId the primary key of the social activity limit 116 * @return the social activity limit that was removed 117 * @throws PortalException if a social activity limit with the primary key could not be found 118 */ 119 public static com.liferay.social.kernel.model.SocialActivityLimit deleteSocialActivityLimit( 120 long activityLimitId) 121 throws com.liferay.portal.kernel.exception.PortalException { 122 return getService().deleteSocialActivityLimit(activityLimitId); 123 } 124 125 public static com.liferay.social.kernel.model.SocialActivityLimit fetchActivityLimit( 126 long groupId, long userId, long classNameId, long classPK, 127 int activityType, java.lang.String activityCounterName) { 128 return getService() 129 .fetchActivityLimit(groupId, userId, classNameId, classPK, 130 activityType, activityCounterName); 131 } 132 133 public static com.liferay.social.kernel.model.SocialActivityLimit fetchSocialActivityLimit( 134 long activityLimitId) { 135 return getService().fetchSocialActivityLimit(activityLimitId); 136 } 137 138 /** 139 * Returns the social activity limit with the primary key. 140 * 141 * @param activityLimitId the primary key of the social activity limit 142 * @return the social activity limit 143 * @throws PortalException if a social activity limit with the primary key could not be found 144 */ 145 public static com.liferay.social.kernel.model.SocialActivityLimit getSocialActivityLimit( 146 long activityLimitId) 147 throws com.liferay.portal.kernel.exception.PortalException { 148 return getService().getSocialActivityLimit(activityLimitId); 149 } 150 151 /** 152 * Updates the social activity limit in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 153 * 154 * @param socialActivityLimit the social activity limit 155 * @return the social activity limit that was updated 156 */ 157 public static com.liferay.social.kernel.model.SocialActivityLimit updateSocialActivityLimit( 158 com.liferay.social.kernel.model.SocialActivityLimit socialActivityLimit) { 159 return getService().updateSocialActivityLimit(socialActivityLimit); 160 } 161 162 /** 163 * Returns the number of social activity limits. 164 * 165 * @return the number of social activity limits 166 */ 167 public static int getSocialActivityLimitsCount() { 168 return getService().getSocialActivityLimitsCount(); 169 } 170 171 /** 172 * Returns the OSGi service identifier. 173 * 174 * @return the OSGi service identifier 175 */ 176 public static java.lang.String getOSGiServiceIdentifier() { 177 return getService().getOSGiServiceIdentifier(); 178 } 179 180 /** 181 * Performs a dynamic query on the database and returns the matching rows. 182 * 183 * @param dynamicQuery the dynamic query 184 * @return the matching rows 185 */ 186 public static <T> java.util.List<T> dynamicQuery( 187 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { 188 return getService().dynamicQuery(dynamicQuery); 189 } 190 191 /** 192 * Performs a dynamic query on the database and returns a range of the matching rows. 193 * 194 * <p> 195 * 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.SocialActivityLimitModelImpl}. 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. 196 * </p> 197 * 198 * @param dynamicQuery the dynamic query 199 * @param start the lower bound of the range of model instances 200 * @param end the upper bound of the range of model instances (not inclusive) 201 * @return the range of matching rows 202 */ 203 public static <T> java.util.List<T> dynamicQuery( 204 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 205 int end) { 206 return getService().dynamicQuery(dynamicQuery, start, end); 207 } 208 209 /** 210 * Performs a dynamic query on the database and returns an ordered range of the matching rows. 211 * 212 * <p> 213 * 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.SocialActivityLimitModelImpl}. 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. 214 * </p> 215 * 216 * @param dynamicQuery the dynamic query 217 * @param start the lower bound of the range of model instances 218 * @param end the upper bound of the range of model instances (not inclusive) 219 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 220 * @return the ordered range of matching rows 221 */ 222 public static <T> java.util.List<T> dynamicQuery( 223 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 224 int end, 225 com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) { 226 return getService() 227 .dynamicQuery(dynamicQuery, start, end, orderByComparator); 228 } 229 230 /** 231 * Returns a range of all the social activity limits. 232 * 233 * <p> 234 * 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.SocialActivityLimitModelImpl}. 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. 235 * </p> 236 * 237 * @param start the lower bound of the range of social activity limits 238 * @param end the upper bound of the range of social activity limits (not inclusive) 239 * @return the range of social activity limits 240 */ 241 public static java.util.List<com.liferay.social.kernel.model.SocialActivityLimit> getSocialActivityLimits( 242 int start, int end) { 243 return getService().getSocialActivityLimits(start, end); 244 } 245 246 /** 247 * Returns the number of rows matching the dynamic query. 248 * 249 * @param dynamicQuery the dynamic query 250 * @return the number of rows matching the dynamic query 251 */ 252 public static long dynamicQueryCount( 253 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { 254 return getService().dynamicQueryCount(dynamicQuery); 255 } 256 257 /** 258 * Returns the number of rows matching the dynamic query. 259 * 260 * @param dynamicQuery the dynamic query 261 * @param projection the projection to apply to the query 262 * @return the number of rows matching the dynamic query 263 */ 264 public static long dynamicQueryCount( 265 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, 266 com.liferay.portal.kernel.dao.orm.Projection projection) { 267 return getService().dynamicQueryCount(dynamicQuery, projection); 268 } 269 270 public static SocialActivityLimitLocalService getService() { 271 if (_service == null) { 272 _service = (SocialActivityLimitLocalService)PortalBeanLocatorUtil.locate(SocialActivityLimitLocalService.class.getName()); 273 274 ReferenceRegistry.registerReference(SocialActivityLimitLocalServiceUtil.class, 275 "_service"); 276 } 277 278 return _service; 279 } 280 281 private static SocialActivityLimitLocalService _service; 282 }