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.Subscription; 022 import com.liferay.portal.service.ServiceContext; 023 024 import java.util.List; 025 026 /** 027 * The persistence utility for the subscription 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 SubscriptionPersistence 035 * @see SubscriptionPersistenceImpl 036 * @generated 037 */ 038 public class SubscriptionUtil { 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(Subscription subscription) { 050 getPersistence().clearCache(subscription); 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<Subscription> 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<Subscription> 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<Subscription> 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 Subscription remove(Subscription subscription) 093 throws SystemException { 094 return getPersistence().remove(subscription); 095 } 096 097 /** 098 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean) 099 */ 100 public static Subscription update(Subscription subscription, boolean merge) 101 throws SystemException { 102 return getPersistence().update(subscription, merge); 103 } 104 105 /** 106 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext) 107 */ 108 public static Subscription update(Subscription subscription, boolean merge, 109 ServiceContext serviceContext) throws SystemException { 110 return getPersistence().update(subscription, merge, serviceContext); 111 } 112 113 /** 114 * Caches the subscription in the entity cache if it is enabled. 115 * 116 * @param subscription the subscription to cache 117 */ 118 public static void cacheResult( 119 com.liferay.portal.model.Subscription subscription) { 120 getPersistence().cacheResult(subscription); 121 } 122 123 /** 124 * Caches the subscriptions in the entity cache if it is enabled. 125 * 126 * @param subscriptions the subscriptions to cache 127 */ 128 public static void cacheResult( 129 java.util.List<com.liferay.portal.model.Subscription> subscriptions) { 130 getPersistence().cacheResult(subscriptions); 131 } 132 133 /** 134 * Creates a new subscription with the primary key. 135 * 136 * @param subscriptionId the primary key for the new subscription 137 * @return the new subscription 138 */ 139 public static com.liferay.portal.model.Subscription create( 140 long subscriptionId) { 141 return getPersistence().create(subscriptionId); 142 } 143 144 /** 145 * Removes the subscription with the primary key from the database. Also notifies the appropriate model listeners. 146 * 147 * @param subscriptionId the primary key of the subscription to remove 148 * @return the subscription that was removed 149 * @throws com.liferay.portal.NoSuchSubscriptionException if a subscription with the primary key could not be found 150 * @throws SystemException if a system exception occurred 151 */ 152 public static com.liferay.portal.model.Subscription remove( 153 long subscriptionId) 154 throws com.liferay.portal.NoSuchSubscriptionException, 155 com.liferay.portal.kernel.exception.SystemException { 156 return getPersistence().remove(subscriptionId); 157 } 158 159 public static com.liferay.portal.model.Subscription updateImpl( 160 com.liferay.portal.model.Subscription subscription, boolean merge) 161 throws com.liferay.portal.kernel.exception.SystemException { 162 return getPersistence().updateImpl(subscription, merge); 163 } 164 165 /** 166 * Finds the subscription with the primary key or throws a {@link com.liferay.portal.NoSuchSubscriptionException} if it could not be found. 167 * 168 * @param subscriptionId the primary key of the subscription to find 169 * @return the subscription 170 * @throws com.liferay.portal.NoSuchSubscriptionException if a subscription with the primary key could not be found 171 * @throws SystemException if a system exception occurred 172 */ 173 public static com.liferay.portal.model.Subscription findByPrimaryKey( 174 long subscriptionId) 175 throws com.liferay.portal.NoSuchSubscriptionException, 176 com.liferay.portal.kernel.exception.SystemException { 177 return getPersistence().findByPrimaryKey(subscriptionId); 178 } 179 180 /** 181 * Finds the subscription with the primary key or returns <code>null</code> if it could not be found. 182 * 183 * @param subscriptionId the primary key of the subscription to find 184 * @return the subscription, or <code>null</code> if a subscription with the primary key could not be found 185 * @throws SystemException if a system exception occurred 186 */ 187 public static com.liferay.portal.model.Subscription fetchByPrimaryKey( 188 long subscriptionId) 189 throws com.liferay.portal.kernel.exception.SystemException { 190 return getPersistence().fetchByPrimaryKey(subscriptionId); 191 } 192 193 /** 194 * Finds all the subscriptions where userId = ?. 195 * 196 * @param userId the user id to search with 197 * @return the matching subscriptions 198 * @throws SystemException if a system exception occurred 199 */ 200 public static java.util.List<com.liferay.portal.model.Subscription> findByUserId( 201 long userId) throws com.liferay.portal.kernel.exception.SystemException { 202 return getPersistence().findByUserId(userId); 203 } 204 205 /** 206 * Finds a range of all the subscriptions where userId = ?. 207 * 208 * <p> 209 * 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. 210 * </p> 211 * 212 * @param userId the user id to search with 213 * @param start the lower bound of the range of subscriptions to return 214 * @param end the upper bound of the range of subscriptions to return (not inclusive) 215 * @return the range of matching subscriptions 216 * @throws SystemException if a system exception occurred 217 */ 218 public static java.util.List<com.liferay.portal.model.Subscription> findByUserId( 219 long userId, int start, int end) 220 throws com.liferay.portal.kernel.exception.SystemException { 221 return getPersistence().findByUserId(userId, start, end); 222 } 223 224 /** 225 * Finds an ordered range of all the subscriptions where userId = ?. 226 * 227 * <p> 228 * 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. 229 * </p> 230 * 231 * @param userId the user id to search with 232 * @param start the lower bound of the range of subscriptions to return 233 * @param end the upper bound of the range of subscriptions to return (not inclusive) 234 * @param orderByComparator the comparator to order the results by 235 * @return the ordered range of matching subscriptions 236 * @throws SystemException if a system exception occurred 237 */ 238 public static java.util.List<com.liferay.portal.model.Subscription> findByUserId( 239 long userId, int start, int end, 240 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 241 throws com.liferay.portal.kernel.exception.SystemException { 242 return getPersistence() 243 .findByUserId(userId, start, end, orderByComparator); 244 } 245 246 /** 247 * Finds the first subscription in the ordered set where userId = ?. 248 * 249 * <p> 250 * 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. 251 * </p> 252 * 253 * @param userId the user id to search with 254 * @param orderByComparator the comparator to order the set by 255 * @return the first matching subscription 256 * @throws com.liferay.portal.NoSuchSubscriptionException if a matching subscription could not be found 257 * @throws SystemException if a system exception occurred 258 */ 259 public static com.liferay.portal.model.Subscription findByUserId_First( 260 long userId, 261 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 262 throws com.liferay.portal.NoSuchSubscriptionException, 263 com.liferay.portal.kernel.exception.SystemException { 264 return getPersistence().findByUserId_First(userId, orderByComparator); 265 } 266 267 /** 268 * Finds the last subscription in the ordered set where userId = ?. 269 * 270 * <p> 271 * 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. 272 * </p> 273 * 274 * @param userId the user id to search with 275 * @param orderByComparator the comparator to order the set by 276 * @return the last matching subscription 277 * @throws com.liferay.portal.NoSuchSubscriptionException if a matching subscription could not be found 278 * @throws SystemException if a system exception occurred 279 */ 280 public static com.liferay.portal.model.Subscription findByUserId_Last( 281 long userId, 282 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 283 throws com.liferay.portal.NoSuchSubscriptionException, 284 com.liferay.portal.kernel.exception.SystemException { 285 return getPersistence().findByUserId_Last(userId, orderByComparator); 286 } 287 288 /** 289 * Finds the subscriptions before and after the current subscription in the ordered set where userId = ?. 290 * 291 * <p> 292 * 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. 293 * </p> 294 * 295 * @param subscriptionId the primary key of the current subscription 296 * @param userId the user id to search with 297 * @param orderByComparator the comparator to order the set by 298 * @return the previous, current, and next subscription 299 * @throws com.liferay.portal.NoSuchSubscriptionException if a subscription with the primary key could not be found 300 * @throws SystemException if a system exception occurred 301 */ 302 public static com.liferay.portal.model.Subscription[] findByUserId_PrevAndNext( 303 long subscriptionId, long userId, 304 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 305 throws com.liferay.portal.NoSuchSubscriptionException, 306 com.liferay.portal.kernel.exception.SystemException { 307 return getPersistence() 308 .findByUserId_PrevAndNext(subscriptionId, userId, 309 orderByComparator); 310 } 311 312 /** 313 * Finds all the subscriptions where userId = ? and classNameId = ?. 314 * 315 * @param userId the user id to search with 316 * @param classNameId the class name id to search with 317 * @return the matching subscriptions 318 * @throws SystemException if a system exception occurred 319 */ 320 public static java.util.List<com.liferay.portal.model.Subscription> findByU_C( 321 long userId, long classNameId) 322 throws com.liferay.portal.kernel.exception.SystemException { 323 return getPersistence().findByU_C(userId, classNameId); 324 } 325 326 /** 327 * Finds a range of all the subscriptions where userId = ? and classNameId = ?. 328 * 329 * <p> 330 * 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. 331 * </p> 332 * 333 * @param userId the user id to search with 334 * @param classNameId the class name id to search with 335 * @param start the lower bound of the range of subscriptions to return 336 * @param end the upper bound of the range of subscriptions to return (not inclusive) 337 * @return the range of matching subscriptions 338 * @throws SystemException if a system exception occurred 339 */ 340 public static java.util.List<com.liferay.portal.model.Subscription> findByU_C( 341 long userId, long classNameId, int start, int end) 342 throws com.liferay.portal.kernel.exception.SystemException { 343 return getPersistence().findByU_C(userId, classNameId, start, end); 344 } 345 346 /** 347 * Finds an ordered range of all the subscriptions where userId = ? and classNameId = ?. 348 * 349 * <p> 350 * 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. 351 * </p> 352 * 353 * @param userId the user id to search with 354 * @param classNameId the class name id to search with 355 * @param start the lower bound of the range of subscriptions to return 356 * @param end the upper bound of the range of subscriptions to return (not inclusive) 357 * @param orderByComparator the comparator to order the results by 358 * @return the ordered range of matching subscriptions 359 * @throws SystemException if a system exception occurred 360 */ 361 public static java.util.List<com.liferay.portal.model.Subscription> findByU_C( 362 long userId, long classNameId, int start, int end, 363 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 364 throws com.liferay.portal.kernel.exception.SystemException { 365 return getPersistence() 366 .findByU_C(userId, classNameId, start, end, orderByComparator); 367 } 368 369 /** 370 * Finds the first subscription in the ordered set where userId = ? and classNameId = ?. 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 classNameId the class name id to search with 378 * @param orderByComparator the comparator to order the set by 379 * @return the first matching subscription 380 * @throws com.liferay.portal.NoSuchSubscriptionException if a matching subscription could not be found 381 * @throws SystemException if a system exception occurred 382 */ 383 public static com.liferay.portal.model.Subscription findByU_C_First( 384 long userId, long classNameId, 385 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 386 throws com.liferay.portal.NoSuchSubscriptionException, 387 com.liferay.portal.kernel.exception.SystemException { 388 return getPersistence() 389 .findByU_C_First(userId, classNameId, orderByComparator); 390 } 391 392 /** 393 * Finds the last subscription in the ordered set where userId = ? and classNameId = ?. 394 * 395 * <p> 396 * 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. 397 * </p> 398 * 399 * @param userId the user id to search with 400 * @param classNameId the class name id to search with 401 * @param orderByComparator the comparator to order the set by 402 * @return the last matching subscription 403 * @throws com.liferay.portal.NoSuchSubscriptionException if a matching subscription could not be found 404 * @throws SystemException if a system exception occurred 405 */ 406 public static com.liferay.portal.model.Subscription findByU_C_Last( 407 long userId, long classNameId, 408 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 409 throws com.liferay.portal.NoSuchSubscriptionException, 410 com.liferay.portal.kernel.exception.SystemException { 411 return getPersistence() 412 .findByU_C_Last(userId, classNameId, orderByComparator); 413 } 414 415 /** 416 * Finds the subscriptions before and after the current subscription in the ordered set where userId = ? and classNameId = ?. 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 subscriptionId the primary key of the current subscription 423 * @param userId the user id to search with 424 * @param classNameId the class name id to search with 425 * @param orderByComparator the comparator to order the set by 426 * @return the previous, current, and next subscription 427 * @throws com.liferay.portal.NoSuchSubscriptionException if a subscription with the primary key could not be found 428 * @throws SystemException if a system exception occurred 429 */ 430 public static com.liferay.portal.model.Subscription[] findByU_C_PrevAndNext( 431 long subscriptionId, long userId, long classNameId, 432 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 433 throws com.liferay.portal.NoSuchSubscriptionException, 434 com.liferay.portal.kernel.exception.SystemException { 435 return getPersistence() 436 .findByU_C_PrevAndNext(subscriptionId, userId, classNameId, 437 orderByComparator); 438 } 439 440 /** 441 * Finds all the subscriptions where companyId = ? and classNameId = ? and classPK = ?. 442 * 443 * @param companyId the company id to search with 444 * @param classNameId the class name id to search with 445 * @param classPK the class p k to search with 446 * @return the matching subscriptions 447 * @throws SystemException if a system exception occurred 448 */ 449 public static java.util.List<com.liferay.portal.model.Subscription> findByC_C_C( 450 long companyId, long classNameId, long classPK) 451 throws com.liferay.portal.kernel.exception.SystemException { 452 return getPersistence().findByC_C_C(companyId, classNameId, classPK); 453 } 454 455 /** 456 * Finds a range of all the subscriptions where companyId = ? and classNameId = ? and classPK = ?. 457 * 458 * <p> 459 * 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. 460 * </p> 461 * 462 * @param companyId the company id to search with 463 * @param classNameId the class name id to search with 464 * @param classPK the class p k to search with 465 * @param start the lower bound of the range of subscriptions to return 466 * @param end the upper bound of the range of subscriptions to return (not inclusive) 467 * @return the range of matching subscriptions 468 * @throws SystemException if a system exception occurred 469 */ 470 public static java.util.List<com.liferay.portal.model.Subscription> findByC_C_C( 471 long companyId, long classNameId, long classPK, int start, int end) 472 throws com.liferay.portal.kernel.exception.SystemException { 473 return getPersistence() 474 .findByC_C_C(companyId, classNameId, classPK, start, end); 475 } 476 477 /** 478 * Finds an ordered range of all the subscriptions where companyId = ? and classNameId = ? and classPK = ?. 479 * 480 * <p> 481 * 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. 482 * </p> 483 * 484 * @param companyId the company id to search with 485 * @param classNameId the class name id to search with 486 * @param classPK the class p k to search with 487 * @param start the lower bound of the range of subscriptions to return 488 * @param end the upper bound of the range of subscriptions to return (not inclusive) 489 * @param orderByComparator the comparator to order the results by 490 * @return the ordered range of matching subscriptions 491 * @throws SystemException if a system exception occurred 492 */ 493 public static java.util.List<com.liferay.portal.model.Subscription> findByC_C_C( 494 long companyId, long classNameId, long classPK, int start, int end, 495 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 496 throws com.liferay.portal.kernel.exception.SystemException { 497 return getPersistence() 498 .findByC_C_C(companyId, classNameId, classPK, start, end, 499 orderByComparator); 500 } 501 502 /** 503 * Finds the first subscription in the ordered set where companyId = ? and classNameId = ? and classPK = ?. 504 * 505 * <p> 506 * 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. 507 * </p> 508 * 509 * @param companyId the company id to search with 510 * @param classNameId the class name id to search with 511 * @param classPK the class p k to search with 512 * @param orderByComparator the comparator to order the set by 513 * @return the first matching subscription 514 * @throws com.liferay.portal.NoSuchSubscriptionException if a matching subscription could not be found 515 * @throws SystemException if a system exception occurred 516 */ 517 public static com.liferay.portal.model.Subscription findByC_C_C_First( 518 long companyId, long classNameId, long classPK, 519 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 520 throws com.liferay.portal.NoSuchSubscriptionException, 521 com.liferay.portal.kernel.exception.SystemException { 522 return getPersistence() 523 .findByC_C_C_First(companyId, classNameId, classPK, 524 orderByComparator); 525 } 526 527 /** 528 * Finds the last subscription in the ordered set where companyId = ? and classNameId = ? and classPK = ?. 529 * 530 * <p> 531 * 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. 532 * </p> 533 * 534 * @param companyId the company id to search with 535 * @param classNameId the class name id to search with 536 * @param classPK the class p k to search with 537 * @param orderByComparator the comparator to order the set by 538 * @return the last matching subscription 539 * @throws com.liferay.portal.NoSuchSubscriptionException if a matching subscription could not be found 540 * @throws SystemException if a system exception occurred 541 */ 542 public static com.liferay.portal.model.Subscription findByC_C_C_Last( 543 long companyId, long classNameId, long classPK, 544 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 545 throws com.liferay.portal.NoSuchSubscriptionException, 546 com.liferay.portal.kernel.exception.SystemException { 547 return getPersistence() 548 .findByC_C_C_Last(companyId, classNameId, classPK, 549 orderByComparator); 550 } 551 552 /** 553 * Finds the subscriptions before and after the current subscription in the ordered set where companyId = ? and classNameId = ? and classPK = ?. 554 * 555 * <p> 556 * 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. 557 * </p> 558 * 559 * @param subscriptionId the primary key of the current subscription 560 * @param companyId the company id to search with 561 * @param classNameId the class name id to search with 562 * @param classPK the class p k to search with 563 * @param orderByComparator the comparator to order the set by 564 * @return the previous, current, and next subscription 565 * @throws com.liferay.portal.NoSuchSubscriptionException if a subscription with the primary key could not be found 566 * @throws SystemException if a system exception occurred 567 */ 568 public static com.liferay.portal.model.Subscription[] findByC_C_C_PrevAndNext( 569 long subscriptionId, long companyId, long classNameId, long classPK, 570 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 571 throws com.liferay.portal.NoSuchSubscriptionException, 572 com.liferay.portal.kernel.exception.SystemException { 573 return getPersistence() 574 .findByC_C_C_PrevAndNext(subscriptionId, companyId, 575 classNameId, classPK, orderByComparator); 576 } 577 578 /** 579 * Finds the subscription where companyId = ? and userId = ? and classNameId = ? and classPK = ? or throws a {@link com.liferay.portal.NoSuchSubscriptionException} if it could not be found. 580 * 581 * @param companyId the company id to search with 582 * @param userId the user id to search with 583 * @param classNameId the class name id to search with 584 * @param classPK the class p k to search with 585 * @return the matching subscription 586 * @throws com.liferay.portal.NoSuchSubscriptionException if a matching subscription could not be found 587 * @throws SystemException if a system exception occurred 588 */ 589 public static com.liferay.portal.model.Subscription findByC_U_C_C( 590 long companyId, long userId, long classNameId, long classPK) 591 throws com.liferay.portal.NoSuchSubscriptionException, 592 com.liferay.portal.kernel.exception.SystemException { 593 return getPersistence() 594 .findByC_U_C_C(companyId, userId, classNameId, classPK); 595 } 596 597 /** 598 * Finds 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. 599 * 600 * @param companyId the company id to search with 601 * @param userId the user id to search with 602 * @param classNameId the class name id to search with 603 * @param classPK the class p k to search with 604 * @return the matching subscription, or <code>null</code> if a matching subscription could not be found 605 * @throws SystemException if a system exception occurred 606 */ 607 public static com.liferay.portal.model.Subscription fetchByC_U_C_C( 608 long companyId, long userId, long classNameId, long classPK) 609 throws com.liferay.portal.kernel.exception.SystemException { 610 return getPersistence() 611 .fetchByC_U_C_C(companyId, userId, classNameId, classPK); 612 } 613 614 /** 615 * Finds 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. 616 * 617 * @param companyId the company id to search with 618 * @param userId the user id to search with 619 * @param classNameId the class name id to search with 620 * @param classPK the class p k to search with 621 * @return the matching subscription, or <code>null</code> if a matching subscription could not be found 622 * @throws SystemException if a system exception occurred 623 */ 624 public static com.liferay.portal.model.Subscription fetchByC_U_C_C( 625 long companyId, long userId, long classNameId, long classPK, 626 boolean retrieveFromCache) 627 throws com.liferay.portal.kernel.exception.SystemException { 628 return getPersistence() 629 .fetchByC_U_C_C(companyId, userId, classNameId, classPK, 630 retrieveFromCache); 631 } 632 633 /** 634 * Finds all the subscriptions. 635 * 636 * @return the subscriptions 637 * @throws SystemException if a system exception occurred 638 */ 639 public static java.util.List<com.liferay.portal.model.Subscription> findAll() 640 throws com.liferay.portal.kernel.exception.SystemException { 641 return getPersistence().findAll(); 642 } 643 644 /** 645 * Finds a range of all the subscriptions. 646 * 647 * <p> 648 * 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. 649 * </p> 650 * 651 * @param start the lower bound of the range of subscriptions to return 652 * @param end the upper bound of the range of subscriptions to return (not inclusive) 653 * @return the range of subscriptions 654 * @throws SystemException if a system exception occurred 655 */ 656 public static java.util.List<com.liferay.portal.model.Subscription> findAll( 657 int start, int end) 658 throws com.liferay.portal.kernel.exception.SystemException { 659 return getPersistence().findAll(start, end); 660 } 661 662 /** 663 * Finds an ordered range of all the subscriptions. 664 * 665 * <p> 666 * 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. 667 * </p> 668 * 669 * @param start the lower bound of the range of subscriptions to return 670 * @param end the upper bound of the range of subscriptions to return (not inclusive) 671 * @param orderByComparator the comparator to order the results by 672 * @return the ordered range of subscriptions 673 * @throws SystemException if a system exception occurred 674 */ 675 public static java.util.List<com.liferay.portal.model.Subscription> findAll( 676 int start, int end, 677 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 678 throws com.liferay.portal.kernel.exception.SystemException { 679 return getPersistence().findAll(start, end, orderByComparator); 680 } 681 682 /** 683 * Removes all the subscriptions where userId = ? from the database. 684 * 685 * @param userId the user id to search with 686 * @throws SystemException if a system exception occurred 687 */ 688 public static void removeByUserId(long userId) 689 throws com.liferay.portal.kernel.exception.SystemException { 690 getPersistence().removeByUserId(userId); 691 } 692 693 /** 694 * Removes all the subscriptions where userId = ? and classNameId = ? from the database. 695 * 696 * @param userId the user id to search with 697 * @param classNameId the class name id to search with 698 * @throws SystemException if a system exception occurred 699 */ 700 public static void removeByU_C(long userId, long classNameId) 701 throws com.liferay.portal.kernel.exception.SystemException { 702 getPersistence().removeByU_C(userId, classNameId); 703 } 704 705 /** 706 * Removes all the subscriptions where companyId = ? and classNameId = ? and classPK = ? from the database. 707 * 708 * @param companyId the company id to search with 709 * @param classNameId the class name id to search with 710 * @param classPK the class p k to search with 711 * @throws SystemException if a system exception occurred 712 */ 713 public static void removeByC_C_C(long companyId, long classNameId, 714 long classPK) 715 throws com.liferay.portal.kernel.exception.SystemException { 716 getPersistence().removeByC_C_C(companyId, classNameId, classPK); 717 } 718 719 /** 720 * Removes the subscription where companyId = ? and userId = ? and classNameId = ? and classPK = ? from the database. 721 * 722 * @param companyId the company id to search with 723 * @param userId the user id to search with 724 * @param classNameId the class name id to search with 725 * @param classPK the class p k to search with 726 * @throws SystemException if a system exception occurred 727 */ 728 public static void removeByC_U_C_C(long companyId, long userId, 729 long classNameId, long classPK) 730 throws com.liferay.portal.NoSuchSubscriptionException, 731 com.liferay.portal.kernel.exception.SystemException { 732 getPersistence().removeByC_U_C_C(companyId, userId, classNameId, classPK); 733 } 734 735 /** 736 * Removes all the subscriptions from the database. 737 * 738 * @throws SystemException if a system exception occurred 739 */ 740 public static void removeAll() 741 throws com.liferay.portal.kernel.exception.SystemException { 742 getPersistence().removeAll(); 743 } 744 745 /** 746 * Counts all the subscriptions where userId = ?. 747 * 748 * @param userId the user id to search with 749 * @return the number of matching subscriptions 750 * @throws SystemException if a system exception occurred 751 */ 752 public static int countByUserId(long userId) 753 throws com.liferay.portal.kernel.exception.SystemException { 754 return getPersistence().countByUserId(userId); 755 } 756 757 /** 758 * Counts all the subscriptions where userId = ? and classNameId = ?. 759 * 760 * @param userId the user id to search with 761 * @param classNameId the class name id to search with 762 * @return the number of matching subscriptions 763 * @throws SystemException if a system exception occurred 764 */ 765 public static int countByU_C(long userId, long classNameId) 766 throws com.liferay.portal.kernel.exception.SystemException { 767 return getPersistence().countByU_C(userId, classNameId); 768 } 769 770 /** 771 * Counts all the subscriptions where companyId = ? and classNameId = ? and classPK = ?. 772 * 773 * @param companyId the company id to search with 774 * @param classNameId the class name id to search with 775 * @param classPK the class p k to search with 776 * @return the number of matching subscriptions 777 * @throws SystemException if a system exception occurred 778 */ 779 public static int countByC_C_C(long companyId, long classNameId, 780 long classPK) 781 throws com.liferay.portal.kernel.exception.SystemException { 782 return getPersistence().countByC_C_C(companyId, classNameId, classPK); 783 } 784 785 /** 786 * Counts all the subscriptions where companyId = ? and userId = ? and classNameId = ? and classPK = ?. 787 * 788 * @param companyId the company id to search with 789 * @param userId the user id to search with 790 * @param classNameId the class name id to search with 791 * @param classPK the class p k to search with 792 * @return the number of matching subscriptions 793 * @throws SystemException if a system exception occurred 794 */ 795 public static int countByC_U_C_C(long companyId, long userId, 796 long classNameId, long classPK) 797 throws com.liferay.portal.kernel.exception.SystemException { 798 return getPersistence() 799 .countByC_U_C_C(companyId, userId, classNameId, classPK); 800 } 801 802 /** 803 * Counts all the subscriptions. 804 * 805 * @return the number of subscriptions 806 * @throws SystemException if a system exception occurred 807 */ 808 public static int countAll() 809 throws com.liferay.portal.kernel.exception.SystemException { 810 return getPersistence().countAll(); 811 } 812 813 public static SubscriptionPersistence getPersistence() { 814 if (_persistence == null) { 815 _persistence = (SubscriptionPersistence)PortalBeanLocatorUtil.locate(SubscriptionPersistence.class.getName()); 816 } 817 818 return _persistence; 819 } 820 821 public void setPersistence(SubscriptionPersistence persistence) { 822 _persistence = persistence; 823 } 824 825 private static SubscriptionPersistence _persistence; 826 }