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