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