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 public static java.util.Date getLastPostDateByUserId(long groupId, 210 long userId) { 211 return getService().getLastPostDateByUserId(groupId, userId); 212 } 213 214 /** 215 * Returns the message boards stats user with the primary key. 216 * 217 * @param statsUserId the primary key of the message boards stats user 218 * @return the message boards stats user 219 * @throws PortalException if a message boards stats user with the primary key could not be found 220 */ 221 public static com.liferay.portlet.messageboards.model.MBStatsUser getMBStatsUser( 222 long statsUserId) 223 throws com.liferay.portal.kernel.exception.PortalException { 224 return getService().getMBStatsUser(statsUserId); 225 } 226 227 /** 228 * Returns a range of all the message boards stats users. 229 * 230 * <p> 231 * 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. 232 * </p> 233 * 234 * @param start the lower bound of the range of message boards stats users 235 * @param end the upper bound of the range of message boards stats users (not inclusive) 236 * @return the range of message boards stats users 237 */ 238 public static java.util.List<com.liferay.portlet.messageboards.model.MBStatsUser> getMBStatsUsers( 239 int start, int end) { 240 return getService().getMBStatsUsers(start, end); 241 } 242 243 /** 244 * Returns the number of message boards stats users. 245 * 246 * @return the number of message boards stats users 247 */ 248 public static int getMBStatsUsersCount() { 249 return getService().getMBStatsUsersCount(); 250 } 251 252 public static long getMessageCountByGroupId(long groupId) { 253 return getService().getMessageCountByGroupId(groupId); 254 } 255 256 public static long getMessageCountByUserId(long userId) { 257 return getService().getMessageCountByUserId(userId); 258 } 259 260 /** 261 * Returns the OSGi service identifier. 262 * 263 * @return the OSGi service identifier 264 */ 265 public static java.lang.String getOSGiServiceIdentifier() { 266 return getService().getOSGiServiceIdentifier(); 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 * Updates the message boards stats user in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 298 * 299 * @param mbStatsUser the message boards stats user 300 * @return the message boards stats user that was updated 301 */ 302 public static com.liferay.portlet.messageboards.model.MBStatsUser updateMBStatsUser( 303 com.liferay.portlet.messageboards.model.MBStatsUser mbStatsUser) { 304 return getService().updateMBStatsUser(mbStatsUser); 305 } 306 307 public static com.liferay.portlet.messageboards.model.MBStatsUser updateStatsUser( 308 long groupId, long userId) { 309 return getService().updateStatsUser(groupId, userId); 310 } 311 312 public static com.liferay.portlet.messageboards.model.MBStatsUser updateStatsUser( 313 long groupId, long userId, java.util.Date lastPostDate) { 314 return getService().updateStatsUser(groupId, userId, lastPostDate); 315 } 316 317 public static com.liferay.portlet.messageboards.model.MBStatsUser updateStatsUser( 318 long groupId, long userId, int messageCount, java.util.Date lastPostDate) { 319 return getService() 320 .updateStatsUser(groupId, userId, messageCount, lastPostDate); 321 } 322 323 public static MBStatsUserLocalService getService() { 324 if (_service == null) { 325 _service = (MBStatsUserLocalService)PortalBeanLocatorUtil.locate(MBStatsUserLocalService.class.getName()); 326 327 ReferenceRegistry.registerReference(MBStatsUserLocalServiceUtil.class, 328 "_service"); 329 } 330 331 return _service; 332 } 333 334 /** 335 * @deprecated As of 6.2.0 336 */ 337 @Deprecated 338 public void setService(MBStatsUserLocalService service) { 339 } 340 341 private static MBStatsUserLocalService _service; 342 }