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.persistence; 016 017 import aQute.bnd.annotation.ProviderType; 018 019 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil; 020 import com.liferay.portal.kernel.dao.orm.DynamicQuery; 021 import com.liferay.portal.kernel.util.OrderByComparator; 022 import com.liferay.portal.kernel.util.ReferenceRegistry; 023 import com.liferay.portal.service.ServiceContext; 024 025 import com.liferay.portlet.messageboards.model.MBStatsUser; 026 027 import java.util.List; 028 029 /** 030 * The persistence utility for the message boards stats user service. This utility wraps {@link com.liferay.portlet.messageboards.service.persistence.impl.MBStatsUserPersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class. 031 * 032 * <p> 033 * Caching information and settings can be found in <code>portal.properties</code> 034 * </p> 035 * 036 * @author Brian Wing Shun Chan 037 * @see MBStatsUserPersistence 038 * @see com.liferay.portlet.messageboards.service.persistence.impl.MBStatsUserPersistenceImpl 039 * @generated 040 */ 041 @ProviderType 042 public class MBStatsUserUtil { 043 /* 044 * NOTE FOR DEVELOPERS: 045 * 046 * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class. 047 */ 048 049 /** 050 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache() 051 */ 052 public static void clearCache() { 053 getPersistence().clearCache(); 054 } 055 056 /** 057 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel) 058 */ 059 public static void clearCache(MBStatsUser mbStatsUser) { 060 getPersistence().clearCache(mbStatsUser); 061 } 062 063 /** 064 * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery) 065 */ 066 public static long countWithDynamicQuery(DynamicQuery dynamicQuery) { 067 return getPersistence().countWithDynamicQuery(dynamicQuery); 068 } 069 070 /** 071 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery) 072 */ 073 public static List<MBStatsUser> findWithDynamicQuery( 074 DynamicQuery dynamicQuery) { 075 return getPersistence().findWithDynamicQuery(dynamicQuery); 076 } 077 078 /** 079 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int) 080 */ 081 public static List<MBStatsUser> findWithDynamicQuery( 082 DynamicQuery dynamicQuery, int start, int end) { 083 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end); 084 } 085 086 /** 087 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator) 088 */ 089 public static List<MBStatsUser> findWithDynamicQuery( 090 DynamicQuery dynamicQuery, int start, int end, 091 OrderByComparator<MBStatsUser> orderByComparator) { 092 return getPersistence() 093 .findWithDynamicQuery(dynamicQuery, start, end, 094 orderByComparator); 095 } 096 097 /** 098 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel) 099 */ 100 public static MBStatsUser update(MBStatsUser mbStatsUser) { 101 return getPersistence().update(mbStatsUser); 102 } 103 104 /** 105 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext) 106 */ 107 public static MBStatsUser update(MBStatsUser mbStatsUser, 108 ServiceContext serviceContext) { 109 return getPersistence().update(mbStatsUser, serviceContext); 110 } 111 112 /** 113 * Returns all the message boards stats users where groupId = ?. 114 * 115 * @param groupId the group ID 116 * @return the matching message boards stats users 117 */ 118 public static List<MBStatsUser> findByGroupId(long groupId) { 119 return getPersistence().findByGroupId(groupId); 120 } 121 122 /** 123 * Returns a range of all the message boards stats users where groupId = ?. 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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. 127 * </p> 128 * 129 * @param groupId the group ID 130 * @param start the lower bound of the range of message boards stats users 131 * @param end the upper bound of the range of message boards stats users (not inclusive) 132 * @return the range of matching message boards stats users 133 */ 134 public static List<MBStatsUser> findByGroupId(long groupId, int start, 135 int end) { 136 return getPersistence().findByGroupId(groupId, start, end); 137 } 138 139 /** 140 * Returns an ordered range of all the message boards stats users where groupId = ?. 141 * 142 * <p> 143 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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. 144 * </p> 145 * 146 * @param groupId the group ID 147 * @param start the lower bound of the range of message boards stats users 148 * @param end the upper bound of the range of message boards stats users (not inclusive) 149 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 150 * @return the ordered range of matching message boards stats users 151 */ 152 public static List<MBStatsUser> findByGroupId(long groupId, int start, 153 int end, OrderByComparator<MBStatsUser> orderByComparator) { 154 return getPersistence() 155 .findByGroupId(groupId, start, end, orderByComparator); 156 } 157 158 /** 159 * Returns the first message boards stats user in the ordered set where groupId = ?. 160 * 161 * @param groupId the group ID 162 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 163 * @return the first matching message boards stats user 164 * @throws NoSuchStatsUserException if a matching message boards stats user could not be found 165 */ 166 public static MBStatsUser findByGroupId_First(long groupId, 167 OrderByComparator<MBStatsUser> orderByComparator) 168 throws com.liferay.portlet.messageboards.NoSuchStatsUserException { 169 return getPersistence().findByGroupId_First(groupId, orderByComparator); 170 } 171 172 /** 173 * Returns the first message boards stats user in the ordered set where groupId = ?. 174 * 175 * @param groupId the group ID 176 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 177 * @return the first matching message boards stats user, or <code>null</code> if a matching message boards stats user could not be found 178 */ 179 public static MBStatsUser fetchByGroupId_First(long groupId, 180 OrderByComparator<MBStatsUser> orderByComparator) { 181 return getPersistence().fetchByGroupId_First(groupId, orderByComparator); 182 } 183 184 /** 185 * Returns the last message boards stats user in the ordered set where groupId = ?. 186 * 187 * @param groupId the group ID 188 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 189 * @return the last matching message boards stats user 190 * @throws NoSuchStatsUserException if a matching message boards stats user could not be found 191 */ 192 public static MBStatsUser findByGroupId_Last(long groupId, 193 OrderByComparator<MBStatsUser> orderByComparator) 194 throws com.liferay.portlet.messageboards.NoSuchStatsUserException { 195 return getPersistence().findByGroupId_Last(groupId, orderByComparator); 196 } 197 198 /** 199 * Returns the last message boards stats user in the ordered set where groupId = ?. 200 * 201 * @param groupId the group ID 202 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 203 * @return the last matching message boards stats user, or <code>null</code> if a matching message boards stats user could not be found 204 */ 205 public static MBStatsUser fetchByGroupId_Last(long groupId, 206 OrderByComparator<MBStatsUser> orderByComparator) { 207 return getPersistence().fetchByGroupId_Last(groupId, orderByComparator); 208 } 209 210 /** 211 * Returns the message boards stats users before and after the current message boards stats user in the ordered set where groupId = ?. 212 * 213 * @param statsUserId the primary key of the current message boards stats user 214 * @param groupId the group ID 215 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 216 * @return the previous, current, and next message boards stats user 217 * @throws NoSuchStatsUserException if a message boards stats user with the primary key could not be found 218 */ 219 public static MBStatsUser[] findByGroupId_PrevAndNext(long statsUserId, 220 long groupId, OrderByComparator<MBStatsUser> orderByComparator) 221 throws com.liferay.portlet.messageboards.NoSuchStatsUserException { 222 return getPersistence() 223 .findByGroupId_PrevAndNext(statsUserId, groupId, 224 orderByComparator); 225 } 226 227 /** 228 * Removes all the message boards stats users where groupId = ? from the database. 229 * 230 * @param groupId the group ID 231 */ 232 public static void removeByGroupId(long groupId) { 233 getPersistence().removeByGroupId(groupId); 234 } 235 236 /** 237 * Returns the number of message boards stats users where groupId = ?. 238 * 239 * @param groupId the group ID 240 * @return the number of matching message boards stats users 241 */ 242 public static int countByGroupId(long groupId) { 243 return getPersistence().countByGroupId(groupId); 244 } 245 246 /** 247 * Returns all the message boards stats users where userId = ?. 248 * 249 * @param userId the user ID 250 * @return the matching message boards stats users 251 */ 252 public static List<MBStatsUser> findByUserId(long userId) { 253 return getPersistence().findByUserId(userId); 254 } 255 256 /** 257 * Returns a range of all the message boards stats users where userId = ?. 258 * 259 * <p> 260 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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. 261 * </p> 262 * 263 * @param userId the user ID 264 * @param start the lower bound of the range of message boards stats users 265 * @param end the upper bound of the range of message boards stats users (not inclusive) 266 * @return the range of matching message boards stats users 267 */ 268 public static List<MBStatsUser> findByUserId(long userId, int start, int end) { 269 return getPersistence().findByUserId(userId, start, end); 270 } 271 272 /** 273 * Returns an ordered range of all the message boards stats users where userId = ?. 274 * 275 * <p> 276 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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. 277 * </p> 278 * 279 * @param userId the user ID 280 * @param start the lower bound of the range of message boards stats users 281 * @param end the upper bound of the range of message boards stats users (not inclusive) 282 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 283 * @return the ordered range of matching message boards stats users 284 */ 285 public static List<MBStatsUser> findByUserId(long userId, int start, 286 int end, OrderByComparator<MBStatsUser> orderByComparator) { 287 return getPersistence() 288 .findByUserId(userId, start, end, orderByComparator); 289 } 290 291 /** 292 * Returns the first message boards stats user in the ordered set where userId = ?. 293 * 294 * @param userId the user ID 295 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 296 * @return the first matching message boards stats user 297 * @throws NoSuchStatsUserException if a matching message boards stats user could not be found 298 */ 299 public static MBStatsUser findByUserId_First(long userId, 300 OrderByComparator<MBStatsUser> orderByComparator) 301 throws com.liferay.portlet.messageboards.NoSuchStatsUserException { 302 return getPersistence().findByUserId_First(userId, orderByComparator); 303 } 304 305 /** 306 * Returns the first message boards stats user in the ordered set where userId = ?. 307 * 308 * @param userId the user ID 309 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 310 * @return the first matching message boards stats user, or <code>null</code> if a matching message boards stats user could not be found 311 */ 312 public static MBStatsUser fetchByUserId_First(long userId, 313 OrderByComparator<MBStatsUser> orderByComparator) { 314 return getPersistence().fetchByUserId_First(userId, orderByComparator); 315 } 316 317 /** 318 * Returns the last message boards stats user in the ordered set where userId = ?. 319 * 320 * @param userId the user ID 321 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 322 * @return the last matching message boards stats user 323 * @throws NoSuchStatsUserException if a matching message boards stats user could not be found 324 */ 325 public static MBStatsUser findByUserId_Last(long userId, 326 OrderByComparator<MBStatsUser> orderByComparator) 327 throws com.liferay.portlet.messageboards.NoSuchStatsUserException { 328 return getPersistence().findByUserId_Last(userId, orderByComparator); 329 } 330 331 /** 332 * Returns the last message boards stats user in the ordered set where userId = ?. 333 * 334 * @param userId the user ID 335 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 336 * @return the last matching message boards stats user, or <code>null</code> if a matching message boards stats user could not be found 337 */ 338 public static MBStatsUser fetchByUserId_Last(long userId, 339 OrderByComparator<MBStatsUser> orderByComparator) { 340 return getPersistence().fetchByUserId_Last(userId, orderByComparator); 341 } 342 343 /** 344 * Returns the message boards stats users before and after the current message boards stats user in the ordered set where userId = ?. 345 * 346 * @param statsUserId the primary key of the current message boards stats user 347 * @param userId the user ID 348 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 349 * @return the previous, current, and next message boards stats user 350 * @throws NoSuchStatsUserException if a message boards stats user with the primary key could not be found 351 */ 352 public static MBStatsUser[] findByUserId_PrevAndNext(long statsUserId, 353 long userId, OrderByComparator<MBStatsUser> orderByComparator) 354 throws com.liferay.portlet.messageboards.NoSuchStatsUserException { 355 return getPersistence() 356 .findByUserId_PrevAndNext(statsUserId, userId, 357 orderByComparator); 358 } 359 360 /** 361 * Removes all the message boards stats users where userId = ? from the database. 362 * 363 * @param userId the user ID 364 */ 365 public static void removeByUserId(long userId) { 366 getPersistence().removeByUserId(userId); 367 } 368 369 /** 370 * Returns the number of message boards stats users where userId = ?. 371 * 372 * @param userId the user ID 373 * @return the number of matching message boards stats users 374 */ 375 public static int countByUserId(long userId) { 376 return getPersistence().countByUserId(userId); 377 } 378 379 /** 380 * Returns the message boards stats user where groupId = ? and userId = ? or throws a {@link NoSuchStatsUserException} if it could not be found. 381 * 382 * @param groupId the group ID 383 * @param userId the user ID 384 * @return the matching message boards stats user 385 * @throws NoSuchStatsUserException if a matching message boards stats user could not be found 386 */ 387 public static MBStatsUser findByG_U(long groupId, long userId) 388 throws com.liferay.portlet.messageboards.NoSuchStatsUserException { 389 return getPersistence().findByG_U(groupId, userId); 390 } 391 392 /** 393 * Returns the message boards stats user where groupId = ? and userId = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 394 * 395 * @param groupId the group ID 396 * @param userId the user ID 397 * @return the matching message boards stats user, or <code>null</code> if a matching message boards stats user could not be found 398 */ 399 public static MBStatsUser fetchByG_U(long groupId, long userId) { 400 return getPersistence().fetchByG_U(groupId, userId); 401 } 402 403 /** 404 * Returns the message boards stats user where groupId = ? and userId = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 405 * 406 * @param groupId the group ID 407 * @param userId the user ID 408 * @param retrieveFromCache whether to use the finder cache 409 * @return the matching message boards stats user, or <code>null</code> if a matching message boards stats user could not be found 410 */ 411 public static MBStatsUser fetchByG_U(long groupId, long userId, 412 boolean retrieveFromCache) { 413 return getPersistence().fetchByG_U(groupId, userId, retrieveFromCache); 414 } 415 416 /** 417 * Removes the message boards stats user where groupId = ? and userId = ? from the database. 418 * 419 * @param groupId the group ID 420 * @param userId the user ID 421 * @return the message boards stats user that was removed 422 */ 423 public static MBStatsUser removeByG_U(long groupId, long userId) 424 throws com.liferay.portlet.messageboards.NoSuchStatsUserException { 425 return getPersistence().removeByG_U(groupId, userId); 426 } 427 428 /** 429 * Returns the number of message boards stats users where groupId = ? and userId = ?. 430 * 431 * @param groupId the group ID 432 * @param userId the user ID 433 * @return the number of matching message boards stats users 434 */ 435 public static int countByG_U(long groupId, long userId) { 436 return getPersistence().countByG_U(groupId, userId); 437 } 438 439 /** 440 * Returns all the message boards stats users where groupId = ? and userId ≠ ? and messageCount ≠ ?. 441 * 442 * @param groupId the group ID 443 * @param userId the user ID 444 * @param messageCount the message count 445 * @return the matching message boards stats users 446 */ 447 public static List<MBStatsUser> findByG_NotU_NotM(long groupId, 448 long userId, int messageCount) { 449 return getPersistence().findByG_NotU_NotM(groupId, userId, messageCount); 450 } 451 452 /** 453 * Returns a range of all the message boards stats users where groupId = ? and userId ≠ ? and messageCount ≠ ?. 454 * 455 * <p> 456 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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. 457 * </p> 458 * 459 * @param groupId the group ID 460 * @param userId the user ID 461 * @param messageCount the message count 462 * @param start the lower bound of the range of message boards stats users 463 * @param end the upper bound of the range of message boards stats users (not inclusive) 464 * @return the range of matching message boards stats users 465 */ 466 public static List<MBStatsUser> findByG_NotU_NotM(long groupId, 467 long userId, int messageCount, int start, int end) { 468 return getPersistence() 469 .findByG_NotU_NotM(groupId, userId, messageCount, start, end); 470 } 471 472 /** 473 * Returns an ordered range of all the message boards stats users where groupId = ? and userId ≠ ? and messageCount ≠ ?. 474 * 475 * <p> 476 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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. 477 * </p> 478 * 479 * @param groupId the group ID 480 * @param userId the user ID 481 * @param messageCount the message count 482 * @param start the lower bound of the range of message boards stats users 483 * @param end the upper bound of the range of message boards stats users (not inclusive) 484 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 485 * @return the ordered range of matching message boards stats users 486 */ 487 public static List<MBStatsUser> findByG_NotU_NotM(long groupId, 488 long userId, int messageCount, int start, int end, 489 OrderByComparator<MBStatsUser> orderByComparator) { 490 return getPersistence() 491 .findByG_NotU_NotM(groupId, userId, messageCount, start, 492 end, orderByComparator); 493 } 494 495 /** 496 * Returns the first message boards stats user in the ordered set where groupId = ? and userId ≠ ? and messageCount ≠ ?. 497 * 498 * @param groupId the group ID 499 * @param userId the user ID 500 * @param messageCount the message count 501 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 502 * @return the first matching message boards stats user 503 * @throws NoSuchStatsUserException if a matching message boards stats user could not be found 504 */ 505 public static MBStatsUser findByG_NotU_NotM_First(long groupId, 506 long userId, int messageCount, 507 OrderByComparator<MBStatsUser> orderByComparator) 508 throws com.liferay.portlet.messageboards.NoSuchStatsUserException { 509 return getPersistence() 510 .findByG_NotU_NotM_First(groupId, userId, messageCount, 511 orderByComparator); 512 } 513 514 /** 515 * Returns the first message boards stats user in the ordered set where groupId = ? and userId ≠ ? and messageCount ≠ ?. 516 * 517 * @param groupId the group ID 518 * @param userId the user ID 519 * @param messageCount the message count 520 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 521 * @return the first matching message boards stats user, or <code>null</code> if a matching message boards stats user could not be found 522 */ 523 public static MBStatsUser fetchByG_NotU_NotM_First(long groupId, 524 long userId, int messageCount, 525 OrderByComparator<MBStatsUser> orderByComparator) { 526 return getPersistence() 527 .fetchByG_NotU_NotM_First(groupId, userId, messageCount, 528 orderByComparator); 529 } 530 531 /** 532 * Returns the last message boards stats user in the ordered set where groupId = ? and userId ≠ ? and messageCount ≠ ?. 533 * 534 * @param groupId the group ID 535 * @param userId the user ID 536 * @param messageCount the message count 537 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 538 * @return the last matching message boards stats user 539 * @throws NoSuchStatsUserException if a matching message boards stats user could not be found 540 */ 541 public static MBStatsUser findByG_NotU_NotM_Last(long groupId, long userId, 542 int messageCount, OrderByComparator<MBStatsUser> orderByComparator) 543 throws com.liferay.portlet.messageboards.NoSuchStatsUserException { 544 return getPersistence() 545 .findByG_NotU_NotM_Last(groupId, userId, messageCount, 546 orderByComparator); 547 } 548 549 /** 550 * Returns the last message boards stats user in the ordered set where groupId = ? and userId ≠ ? and messageCount ≠ ?. 551 * 552 * @param groupId the group ID 553 * @param userId the user ID 554 * @param messageCount the message count 555 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 556 * @return the last matching message boards stats user, or <code>null</code> if a matching message boards stats user could not be found 557 */ 558 public static MBStatsUser fetchByG_NotU_NotM_Last(long groupId, 559 long userId, int messageCount, 560 OrderByComparator<MBStatsUser> orderByComparator) { 561 return getPersistence() 562 .fetchByG_NotU_NotM_Last(groupId, userId, messageCount, 563 orderByComparator); 564 } 565 566 /** 567 * Returns the message boards stats users before and after the current message boards stats user in the ordered set where groupId = ? and userId ≠ ? and messageCount ≠ ?. 568 * 569 * @param statsUserId the primary key of the current message boards stats user 570 * @param groupId the group ID 571 * @param userId the user ID 572 * @param messageCount the message count 573 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 574 * @return the previous, current, and next message boards stats user 575 * @throws NoSuchStatsUserException if a message boards stats user with the primary key could not be found 576 */ 577 public static MBStatsUser[] findByG_NotU_NotM_PrevAndNext( 578 long statsUserId, long groupId, long userId, int messageCount, 579 OrderByComparator<MBStatsUser> orderByComparator) 580 throws com.liferay.portlet.messageboards.NoSuchStatsUserException { 581 return getPersistence() 582 .findByG_NotU_NotM_PrevAndNext(statsUserId, groupId, userId, 583 messageCount, orderByComparator); 584 } 585 586 /** 587 * Removes all the message boards stats users where groupId = ? and userId ≠ ? and messageCount ≠ ? from the database. 588 * 589 * @param groupId the group ID 590 * @param userId the user ID 591 * @param messageCount the message count 592 */ 593 public static void removeByG_NotU_NotM(long groupId, long userId, 594 int messageCount) { 595 getPersistence().removeByG_NotU_NotM(groupId, userId, messageCount); 596 } 597 598 /** 599 * Returns the number of message boards stats users where groupId = ? and userId ≠ ? and messageCount ≠ ?. 600 * 601 * @param groupId the group ID 602 * @param userId the user ID 603 * @param messageCount the message count 604 * @return the number of matching message boards stats users 605 */ 606 public static int countByG_NotU_NotM(long groupId, long userId, 607 int messageCount) { 608 return getPersistence().countByG_NotU_NotM(groupId, userId, messageCount); 609 } 610 611 /** 612 * Caches the message boards stats user in the entity cache if it is enabled. 613 * 614 * @param mbStatsUser the message boards stats user 615 */ 616 public static void cacheResult(MBStatsUser mbStatsUser) { 617 getPersistence().cacheResult(mbStatsUser); 618 } 619 620 /** 621 * Caches the message boards stats users in the entity cache if it is enabled. 622 * 623 * @param mbStatsUsers the message boards stats users 624 */ 625 public static void cacheResult(List<MBStatsUser> mbStatsUsers) { 626 getPersistence().cacheResult(mbStatsUsers); 627 } 628 629 /** 630 * Creates a new message boards stats user with the primary key. Does not add the message boards stats user to the database. 631 * 632 * @param statsUserId the primary key for the new message boards stats user 633 * @return the new message boards stats user 634 */ 635 public static MBStatsUser create(long statsUserId) { 636 return getPersistence().create(statsUserId); 637 } 638 639 /** 640 * Removes the message boards stats user with the primary key from the database. Also notifies the appropriate model listeners. 641 * 642 * @param statsUserId the primary key of the message boards stats user 643 * @return the message boards stats user that was removed 644 * @throws NoSuchStatsUserException if a message boards stats user with the primary key could not be found 645 */ 646 public static MBStatsUser remove(long statsUserId) 647 throws com.liferay.portlet.messageboards.NoSuchStatsUserException { 648 return getPersistence().remove(statsUserId); 649 } 650 651 public static MBStatsUser updateImpl(MBStatsUser mbStatsUser) { 652 return getPersistence().updateImpl(mbStatsUser); 653 } 654 655 /** 656 * Returns the message boards stats user with the primary key or throws a {@link NoSuchStatsUserException} if it could not be found. 657 * 658 * @param statsUserId the primary key of the message boards stats user 659 * @return the message boards stats user 660 * @throws NoSuchStatsUserException if a message boards stats user with the primary key could not be found 661 */ 662 public static MBStatsUser findByPrimaryKey(long statsUserId) 663 throws com.liferay.portlet.messageboards.NoSuchStatsUserException { 664 return getPersistence().findByPrimaryKey(statsUserId); 665 } 666 667 /** 668 * Returns the message boards stats user with the primary key or returns <code>null</code> if it could not be found. 669 * 670 * @param statsUserId the primary key of the message boards stats user 671 * @return the message boards stats user, or <code>null</code> if a message boards stats user with the primary key could not be found 672 */ 673 public static MBStatsUser fetchByPrimaryKey(long statsUserId) { 674 return getPersistence().fetchByPrimaryKey(statsUserId); 675 } 676 677 public static java.util.Map<java.io.Serializable, MBStatsUser> fetchByPrimaryKeys( 678 java.util.Set<java.io.Serializable> primaryKeys) { 679 return getPersistence().fetchByPrimaryKeys(primaryKeys); 680 } 681 682 /** 683 * Returns all the message boards stats users. 684 * 685 * @return the message boards stats users 686 */ 687 public static List<MBStatsUser> findAll() { 688 return getPersistence().findAll(); 689 } 690 691 /** 692 * Returns a range of all the message boards stats users. 693 * 694 * <p> 695 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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. 696 * </p> 697 * 698 * @param start the lower bound of the range of message boards stats users 699 * @param end the upper bound of the range of message boards stats users (not inclusive) 700 * @return the range of message boards stats users 701 */ 702 public static List<MBStatsUser> findAll(int start, int end) { 703 return getPersistence().findAll(start, end); 704 } 705 706 /** 707 * Returns an ordered range of all the message boards stats users. 708 * 709 * <p> 710 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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. 711 * </p> 712 * 713 * @param start the lower bound of the range of message boards stats users 714 * @param end the upper bound of the range of message boards stats users (not inclusive) 715 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 716 * @return the ordered range of message boards stats users 717 */ 718 public static List<MBStatsUser> findAll(int start, int end, 719 OrderByComparator<MBStatsUser> orderByComparator) { 720 return getPersistence().findAll(start, end, orderByComparator); 721 } 722 723 /** 724 * Removes all the message boards stats users from the database. 725 */ 726 public static void removeAll() { 727 getPersistence().removeAll(); 728 } 729 730 /** 731 * Returns the number of message boards stats users. 732 * 733 * @return the number of message boards stats users 734 */ 735 public static int countAll() { 736 return getPersistence().countAll(); 737 } 738 739 public static MBStatsUserPersistence getPersistence() { 740 if (_persistence == null) { 741 _persistence = (MBStatsUserPersistence)PortalBeanLocatorUtil.locate(MBStatsUserPersistence.class.getName()); 742 743 ReferenceRegistry.registerReference(MBStatsUserUtil.class, 744 "_persistence"); 745 } 746 747 return _persistence; 748 } 749 750 /** 751 * @deprecated As of 6.2.0 752 */ 753 @Deprecated 754 public void setPersistence(MBStatsUserPersistence persistence) { 755 } 756 757 private static MBStatsUserPersistence _persistence; 758 }