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.messageboards.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 MBStatsUser. This utility wraps 024 * {@link com.liferay.portlet.messageboards.service.impl.MBStatsUserLocalServiceImpl} 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 MBStatsUserLocalService 032 * @see com.liferay.portlet.messageboards.service.base.MBStatsUserLocalServiceBaseImpl 033 * @see com.liferay.portlet.messageboards.service.impl.MBStatsUserLocalServiceImpl 034 * @generated 035 */ 036 @ProviderType 037 public class MBStatsUserLocalServiceUtil { 038 /* 039 * NOTE FOR DEVELOPERS: 040 * 041 * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.messageboards.service.impl.MBStatsUserLocalServiceImpl} and rerun ServiceBuilder to regenerate this class. 042 */ 043 044 /** 045 * Adds the message boards stats user to the database. Also notifies the appropriate model listeners. 046 * 047 * @param mbStatsUser the message boards stats user 048 * @return the message boards stats user that was added 049 */ 050 public static com.liferay.portlet.messageboards.model.MBStatsUser addMBStatsUser( 051 com.liferay.portlet.messageboards.model.MBStatsUser mbStatsUser) { 052 return getService().addMBStatsUser(mbStatsUser); 053 } 054 055 public static com.liferay.portlet.messageboards.model.MBStatsUser addStatsUser( 056 long groupId, long userId) { 057 return getService().addStatsUser(groupId, userId); 058 } 059 060 /** 061 * Creates a new message boards stats user with the primary key. Does not add the message boards stats user to the database. 062 * 063 * @param statsUserId the primary key for the new message boards stats user 064 * @return the new message boards stats user 065 */ 066 public static com.liferay.portlet.messageboards.model.MBStatsUser createMBStatsUser( 067 long statsUserId) { 068 return getService().createMBStatsUser(statsUserId); 069 } 070 071 /** 072 * Deletes the message boards stats user from the database. Also notifies the appropriate model listeners. 073 * 074 * @param mbStatsUser the message boards stats user 075 * @return the message boards stats user that was removed 076 */ 077 public static com.liferay.portlet.messageboards.model.MBStatsUser deleteMBStatsUser( 078 com.liferay.portlet.messageboards.model.MBStatsUser mbStatsUser) { 079 return getService().deleteMBStatsUser(mbStatsUser); 080 } 081 082 /** 083 * Deletes the message boards stats user with the primary key from the database. Also notifies the appropriate model listeners. 084 * 085 * @param statsUserId the primary key of the message boards stats user 086 * @return the message boards stats user that was removed 087 * @throws PortalException if a message boards stats user with the primary key could not be found 088 */ 089 public static com.liferay.portlet.messageboards.model.MBStatsUser deleteMBStatsUser( 090 long statsUserId) 091 throws com.liferay.portal.kernel.exception.PortalException { 092 return getService().deleteMBStatsUser(statsUserId); 093 } 094 095 /** 096 * @throws PortalException 097 */ 098 public static com.liferay.portal.model.PersistedModel deletePersistedModel( 099 com.liferay.portal.model.PersistedModel persistedModel) 100 throws com.liferay.portal.kernel.exception.PortalException { 101 return getService().deletePersistedModel(persistedModel); 102 } 103 104 public static void deleteStatsUser( 105 com.liferay.portlet.messageboards.model.MBStatsUser statsUser) { 106 getService().deleteStatsUser(statsUser); 107 } 108 109 public static void deleteStatsUser(long statsUserId) 110 throws com.liferay.portal.kernel.exception.PortalException { 111 getService().deleteStatsUser(statsUserId); 112 } 113 114 public static void deleteStatsUsersByGroupId(long groupId) { 115 getService().deleteStatsUsersByGroupId(groupId); 116 } 117 118 public static void deleteStatsUsersByUserId(long userId) { 119 getService().deleteStatsUsersByUserId(userId); 120 } 121 122 public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { 123 return getService().dynamicQuery(); 124 } 125 126 /** 127 * Performs a dynamic query on the database and returns the matching rows. 128 * 129 * @param dynamicQuery the dynamic query 130 * @return the matching rows 131 */ 132 public static <T> java.util.List<T> dynamicQuery( 133 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { 134 return getService().dynamicQuery(dynamicQuery); 135 } 136 137 /** 138 * Performs a dynamic query on the database and returns a range of the matching rows. 139 * 140 * <p> 141 * 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.messageboards.model.impl.MBStatsUserModelImpl}. 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. 142 * </p> 143 * 144 * @param dynamicQuery the dynamic query 145 * @param start the lower bound of the range of model instances 146 * @param end the upper bound of the range of model instances (not inclusive) 147 * @return the range of matching rows 148 */ 149 public static <T> java.util.List<T> dynamicQuery( 150 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 151 int end) { 152 return getService().dynamicQuery(dynamicQuery, start, end); 153 } 154 155 /** 156 * Performs a dynamic query on the database and returns an ordered range of the matching rows. 157 * 158 * <p> 159 * 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.messageboards.model.impl.MBStatsUserModelImpl}. 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. 160 * </p> 161 * 162 * @param dynamicQuery the dynamic query 163 * @param start the lower bound of the range of model instances 164 * @param end the upper bound of the range of model instances (not inclusive) 165 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 166 * @return the ordered range of matching rows 167 */ 168 public static <T> java.util.List<T> dynamicQuery( 169 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 170 int end, 171 com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) { 172 return getService() 173 .dynamicQuery(dynamicQuery, start, end, orderByComparator); 174 } 175 176 /** 177 * Returns the number of rows matching the dynamic query. 178 * 179 * @param dynamicQuery the dynamic query 180 * @return the number of rows matching the dynamic query 181 */ 182 public static long dynamicQueryCount( 183 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { 184 return getService().dynamicQueryCount(dynamicQuery); 185 } 186 187 /** 188 * Returns the number of rows matching the dynamic query. 189 * 190 * @param dynamicQuery the dynamic query 191 * @param projection the projection to apply to the query 192 * @return the number of rows matching the dynamic query 193 */ 194 public static long dynamicQueryCount( 195 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, 196 com.liferay.portal.kernel.dao.orm.Projection projection) { 197 return getService().dynamicQueryCount(dynamicQuery, projection); 198 } 199 200 public static com.liferay.portlet.messageboards.model.MBStatsUser fetchMBStatsUser( 201 long statsUserId) { 202 return getService().fetchMBStatsUser(statsUserId); 203 } 204 205 public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() { 206 return getService().getActionableDynamicQuery(); 207 } 208 209 /** 210 * Returns the Spring bean ID for this bean. 211 * 212 * @return the Spring bean ID for this bean 213 */ 214 public static java.lang.String getBeanIdentifier() { 215 return getService().getBeanIdentifier(); 216 } 217 218 public static java.util.Date getLastPostDateByUserId(long groupId, 219 long userId) { 220 return getService().getLastPostDateByUserId(groupId, userId); 221 } 222 223 /** 224 * Returns the message boards stats user with the primary key. 225 * 226 * @param statsUserId the primary key of the message boards stats user 227 * @return the message boards stats user 228 * @throws PortalException if a message boards stats user with the primary key could not be found 229 */ 230 public static com.liferay.portlet.messageboards.model.MBStatsUser getMBStatsUser( 231 long statsUserId) 232 throws com.liferay.portal.kernel.exception.PortalException { 233 return getService().getMBStatsUser(statsUserId); 234 } 235 236 /** 237 * Returns a range of all the message boards stats users. 238 * 239 * <p> 240 * 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.messageboards.model.impl.MBStatsUserModelImpl}. 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. 241 * </p> 242 * 243 * @param start the lower bound of the range of message boards stats users 244 * @param end the upper bound of the range of message boards stats users (not inclusive) 245 * @return the range of message boards stats users 246 */ 247 public static java.util.List<com.liferay.portlet.messageboards.model.MBStatsUser> getMBStatsUsers( 248 int start, int end) { 249 return getService().getMBStatsUsers(start, end); 250 } 251 252 /** 253 * Returns the number of message boards stats users. 254 * 255 * @return the number of message boards stats users 256 */ 257 public static int getMBStatsUsersCount() { 258 return getService().getMBStatsUsersCount(); 259 } 260 261 public static long getMessageCountByGroupId(long groupId) { 262 return getService().getMessageCountByGroupId(groupId); 263 } 264 265 public static long getMessageCountByUserId(long userId) { 266 return getService().getMessageCountByUserId(userId); 267 } 268 269 public static com.liferay.portal.model.PersistedModel getPersistedModel( 270 java.io.Serializable primaryKeyObj) 271 throws com.liferay.portal.kernel.exception.PortalException { 272 return getService().getPersistedModel(primaryKeyObj); 273 } 274 275 public static com.liferay.portlet.messageboards.model.MBStatsUser getStatsUser( 276 long groupId, long userId) { 277 return getService().getStatsUser(groupId, userId); 278 } 279 280 public static java.util.List<com.liferay.portlet.messageboards.model.MBStatsUser> getStatsUsersByGroupId( 281 long groupId, int start, int end) 282 throws com.liferay.portal.kernel.exception.PortalException { 283 return getService().getStatsUsersByGroupId(groupId, start, end); 284 } 285 286 public static int getStatsUsersByGroupIdCount(long groupId) 287 throws com.liferay.portal.kernel.exception.PortalException { 288 return getService().getStatsUsersByGroupIdCount(groupId); 289 } 290 291 public static java.util.List<com.liferay.portlet.messageboards.model.MBStatsUser> getStatsUsersByUserId( 292 long userId) { 293 return getService().getStatsUsersByUserId(userId); 294 } 295 296 /** 297 * Sets the Spring bean ID for this bean. 298 * 299 * @param beanIdentifier the Spring bean ID for this bean 300 */ 301 public static void setBeanIdentifier(java.lang.String beanIdentifier) { 302 getService().setBeanIdentifier(beanIdentifier); 303 } 304 305 /** 306 * Updates the message boards stats user in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 307 * 308 * @param mbStatsUser the message boards stats user 309 * @return the message boards stats user that was updated 310 */ 311 public static com.liferay.portlet.messageboards.model.MBStatsUser updateMBStatsUser( 312 com.liferay.portlet.messageboards.model.MBStatsUser mbStatsUser) { 313 return getService().updateMBStatsUser(mbStatsUser); 314 } 315 316 public static com.liferay.portlet.messageboards.model.MBStatsUser updateStatsUser( 317 long groupId, long userId) { 318 return getService().updateStatsUser(groupId, userId); 319 } 320 321 public static com.liferay.portlet.messageboards.model.MBStatsUser updateStatsUser( 322 long groupId, long userId, java.util.Date lastPostDate) { 323 return getService().updateStatsUser(groupId, userId, lastPostDate); 324 } 325 326 public static com.liferay.portlet.messageboards.model.MBStatsUser updateStatsUser( 327 long groupId, long userId, int messageCount, java.util.Date lastPostDate) { 328 return getService() 329 .updateStatsUser(groupId, userId, messageCount, lastPostDate); 330 } 331 332 public static MBStatsUserLocalService getService() { 333 if (_service == null) { 334 _service = (MBStatsUserLocalService)PortalBeanLocatorUtil.locate(MBStatsUserLocalService.class.getName()); 335 336 ReferenceRegistry.registerReference(MBStatsUserLocalServiceUtil.class, 337 "_service"); 338 } 339 340 return _service; 341 } 342 343 /** 344 * @deprecated As of 6.2.0 345 */ 346 @Deprecated 347 public void setService(MBStatsUserLocalService service) { 348 } 349 350 private static MBStatsUserLocalService _service; 351 }