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.portal.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.model.Subscription; 024 import com.liferay.portal.service.ServiceContext; 025 026 import java.util.List; 027 028 /** 029 * The persistence utility for the subscription service. This utility wraps {@link com.liferay.portal.service.persistence.impl.SubscriptionPersistenceImpl} 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. 030 * 031 * <p> 032 * Caching information and settings can be found in <code>portal.properties</code> 033 * </p> 034 * 035 * @author Brian Wing Shun Chan 036 * @see SubscriptionPersistence 037 * @see com.liferay.portal.service.persistence.impl.SubscriptionPersistenceImpl 038 * @generated 039 */ 040 @ProviderType 041 public class SubscriptionUtil { 042 /* 043 * NOTE FOR DEVELOPERS: 044 * 045 * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class. 046 */ 047 048 /** 049 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache() 050 */ 051 public static void clearCache() { 052 getPersistence().clearCache(); 053 } 054 055 /** 056 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel) 057 */ 058 public static void clearCache(Subscription subscription) { 059 getPersistence().clearCache(subscription); 060 } 061 062 /** 063 * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery) 064 */ 065 public static long countWithDynamicQuery(DynamicQuery dynamicQuery) { 066 return getPersistence().countWithDynamicQuery(dynamicQuery); 067 } 068 069 /** 070 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery) 071 */ 072 public static List<Subscription> findWithDynamicQuery( 073 DynamicQuery dynamicQuery) { 074 return getPersistence().findWithDynamicQuery(dynamicQuery); 075 } 076 077 /** 078 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int) 079 */ 080 public static List<Subscription> findWithDynamicQuery( 081 DynamicQuery dynamicQuery, int start, int end) { 082 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end); 083 } 084 085 /** 086 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator) 087 */ 088 public static List<Subscription> findWithDynamicQuery( 089 DynamicQuery dynamicQuery, int start, int end, 090 OrderByComparator<Subscription> orderByComparator) { 091 return getPersistence() 092 .findWithDynamicQuery(dynamicQuery, start, end, 093 orderByComparator); 094 } 095 096 /** 097 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel) 098 */ 099 public static Subscription update(Subscription subscription) { 100 return getPersistence().update(subscription); 101 } 102 103 /** 104 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext) 105 */ 106 public static Subscription update(Subscription subscription, 107 ServiceContext serviceContext) { 108 return getPersistence().update(subscription, serviceContext); 109 } 110 111 /** 112 * Returns all the subscriptions where userId = ?. 113 * 114 * @param userId the user ID 115 * @return the matching subscriptions 116 */ 117 public static List<Subscription> findByUserId(long userId) { 118 return getPersistence().findByUserId(userId); 119 } 120 121 /** 122 * Returns a range of all the subscriptions where userId = ?. 123 * 124 * <p> 125 * 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 SubscriptionModelImpl}. 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. 126 * </p> 127 * 128 * @param userId the user ID 129 * @param start the lower bound of the range of subscriptions 130 * @param end the upper bound of the range of subscriptions (not inclusive) 131 * @return the range of matching subscriptions 132 */ 133 public static List<Subscription> findByUserId(long userId, int start, 134 int end) { 135 return getPersistence().findByUserId(userId, start, end); 136 } 137 138 /** 139 * Returns an ordered range of all the subscriptions where userId = ?. 140 * 141 * <p> 142 * 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 SubscriptionModelImpl}. 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. 143 * </p> 144 * 145 * @param userId the user ID 146 * @param start the lower bound of the range of subscriptions 147 * @param end the upper bound of the range of subscriptions (not inclusive) 148 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 149 * @return the ordered range of matching subscriptions 150 */ 151 public static List<Subscription> findByUserId(long userId, int start, 152 int end, OrderByComparator<Subscription> orderByComparator) { 153 return getPersistence() 154 .findByUserId(userId, start, end, orderByComparator); 155 } 156 157 /** 158 * Returns the first subscription in the ordered set where userId = ?. 159 * 160 * @param userId the user ID 161 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 162 * @return the first matching subscription 163 * @throws NoSuchSubscriptionException if a matching subscription could not be found 164 */ 165 public static Subscription findByUserId_First(long userId, 166 OrderByComparator<Subscription> orderByComparator) 167 throws com.liferay.portal.NoSuchSubscriptionException { 168 return getPersistence().findByUserId_First(userId, orderByComparator); 169 } 170 171 /** 172 * Returns the first subscription in the ordered set where userId = ?. 173 * 174 * @param userId the user ID 175 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 176 * @return the first matching subscription, or <code>null</code> if a matching subscription could not be found 177 */ 178 public static Subscription fetchByUserId_First(long userId, 179 OrderByComparator<Subscription> orderByComparator) { 180 return getPersistence().fetchByUserId_First(userId, orderByComparator); 181 } 182 183 /** 184 * Returns the last subscription in the ordered set where userId = ?. 185 * 186 * @param userId the user ID 187 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 188 * @return the last matching subscription 189 * @throws NoSuchSubscriptionException if a matching subscription could not be found 190 */ 191 public static Subscription findByUserId_Last(long userId, 192 OrderByComparator<Subscription> orderByComparator) 193 throws com.liferay.portal.NoSuchSubscriptionException { 194 return getPersistence().findByUserId_Last(userId, orderByComparator); 195 } 196 197 /** 198 * Returns the last subscription in the ordered set where userId = ?. 199 * 200 * @param userId the user ID 201 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 202 * @return the last matching subscription, or <code>null</code> if a matching subscription could not be found 203 */ 204 public static Subscription fetchByUserId_Last(long userId, 205 OrderByComparator<Subscription> orderByComparator) { 206 return getPersistence().fetchByUserId_Last(userId, orderByComparator); 207 } 208 209 /** 210 * Returns the subscriptions before and after the current subscription in the ordered set where userId = ?. 211 * 212 * @param subscriptionId the primary key of the current subscription 213 * @param userId the user ID 214 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 215 * @return the previous, current, and next subscription 216 * @throws NoSuchSubscriptionException if a subscription with the primary key could not be found 217 */ 218 public static Subscription[] findByUserId_PrevAndNext(long subscriptionId, 219 long userId, OrderByComparator<Subscription> orderByComparator) 220 throws com.liferay.portal.NoSuchSubscriptionException { 221 return getPersistence() 222 .findByUserId_PrevAndNext(subscriptionId, userId, 223 orderByComparator); 224 } 225 226 /** 227 * Removes all the subscriptions where userId = ? from the database. 228 * 229 * @param userId the user ID 230 */ 231 public static void removeByUserId(long userId) { 232 getPersistence().removeByUserId(userId); 233 } 234 235 /** 236 * Returns the number of subscriptions where userId = ?. 237 * 238 * @param userId the user ID 239 * @return the number of matching subscriptions 240 */ 241 public static int countByUserId(long userId) { 242 return getPersistence().countByUserId(userId); 243 } 244 245 /** 246 * Returns all the subscriptions where groupId = ? and userId = ?. 247 * 248 * @param groupId the group ID 249 * @param userId the user ID 250 * @return the matching subscriptions 251 */ 252 public static List<Subscription> findByG_U(long groupId, long userId) { 253 return getPersistence().findByG_U(groupId, userId); 254 } 255 256 /** 257 * Returns a range of all the subscriptions where groupId = ? and 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 SubscriptionModelImpl}. 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 groupId the group ID 264 * @param userId the user ID 265 * @param start the lower bound of the range of subscriptions 266 * @param end the upper bound of the range of subscriptions (not inclusive) 267 * @return the range of matching subscriptions 268 */ 269 public static List<Subscription> findByG_U(long groupId, long userId, 270 int start, int end) { 271 return getPersistence().findByG_U(groupId, userId, start, end); 272 } 273 274 /** 275 * Returns an ordered range of all the subscriptions where groupId = ? and userId = ?. 276 * 277 * <p> 278 * 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 SubscriptionModelImpl}. 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. 279 * </p> 280 * 281 * @param groupId the group ID 282 * @param userId the user ID 283 * @param start the lower bound of the range of subscriptions 284 * @param end the upper bound of the range of subscriptions (not inclusive) 285 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 286 * @return the ordered range of matching subscriptions 287 */ 288 public static List<Subscription> findByG_U(long groupId, long userId, 289 int start, int end, OrderByComparator<Subscription> orderByComparator) { 290 return getPersistence() 291 .findByG_U(groupId, userId, start, end, orderByComparator); 292 } 293 294 /** 295 * Returns the first subscription in the ordered set where groupId = ? and userId = ?. 296 * 297 * @param groupId the group ID 298 * @param userId the user ID 299 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 300 * @return the first matching subscription 301 * @throws NoSuchSubscriptionException if a matching subscription could not be found 302 */ 303 public static Subscription findByG_U_First(long groupId, long userId, 304 OrderByComparator<Subscription> orderByComparator) 305 throws com.liferay.portal.NoSuchSubscriptionException { 306 return getPersistence() 307 .findByG_U_First(groupId, userId, orderByComparator); 308 } 309 310 /** 311 * Returns the first subscription in the ordered set where groupId = ? and userId = ?. 312 * 313 * @param groupId the group ID 314 * @param userId the user ID 315 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 316 * @return the first matching subscription, or <code>null</code> if a matching subscription could not be found 317 */ 318 public static Subscription fetchByG_U_First(long groupId, long userId, 319 OrderByComparator<Subscription> orderByComparator) { 320 return getPersistence() 321 .fetchByG_U_First(groupId, userId, orderByComparator); 322 } 323 324 /** 325 * Returns the last subscription in the ordered set where groupId = ? and userId = ?. 326 * 327 * @param groupId the group ID 328 * @param userId the user ID 329 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 330 * @return the last matching subscription 331 * @throws NoSuchSubscriptionException if a matching subscription could not be found 332 */ 333 public static Subscription findByG_U_Last(long groupId, long userId, 334 OrderByComparator<Subscription> orderByComparator) 335 throws com.liferay.portal.NoSuchSubscriptionException { 336 return getPersistence() 337 .findByG_U_Last(groupId, userId, orderByComparator); 338 } 339 340 /** 341 * Returns the last subscription in the ordered set where groupId = ? and userId = ?. 342 * 343 * @param groupId the group ID 344 * @param userId the user ID 345 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 346 * @return the last matching subscription, or <code>null</code> if a matching subscription could not be found 347 */ 348 public static Subscription fetchByG_U_Last(long groupId, long userId, 349 OrderByComparator<Subscription> orderByComparator) { 350 return getPersistence() 351 .fetchByG_U_Last(groupId, userId, orderByComparator); 352 } 353 354 /** 355 * Returns the subscriptions before and after the current subscription in the ordered set where groupId = ? and userId = ?. 356 * 357 * @param subscriptionId the primary key of the current subscription 358 * @param groupId the group ID 359 * @param userId the user ID 360 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 361 * @return the previous, current, and next subscription 362 * @throws NoSuchSubscriptionException if a subscription with the primary key could not be found 363 */ 364 public static Subscription[] findByG_U_PrevAndNext(long subscriptionId, 365 long groupId, long userId, 366 OrderByComparator<Subscription> orderByComparator) 367 throws com.liferay.portal.NoSuchSubscriptionException { 368 return getPersistence() 369 .findByG_U_PrevAndNext(subscriptionId, groupId, userId, 370 orderByComparator); 371 } 372 373 /** 374 * Removes all the subscriptions where groupId = ? and userId = ? from the database. 375 * 376 * @param groupId the group ID 377 * @param userId the user ID 378 */ 379 public static void removeByG_U(long groupId, long userId) { 380 getPersistence().removeByG_U(groupId, userId); 381 } 382 383 /** 384 * Returns the number of subscriptions where groupId = ? and userId = ?. 385 * 386 * @param groupId the group ID 387 * @param userId the user ID 388 * @return the number of matching subscriptions 389 */ 390 public static int countByG_U(long groupId, long userId) { 391 return getPersistence().countByG_U(groupId, userId); 392 } 393 394 /** 395 * Returns all the subscriptions where userId = ? and classNameId = ?. 396 * 397 * @param userId the user ID 398 * @param classNameId the class name ID 399 * @return the matching subscriptions 400 */ 401 public static List<Subscription> findByU_C(long userId, long classNameId) { 402 return getPersistence().findByU_C(userId, classNameId); 403 } 404 405 /** 406 * Returns a range of all the subscriptions where userId = ? and classNameId = ?. 407 * 408 * <p> 409 * 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 SubscriptionModelImpl}. 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. 410 * </p> 411 * 412 * @param userId the user ID 413 * @param classNameId the class name ID 414 * @param start the lower bound of the range of subscriptions 415 * @param end the upper bound of the range of subscriptions (not inclusive) 416 * @return the range of matching subscriptions 417 */ 418 public static List<Subscription> findByU_C(long userId, long classNameId, 419 int start, int end) { 420 return getPersistence().findByU_C(userId, classNameId, start, end); 421 } 422 423 /** 424 * Returns an ordered range of all the subscriptions where userId = ? and classNameId = ?. 425 * 426 * <p> 427 * 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 SubscriptionModelImpl}. 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. 428 * </p> 429 * 430 * @param userId the user ID 431 * @param classNameId the class name ID 432 * @param start the lower bound of the range of subscriptions 433 * @param end the upper bound of the range of subscriptions (not inclusive) 434 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 435 * @return the ordered range of matching subscriptions 436 */ 437 public static List<Subscription> findByU_C(long userId, long classNameId, 438 int start, int end, OrderByComparator<Subscription> orderByComparator) { 439 return getPersistence() 440 .findByU_C(userId, classNameId, start, end, orderByComparator); 441 } 442 443 /** 444 * Returns the first subscription in the ordered set where userId = ? and classNameId = ?. 445 * 446 * @param userId the user ID 447 * @param classNameId the class name ID 448 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 449 * @return the first matching subscription 450 * @throws NoSuchSubscriptionException if a matching subscription could not be found 451 */ 452 public static Subscription findByU_C_First(long userId, long classNameId, 453 OrderByComparator<Subscription> orderByComparator) 454 throws com.liferay.portal.NoSuchSubscriptionException { 455 return getPersistence() 456 .findByU_C_First(userId, classNameId, orderByComparator); 457 } 458 459 /** 460 * Returns the first subscription in the ordered set where userId = ? and classNameId = ?. 461 * 462 * @param userId the user ID 463 * @param classNameId the class name ID 464 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 465 * @return the first matching subscription, or <code>null</code> if a matching subscription could not be found 466 */ 467 public static Subscription fetchByU_C_First(long userId, long classNameId, 468 OrderByComparator<Subscription> orderByComparator) { 469 return getPersistence() 470 .fetchByU_C_First(userId, classNameId, orderByComparator); 471 } 472 473 /** 474 * Returns the last subscription in the ordered set where userId = ? and classNameId = ?. 475 * 476 * @param userId the user ID 477 * @param classNameId the class name ID 478 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 479 * @return the last matching subscription 480 * @throws NoSuchSubscriptionException if a matching subscription could not be found 481 */ 482 public static Subscription findByU_C_Last(long userId, long classNameId, 483 OrderByComparator<Subscription> orderByComparator) 484 throws com.liferay.portal.NoSuchSubscriptionException { 485 return getPersistence() 486 .findByU_C_Last(userId, classNameId, orderByComparator); 487 } 488 489 /** 490 * Returns the last subscription in the ordered set where userId = ? and classNameId = ?. 491 * 492 * @param userId the user ID 493 * @param classNameId the class name ID 494 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 495 * @return the last matching subscription, or <code>null</code> if a matching subscription could not be found 496 */ 497 public static Subscription fetchByU_C_Last(long userId, long classNameId, 498 OrderByComparator<Subscription> orderByComparator) { 499 return getPersistence() 500 .fetchByU_C_Last(userId, classNameId, orderByComparator); 501 } 502 503 /** 504 * Returns the subscriptions before and after the current subscription in the ordered set where userId = ? and classNameId = ?. 505 * 506 * @param subscriptionId the primary key of the current subscription 507 * @param userId the user ID 508 * @param classNameId the class name ID 509 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 510 * @return the previous, current, and next subscription 511 * @throws NoSuchSubscriptionException if a subscription with the primary key could not be found 512 */ 513 public static Subscription[] findByU_C_PrevAndNext(long subscriptionId, 514 long userId, long classNameId, 515 OrderByComparator<Subscription> orderByComparator) 516 throws com.liferay.portal.NoSuchSubscriptionException { 517 return getPersistence() 518 .findByU_C_PrevAndNext(subscriptionId, userId, classNameId, 519 orderByComparator); 520 } 521 522 /** 523 * Removes all the subscriptions where userId = ? and classNameId = ? from the database. 524 * 525 * @param userId the user ID 526 * @param classNameId the class name ID 527 */ 528 public static void removeByU_C(long userId, long classNameId) { 529 getPersistence().removeByU_C(userId, classNameId); 530 } 531 532 /** 533 * Returns the number of subscriptions where userId = ? and classNameId = ?. 534 * 535 * @param userId the user ID 536 * @param classNameId the class name ID 537 * @return the number of matching subscriptions 538 */ 539 public static int countByU_C(long userId, long classNameId) { 540 return getPersistence().countByU_C(userId, classNameId); 541 } 542 543 /** 544 * Returns all the subscriptions where companyId = ? and classNameId = ? and classPK = ?. 545 * 546 * @param companyId the company ID 547 * @param classNameId the class name ID 548 * @param classPK the class p k 549 * @return the matching subscriptions 550 */ 551 public static List<Subscription> findByC_C_C(long companyId, 552 long classNameId, long classPK) { 553 return getPersistence().findByC_C_C(companyId, classNameId, classPK); 554 } 555 556 /** 557 * Returns a range of all the subscriptions where companyId = ? and classNameId = ? and classPK = ?. 558 * 559 * <p> 560 * 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 SubscriptionModelImpl}. 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. 561 * </p> 562 * 563 * @param companyId the company ID 564 * @param classNameId the class name ID 565 * @param classPK the class p k 566 * @param start the lower bound of the range of subscriptions 567 * @param end the upper bound of the range of subscriptions (not inclusive) 568 * @return the range of matching subscriptions 569 */ 570 public static List<Subscription> findByC_C_C(long companyId, 571 long classNameId, long classPK, int start, int end) { 572 return getPersistence() 573 .findByC_C_C(companyId, classNameId, classPK, start, end); 574 } 575 576 /** 577 * Returns an ordered range of all the subscriptions where companyId = ? and classNameId = ? and classPK = ?. 578 * 579 * <p> 580 * 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 SubscriptionModelImpl}. 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. 581 * </p> 582 * 583 * @param companyId the company ID 584 * @param classNameId the class name ID 585 * @param classPK the class p k 586 * @param start the lower bound of the range of subscriptions 587 * @param end the upper bound of the range of subscriptions (not inclusive) 588 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 589 * @return the ordered range of matching subscriptions 590 */ 591 public static List<Subscription> findByC_C_C(long companyId, 592 long classNameId, long classPK, int start, int end, 593 OrderByComparator<Subscription> orderByComparator) { 594 return getPersistence() 595 .findByC_C_C(companyId, classNameId, classPK, start, end, 596 orderByComparator); 597 } 598 599 /** 600 * Returns the first subscription in the ordered set where companyId = ? and classNameId = ? and classPK = ?. 601 * 602 * @param companyId the company ID 603 * @param classNameId the class name ID 604 * @param classPK the class p k 605 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 606 * @return the first matching subscription 607 * @throws NoSuchSubscriptionException if a matching subscription could not be found 608 */ 609 public static Subscription findByC_C_C_First(long companyId, 610 long classNameId, long classPK, 611 OrderByComparator<Subscription> orderByComparator) 612 throws com.liferay.portal.NoSuchSubscriptionException { 613 return getPersistence() 614 .findByC_C_C_First(companyId, classNameId, classPK, 615 orderByComparator); 616 } 617 618 /** 619 * Returns the first subscription in the ordered set where companyId = ? and classNameId = ? and classPK = ?. 620 * 621 * @param companyId the company ID 622 * @param classNameId the class name ID 623 * @param classPK the class p k 624 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 625 * @return the first matching subscription, or <code>null</code> if a matching subscription could not be found 626 */ 627 public static Subscription fetchByC_C_C_First(long companyId, 628 long classNameId, long classPK, 629 OrderByComparator<Subscription> orderByComparator) { 630 return getPersistence() 631 .fetchByC_C_C_First(companyId, classNameId, classPK, 632 orderByComparator); 633 } 634 635 /** 636 * Returns the last subscription in the ordered set where companyId = ? and classNameId = ? and classPK = ?. 637 * 638 * @param companyId the company ID 639 * @param classNameId the class name ID 640 * @param classPK the class p k 641 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 642 * @return the last matching subscription 643 * @throws NoSuchSubscriptionException if a matching subscription could not be found 644 */ 645 public static Subscription findByC_C_C_Last(long companyId, 646 long classNameId, long classPK, 647 OrderByComparator<Subscription> orderByComparator) 648 throws com.liferay.portal.NoSuchSubscriptionException { 649 return getPersistence() 650 .findByC_C_C_Last(companyId, classNameId, classPK, 651 orderByComparator); 652 } 653 654 /** 655 * Returns the last subscription in the ordered set where companyId = ? and classNameId = ? and classPK = ?. 656 * 657 * @param companyId the company ID 658 * @param classNameId the class name ID 659 * @param classPK the class p k 660 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 661 * @return the last matching subscription, or <code>null</code> if a matching subscription could not be found 662 */ 663 public static Subscription fetchByC_C_C_Last(long companyId, 664 long classNameId, long classPK, 665 OrderByComparator<Subscription> orderByComparator) { 666 return getPersistence() 667 .fetchByC_C_C_Last(companyId, classNameId, classPK, 668 orderByComparator); 669 } 670 671 /** 672 * Returns the subscriptions before and after the current subscription in the ordered set where companyId = ? and classNameId = ? and classPK = ?. 673 * 674 * @param subscriptionId the primary key of the current subscription 675 * @param companyId the company ID 676 * @param classNameId the class name ID 677 * @param classPK the class p k 678 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 679 * @return the previous, current, and next subscription 680 * @throws NoSuchSubscriptionException if a subscription with the primary key could not be found 681 */ 682 public static Subscription[] findByC_C_C_PrevAndNext(long subscriptionId, 683 long companyId, long classNameId, long classPK, 684 OrderByComparator<Subscription> orderByComparator) 685 throws com.liferay.portal.NoSuchSubscriptionException { 686 return getPersistence() 687 .findByC_C_C_PrevAndNext(subscriptionId, companyId, 688 classNameId, classPK, orderByComparator); 689 } 690 691 /** 692 * Removes all the subscriptions where companyId = ? and classNameId = ? and classPK = ? from the database. 693 * 694 * @param companyId the company ID 695 * @param classNameId the class name ID 696 * @param classPK the class p k 697 */ 698 public static void removeByC_C_C(long companyId, long classNameId, 699 long classPK) { 700 getPersistence().removeByC_C_C(companyId, classNameId, classPK); 701 } 702 703 /** 704 * Returns the number of subscriptions where companyId = ? and classNameId = ? and classPK = ?. 705 * 706 * @param companyId the company ID 707 * @param classNameId the class name ID 708 * @param classPK the class p k 709 * @return the number of matching subscriptions 710 */ 711 public static int countByC_C_C(long companyId, long classNameId, 712 long classPK) { 713 return getPersistence().countByC_C_C(companyId, classNameId, classPK); 714 } 715 716 /** 717 * Returns all the subscriptions where companyId = ? and userId = ? and classNameId = ? and classPK = any ?. 718 * 719 * <p> 720 * 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 SubscriptionModelImpl}. 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. 721 * </p> 722 * 723 * @param companyId the company ID 724 * @param userId the user ID 725 * @param classNameId the class name ID 726 * @param classPKs the class p ks 727 * @return the matching subscriptions 728 */ 729 public static List<Subscription> findByC_U_C_C(long companyId, long userId, 730 long classNameId, long[] classPKs) { 731 return getPersistence() 732 .findByC_U_C_C(companyId, userId, classNameId, classPKs); 733 } 734 735 /** 736 * Returns a range of all the subscriptions where companyId = ? and userId = ? and classNameId = ? and classPK = any ?. 737 * 738 * <p> 739 * 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 SubscriptionModelImpl}. 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. 740 * </p> 741 * 742 * @param companyId the company ID 743 * @param userId the user ID 744 * @param classNameId the class name ID 745 * @param classPKs the class p ks 746 * @param start the lower bound of the range of subscriptions 747 * @param end the upper bound of the range of subscriptions (not inclusive) 748 * @return the range of matching subscriptions 749 */ 750 public static List<Subscription> findByC_U_C_C(long companyId, long userId, 751 long classNameId, long[] classPKs, int start, int end) { 752 return getPersistence() 753 .findByC_U_C_C(companyId, userId, classNameId, classPKs, 754 start, end); 755 } 756 757 /** 758 * Returns an ordered range of all the subscriptions where companyId = ? and userId = ? and classNameId = ? and classPK = any ?. 759 * 760 * <p> 761 * 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 SubscriptionModelImpl}. 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. 762 * </p> 763 * 764 * @param companyId the company ID 765 * @param userId the user ID 766 * @param classNameId the class name ID 767 * @param classPKs the class p ks 768 * @param start the lower bound of the range of subscriptions 769 * @param end the upper bound of the range of subscriptions (not inclusive) 770 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 771 * @return the ordered range of matching subscriptions 772 */ 773 public static List<Subscription> findByC_U_C_C(long companyId, long userId, 774 long classNameId, long[] classPKs, int start, int end, 775 OrderByComparator<Subscription> orderByComparator) { 776 return getPersistence() 777 .findByC_U_C_C(companyId, userId, classNameId, classPKs, 778 start, end, orderByComparator); 779 } 780 781 /** 782 * Returns the subscription where companyId = ? and userId = ? and classNameId = ? and classPK = ? or throws a {@link NoSuchSubscriptionException} if it could not be found. 783 * 784 * @param companyId the company ID 785 * @param userId the user ID 786 * @param classNameId the class name ID 787 * @param classPK the class p k 788 * @return the matching subscription 789 * @throws NoSuchSubscriptionException if a matching subscription could not be found 790 */ 791 public static Subscription findByC_U_C_C(long companyId, long userId, 792 long classNameId, long classPK) 793 throws com.liferay.portal.NoSuchSubscriptionException { 794 return getPersistence() 795 .findByC_U_C_C(companyId, userId, classNameId, classPK); 796 } 797 798 /** 799 * Returns the subscription where companyId = ? and userId = ? and classNameId = ? and classPK = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 800 * 801 * @param companyId the company ID 802 * @param userId the user ID 803 * @param classNameId the class name ID 804 * @param classPK the class p k 805 * @return the matching subscription, or <code>null</code> if a matching subscription could not be found 806 */ 807 public static Subscription fetchByC_U_C_C(long companyId, long userId, 808 long classNameId, long classPK) { 809 return getPersistence() 810 .fetchByC_U_C_C(companyId, userId, classNameId, classPK); 811 } 812 813 /** 814 * Returns the subscription where companyId = ? and userId = ? and classNameId = ? and classPK = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 815 * 816 * @param companyId the company ID 817 * @param userId the user ID 818 * @param classNameId the class name ID 819 * @param classPK the class p k 820 * @param retrieveFromCache whether to use the finder cache 821 * @return the matching subscription, or <code>null</code> if a matching subscription could not be found 822 */ 823 public static Subscription fetchByC_U_C_C(long companyId, long userId, 824 long classNameId, long classPK, boolean retrieveFromCache) { 825 return getPersistence() 826 .fetchByC_U_C_C(companyId, userId, classNameId, classPK, 827 retrieveFromCache); 828 } 829 830 /** 831 * Removes the subscription where companyId = ? and userId = ? and classNameId = ? and classPK = ? from the database. 832 * 833 * @param companyId the company ID 834 * @param userId the user ID 835 * @param classNameId the class name ID 836 * @param classPK the class p k 837 * @return the subscription that was removed 838 */ 839 public static Subscription removeByC_U_C_C(long companyId, long userId, 840 long classNameId, long classPK) 841 throws com.liferay.portal.NoSuchSubscriptionException { 842 return getPersistence() 843 .removeByC_U_C_C(companyId, userId, classNameId, classPK); 844 } 845 846 /** 847 * Returns the number of subscriptions where companyId = ? and userId = ? and classNameId = ? and classPK = ?. 848 * 849 * @param companyId the company ID 850 * @param userId the user ID 851 * @param classNameId the class name ID 852 * @param classPK the class p k 853 * @return the number of matching subscriptions 854 */ 855 public static int countByC_U_C_C(long companyId, long userId, 856 long classNameId, long classPK) { 857 return getPersistence() 858 .countByC_U_C_C(companyId, userId, classNameId, classPK); 859 } 860 861 /** 862 * Returns the number of subscriptions where companyId = ? and userId = ? and classNameId = ? and classPK = any ?. 863 * 864 * @param companyId the company ID 865 * @param userId the user ID 866 * @param classNameId the class name ID 867 * @param classPKs the class p ks 868 * @return the number of matching subscriptions 869 */ 870 public static int countByC_U_C_C(long companyId, long userId, 871 long classNameId, long[] classPKs) { 872 return getPersistence() 873 .countByC_U_C_C(companyId, userId, classNameId, classPKs); 874 } 875 876 /** 877 * Caches the subscription in the entity cache if it is enabled. 878 * 879 * @param subscription the subscription 880 */ 881 public static void cacheResult(Subscription subscription) { 882 getPersistence().cacheResult(subscription); 883 } 884 885 /** 886 * Caches the subscriptions in the entity cache if it is enabled. 887 * 888 * @param subscriptions the subscriptions 889 */ 890 public static void cacheResult(List<Subscription> subscriptions) { 891 getPersistence().cacheResult(subscriptions); 892 } 893 894 /** 895 * Creates a new subscription with the primary key. Does not add the subscription to the database. 896 * 897 * @param subscriptionId the primary key for the new subscription 898 * @return the new subscription 899 */ 900 public static Subscription create(long subscriptionId) { 901 return getPersistence().create(subscriptionId); 902 } 903 904 /** 905 * Removes the subscription with the primary key from the database. Also notifies the appropriate model listeners. 906 * 907 * @param subscriptionId the primary key of the subscription 908 * @return the subscription that was removed 909 * @throws NoSuchSubscriptionException if a subscription with the primary key could not be found 910 */ 911 public static Subscription remove(long subscriptionId) 912 throws com.liferay.portal.NoSuchSubscriptionException { 913 return getPersistence().remove(subscriptionId); 914 } 915 916 public static Subscription updateImpl(Subscription subscription) { 917 return getPersistence().updateImpl(subscription); 918 } 919 920 /** 921 * Returns the subscription with the primary key or throws a {@link NoSuchSubscriptionException} if it could not be found. 922 * 923 * @param subscriptionId the primary key of the subscription 924 * @return the subscription 925 * @throws NoSuchSubscriptionException if a subscription with the primary key could not be found 926 */ 927 public static Subscription findByPrimaryKey(long subscriptionId) 928 throws com.liferay.portal.NoSuchSubscriptionException { 929 return getPersistence().findByPrimaryKey(subscriptionId); 930 } 931 932 /** 933 * Returns the subscription with the primary key or returns <code>null</code> if it could not be found. 934 * 935 * @param subscriptionId the primary key of the subscription 936 * @return the subscription, or <code>null</code> if a subscription with the primary key could not be found 937 */ 938 public static Subscription fetchByPrimaryKey(long subscriptionId) { 939 return getPersistence().fetchByPrimaryKey(subscriptionId); 940 } 941 942 public static java.util.Map<java.io.Serializable, Subscription> fetchByPrimaryKeys( 943 java.util.Set<java.io.Serializable> primaryKeys) { 944 return getPersistence().fetchByPrimaryKeys(primaryKeys); 945 } 946 947 /** 948 * Returns all the subscriptions. 949 * 950 * @return the subscriptions 951 */ 952 public static List<Subscription> findAll() { 953 return getPersistence().findAll(); 954 } 955 956 /** 957 * Returns a range of all the subscriptions. 958 * 959 * <p> 960 * 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 SubscriptionModelImpl}. 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. 961 * </p> 962 * 963 * @param start the lower bound of the range of subscriptions 964 * @param end the upper bound of the range of subscriptions (not inclusive) 965 * @return the range of subscriptions 966 */ 967 public static List<Subscription> findAll(int start, int end) { 968 return getPersistence().findAll(start, end); 969 } 970 971 /** 972 * Returns an ordered range of all the subscriptions. 973 * 974 * <p> 975 * 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 SubscriptionModelImpl}. 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. 976 * </p> 977 * 978 * @param start the lower bound of the range of subscriptions 979 * @param end the upper bound of the range of subscriptions (not inclusive) 980 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 981 * @return the ordered range of subscriptions 982 */ 983 public static List<Subscription> findAll(int start, int end, 984 OrderByComparator<Subscription> orderByComparator) { 985 return getPersistence().findAll(start, end, orderByComparator); 986 } 987 988 /** 989 * Removes all the subscriptions from the database. 990 */ 991 public static void removeAll() { 992 getPersistence().removeAll(); 993 } 994 995 /** 996 * Returns the number of subscriptions. 997 * 998 * @return the number of subscriptions 999 */ 1000 public static int countAll() { 1001 return getPersistence().countAll(); 1002 } 1003 1004 public static SubscriptionPersistence getPersistence() { 1005 if (_persistence == null) { 1006 _persistence = (SubscriptionPersistence)PortalBeanLocatorUtil.locate(SubscriptionPersistence.class.getName()); 1007 1008 ReferenceRegistry.registerReference(SubscriptionUtil.class, 1009 "_persistence"); 1010 } 1011 1012 return _persistence; 1013 } 1014 1015 /** 1016 * @deprecated As of 6.2.0 1017 */ 1018 @Deprecated 1019 public void setPersistence(SubscriptionPersistence persistence) { 1020 } 1021 1022 private static SubscriptionPersistence _persistence; 1023 }