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