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