001 /** 002 * Copyright (c) 2000-2012 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.model.Subscription; 018 019 /** 020 * The persistence interface for the subscription service. 021 * 022 * <p> 023 * Caching information and settings can be found in <code>portal.properties</code> 024 * </p> 025 * 026 * @author Brian Wing Shun Chan 027 * @see SubscriptionPersistenceImpl 028 * @see SubscriptionUtil 029 * @generated 030 */ 031 public interface SubscriptionPersistence extends BasePersistence<Subscription> { 032 /* 033 * NOTE FOR DEVELOPERS: 034 * 035 * Never modify or reference this interface directly. Always use {@link SubscriptionUtil} to access the subscription persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface. 036 */ 037 038 /** 039 * Caches the subscription in the entity cache if it is enabled. 040 * 041 * @param subscription the subscription 042 */ 043 public void cacheResult(com.liferay.portal.model.Subscription subscription); 044 045 /** 046 * Caches the subscriptions in the entity cache if it is enabled. 047 * 048 * @param subscriptions the subscriptions 049 */ 050 public void cacheResult( 051 java.util.List<com.liferay.portal.model.Subscription> subscriptions); 052 053 /** 054 * Creates a new subscription with the primary key. Does not add the subscription to the database. 055 * 056 * @param subscriptionId the primary key for the new subscription 057 * @return the new subscription 058 */ 059 public com.liferay.portal.model.Subscription create(long subscriptionId); 060 061 /** 062 * Removes the subscription with the primary key from the database. Also notifies the appropriate model listeners. 063 * 064 * @param subscriptionId the primary key of the subscription 065 * @return the subscription that was removed 066 * @throws com.liferay.portal.NoSuchSubscriptionException if a subscription with the primary key could not be found 067 * @throws SystemException if a system exception occurred 068 */ 069 public com.liferay.portal.model.Subscription remove(long subscriptionId) 070 throws com.liferay.portal.NoSuchSubscriptionException, 071 com.liferay.portal.kernel.exception.SystemException; 072 073 public com.liferay.portal.model.Subscription updateImpl( 074 com.liferay.portal.model.Subscription subscription, boolean merge) 075 throws com.liferay.portal.kernel.exception.SystemException; 076 077 /** 078 * Returns the subscription with the primary key or throws a {@link com.liferay.portal.NoSuchSubscriptionException} if it could not be found. 079 * 080 * @param subscriptionId the primary key of the subscription 081 * @return the subscription 082 * @throws com.liferay.portal.NoSuchSubscriptionException if a subscription with the primary key could not be found 083 * @throws SystemException if a system exception occurred 084 */ 085 public com.liferay.portal.model.Subscription findByPrimaryKey( 086 long subscriptionId) 087 throws com.liferay.portal.NoSuchSubscriptionException, 088 com.liferay.portal.kernel.exception.SystemException; 089 090 /** 091 * Returns the subscription with the primary key or returns <code>null</code> if it could not be found. 092 * 093 * @param subscriptionId the primary key of the subscription 094 * @return the subscription, or <code>null</code> if a subscription with the primary key could not be found 095 * @throws SystemException if a system exception occurred 096 */ 097 public com.liferay.portal.model.Subscription fetchByPrimaryKey( 098 long subscriptionId) 099 throws com.liferay.portal.kernel.exception.SystemException; 100 101 /** 102 * Returns all the subscriptions where userId = ?. 103 * 104 * @param userId the user ID 105 * @return the matching subscriptions 106 * @throws SystemException if a system exception occurred 107 */ 108 public java.util.List<com.liferay.portal.model.Subscription> findByUserId( 109 long userId) throws com.liferay.portal.kernel.exception.SystemException; 110 111 /** 112 * Returns a range of all the subscriptions where userId = ?. 113 * 114 * <p> 115 * 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. 116 * </p> 117 * 118 * @param userId the user ID 119 * @param start the lower bound of the range of subscriptions 120 * @param end the upper bound of the range of subscriptions (not inclusive) 121 * @return the range of matching subscriptions 122 * @throws SystemException if a system exception occurred 123 */ 124 public java.util.List<com.liferay.portal.model.Subscription> findByUserId( 125 long userId, int start, int end) 126 throws com.liferay.portal.kernel.exception.SystemException; 127 128 /** 129 * Returns an ordered range of all the subscriptions where userId = ?. 130 * 131 * <p> 132 * 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. 133 * </p> 134 * 135 * @param userId the user ID 136 * @param start the lower bound of the range of subscriptions 137 * @param end the upper bound of the range of subscriptions (not inclusive) 138 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 139 * @return the ordered range of matching subscriptions 140 * @throws SystemException if a system exception occurred 141 */ 142 public java.util.List<com.liferay.portal.model.Subscription> findByUserId( 143 long userId, int start, int end, 144 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 145 throws com.liferay.portal.kernel.exception.SystemException; 146 147 /** 148 * Returns the first subscription in the ordered set where userId = ?. 149 * 150 * <p> 151 * 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. 152 * </p> 153 * 154 * @param userId the user ID 155 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 156 * @return the first matching subscription 157 * @throws com.liferay.portal.NoSuchSubscriptionException if a matching subscription could not be found 158 * @throws SystemException if a system exception occurred 159 */ 160 public com.liferay.portal.model.Subscription findByUserId_First( 161 long userId, 162 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 163 throws com.liferay.portal.NoSuchSubscriptionException, 164 com.liferay.portal.kernel.exception.SystemException; 165 166 /** 167 * Returns the last subscription in the ordered set where userId = ?. 168 * 169 * <p> 170 * 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. 171 * </p> 172 * 173 * @param userId the user ID 174 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 175 * @return the last matching subscription 176 * @throws com.liferay.portal.NoSuchSubscriptionException if a matching subscription could not be found 177 * @throws SystemException if a system exception occurred 178 */ 179 public com.liferay.portal.model.Subscription findByUserId_Last( 180 long userId, 181 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 182 throws com.liferay.portal.NoSuchSubscriptionException, 183 com.liferay.portal.kernel.exception.SystemException; 184 185 /** 186 * Returns the subscriptions before and after the current subscription in the ordered set where userId = ?. 187 * 188 * <p> 189 * 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. 190 * </p> 191 * 192 * @param subscriptionId the primary key of the current subscription 193 * @param userId the user ID 194 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 195 * @return the previous, current, and next subscription 196 * @throws com.liferay.portal.NoSuchSubscriptionException if a subscription with the primary key could not be found 197 * @throws SystemException if a system exception occurred 198 */ 199 public com.liferay.portal.model.Subscription[] findByUserId_PrevAndNext( 200 long subscriptionId, long userId, 201 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 202 throws com.liferay.portal.NoSuchSubscriptionException, 203 com.liferay.portal.kernel.exception.SystemException; 204 205 /** 206 * Returns all the subscriptions where userId = ? and classNameId = ?. 207 * 208 * @param userId the user ID 209 * @param classNameId the class name ID 210 * @return the matching subscriptions 211 * @throws SystemException if a system exception occurred 212 */ 213 public java.util.List<com.liferay.portal.model.Subscription> findByU_C( 214 long userId, long classNameId) 215 throws com.liferay.portal.kernel.exception.SystemException; 216 217 /** 218 * Returns a range of all the subscriptions where userId = ? and classNameId = ?. 219 * 220 * <p> 221 * 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. 222 * </p> 223 * 224 * @param userId the user ID 225 * @param classNameId the class name ID 226 * @param start the lower bound of the range of subscriptions 227 * @param end the upper bound of the range of subscriptions (not inclusive) 228 * @return the range of matching subscriptions 229 * @throws SystemException if a system exception occurred 230 */ 231 public java.util.List<com.liferay.portal.model.Subscription> findByU_C( 232 long userId, long classNameId, int start, int end) 233 throws com.liferay.portal.kernel.exception.SystemException; 234 235 /** 236 * Returns an ordered range of all the subscriptions where userId = ? and classNameId = ?. 237 * 238 * <p> 239 * 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. 240 * </p> 241 * 242 * @param userId the user ID 243 * @param classNameId the class name ID 244 * @param start the lower bound of the range of subscriptions 245 * @param end the upper bound of the range of subscriptions (not inclusive) 246 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 247 * @return the ordered range of matching subscriptions 248 * @throws SystemException if a system exception occurred 249 */ 250 public java.util.List<com.liferay.portal.model.Subscription> findByU_C( 251 long userId, long classNameId, int start, int end, 252 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 253 throws com.liferay.portal.kernel.exception.SystemException; 254 255 /** 256 * Returns the first subscription in the ordered set where userId = ? and classNameId = ?. 257 * 258 * <p> 259 * 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. 260 * </p> 261 * 262 * @param userId the user ID 263 * @param classNameId the class name ID 264 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 265 * @return the first matching subscription 266 * @throws com.liferay.portal.NoSuchSubscriptionException if a matching subscription could not be found 267 * @throws SystemException if a system exception occurred 268 */ 269 public com.liferay.portal.model.Subscription findByU_C_First(long userId, 270 long classNameId, 271 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 272 throws com.liferay.portal.NoSuchSubscriptionException, 273 com.liferay.portal.kernel.exception.SystemException; 274 275 /** 276 * Returns the last subscription in the ordered set where userId = ? and classNameId = ?. 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 userId the user ID 283 * @param classNameId the class name ID 284 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 285 * @return the last matching subscription 286 * @throws com.liferay.portal.NoSuchSubscriptionException if a matching subscription could not be found 287 * @throws SystemException if a system exception occurred 288 */ 289 public com.liferay.portal.model.Subscription findByU_C_Last(long userId, 290 long classNameId, 291 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 292 throws com.liferay.portal.NoSuchSubscriptionException, 293 com.liferay.portal.kernel.exception.SystemException; 294 295 /** 296 * Returns the subscriptions before and after the current subscription in the ordered set where userId = ? and classNameId = ?. 297 * 298 * <p> 299 * 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. 300 * </p> 301 * 302 * @param subscriptionId the primary key of the current subscription 303 * @param userId the user ID 304 * @param classNameId the class name ID 305 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 306 * @return the previous, current, and next subscription 307 * @throws com.liferay.portal.NoSuchSubscriptionException if a subscription with the primary key could not be found 308 * @throws SystemException if a system exception occurred 309 */ 310 public com.liferay.portal.model.Subscription[] findByU_C_PrevAndNext( 311 long subscriptionId, long userId, long classNameId, 312 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 313 throws com.liferay.portal.NoSuchSubscriptionException, 314 com.liferay.portal.kernel.exception.SystemException; 315 316 /** 317 * Returns all the subscriptions where companyId = ? and classNameId = ? and classPK = ?. 318 * 319 * @param companyId the company ID 320 * @param classNameId the class name ID 321 * @param classPK the class p k 322 * @return the matching subscriptions 323 * @throws SystemException if a system exception occurred 324 */ 325 public java.util.List<com.liferay.portal.model.Subscription> findByC_C_C( 326 long companyId, long classNameId, long classPK) 327 throws com.liferay.portal.kernel.exception.SystemException; 328 329 /** 330 * Returns a range of all the subscriptions where companyId = ? and classNameId = ? and classPK = ?. 331 * 332 * <p> 333 * 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. 334 * </p> 335 * 336 * @param companyId the company ID 337 * @param classNameId the class name ID 338 * @param classPK the class p k 339 * @param start the lower bound of the range of subscriptions 340 * @param end the upper bound of the range of subscriptions (not inclusive) 341 * @return the range of matching subscriptions 342 * @throws SystemException if a system exception occurred 343 */ 344 public java.util.List<com.liferay.portal.model.Subscription> findByC_C_C( 345 long companyId, long classNameId, long classPK, int start, int end) 346 throws com.liferay.portal.kernel.exception.SystemException; 347 348 /** 349 * Returns an ordered range of all the subscriptions where companyId = ? and classNameId = ? and classPK = ?. 350 * 351 * <p> 352 * 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. 353 * </p> 354 * 355 * @param companyId the company ID 356 * @param classNameId the class name ID 357 * @param classPK the class p k 358 * @param start the lower bound of the range of subscriptions 359 * @param end the upper bound of the range of subscriptions (not inclusive) 360 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 361 * @return the ordered range of matching subscriptions 362 * @throws SystemException if a system exception occurred 363 */ 364 public java.util.List<com.liferay.portal.model.Subscription> findByC_C_C( 365 long companyId, long classNameId, long classPK, int start, int end, 366 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 367 throws com.liferay.portal.kernel.exception.SystemException; 368 369 /** 370 * Returns the first subscription in the ordered set where companyId = ? and classNameId = ? and classPK = ?. 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 companyId the company ID 377 * @param classNameId the class name ID 378 * @param classPK the class p k 379 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 380 * @return the first matching subscription 381 * @throws com.liferay.portal.NoSuchSubscriptionException if a matching subscription could not be found 382 * @throws SystemException if a system exception occurred 383 */ 384 public com.liferay.portal.model.Subscription findByC_C_C_First( 385 long companyId, long classNameId, long classPK, 386 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 387 throws com.liferay.portal.NoSuchSubscriptionException, 388 com.liferay.portal.kernel.exception.SystemException; 389 390 /** 391 * Returns the last subscription in the ordered set where companyId = ? and classNameId = ? and classPK = ?. 392 * 393 * <p> 394 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 395 * </p> 396 * 397 * @param companyId the company ID 398 * @param classNameId the class name ID 399 * @param classPK the class p k 400 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 401 * @return the last matching subscription 402 * @throws com.liferay.portal.NoSuchSubscriptionException if a matching subscription could not be found 403 * @throws SystemException if a system exception occurred 404 */ 405 public com.liferay.portal.model.Subscription findByC_C_C_Last( 406 long companyId, long classNameId, long classPK, 407 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 408 throws com.liferay.portal.NoSuchSubscriptionException, 409 com.liferay.portal.kernel.exception.SystemException; 410 411 /** 412 * Returns the subscriptions before and after the current subscription in the ordered set where companyId = ? and classNameId = ? and classPK = ?. 413 * 414 * <p> 415 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 416 * </p> 417 * 418 * @param subscriptionId the primary key of the current subscription 419 * @param companyId the company ID 420 * @param classNameId the class name ID 421 * @param classPK the class p k 422 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 423 * @return the previous, current, and next subscription 424 * @throws com.liferay.portal.NoSuchSubscriptionException if a subscription with the primary key could not be found 425 * @throws SystemException if a system exception occurred 426 */ 427 public com.liferay.portal.model.Subscription[] findByC_C_C_PrevAndNext( 428 long subscriptionId, long companyId, long classNameId, long classPK, 429 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 430 throws com.liferay.portal.NoSuchSubscriptionException, 431 com.liferay.portal.kernel.exception.SystemException; 432 433 /** 434 * Returns the subscription where companyId = ? and userId = ? and classNameId = ? and classPK = ? or throws a {@link com.liferay.portal.NoSuchSubscriptionException} if it could not be found. 435 * 436 * @param companyId the company ID 437 * @param userId the user ID 438 * @param classNameId the class name ID 439 * @param classPK the class p k 440 * @return the matching subscription 441 * @throws com.liferay.portal.NoSuchSubscriptionException if a matching subscription could not be found 442 * @throws SystemException if a system exception occurred 443 */ 444 public com.liferay.portal.model.Subscription findByC_U_C_C(long companyId, 445 long userId, long classNameId, long classPK) 446 throws com.liferay.portal.NoSuchSubscriptionException, 447 com.liferay.portal.kernel.exception.SystemException; 448 449 /** 450 * 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. 451 * 452 * @param companyId the company ID 453 * @param userId the user ID 454 * @param classNameId the class name ID 455 * @param classPK the class p k 456 * @return the matching subscription, or <code>null</code> if a matching subscription could not be found 457 * @throws SystemException if a system exception occurred 458 */ 459 public com.liferay.portal.model.Subscription fetchByC_U_C_C( 460 long companyId, long userId, long classNameId, long classPK) 461 throws com.liferay.portal.kernel.exception.SystemException; 462 463 /** 464 * 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. 465 * 466 * @param companyId the company ID 467 * @param userId the user ID 468 * @param classNameId the class name ID 469 * @param classPK the class p k 470 * @param retrieveFromCache whether to use the finder cache 471 * @return the matching subscription, or <code>null</code> if a matching subscription could not be found 472 * @throws SystemException if a system exception occurred 473 */ 474 public com.liferay.portal.model.Subscription fetchByC_U_C_C( 475 long companyId, long userId, long classNameId, long classPK, 476 boolean retrieveFromCache) 477 throws com.liferay.portal.kernel.exception.SystemException; 478 479 /** 480 * Returns all the subscriptions. 481 * 482 * @return the subscriptions 483 * @throws SystemException if a system exception occurred 484 */ 485 public java.util.List<com.liferay.portal.model.Subscription> findAll() 486 throws com.liferay.portal.kernel.exception.SystemException; 487 488 /** 489 * Returns a range of all the subscriptions. 490 * 491 * <p> 492 * 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. 493 * </p> 494 * 495 * @param start the lower bound of the range of subscriptions 496 * @param end the upper bound of the range of subscriptions (not inclusive) 497 * @return the range of subscriptions 498 * @throws SystemException if a system exception occurred 499 */ 500 public java.util.List<com.liferay.portal.model.Subscription> findAll( 501 int start, int end) 502 throws com.liferay.portal.kernel.exception.SystemException; 503 504 /** 505 * Returns an ordered range of all the subscriptions. 506 * 507 * <p> 508 * 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. 509 * </p> 510 * 511 * @param start the lower bound of the range of subscriptions 512 * @param end the upper bound of the range of subscriptions (not inclusive) 513 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 514 * @return the ordered range of subscriptions 515 * @throws SystemException if a system exception occurred 516 */ 517 public java.util.List<com.liferay.portal.model.Subscription> findAll( 518 int start, int end, 519 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 520 throws com.liferay.portal.kernel.exception.SystemException; 521 522 /** 523 * Removes all the subscriptions where userId = ? from the database. 524 * 525 * @param userId the user ID 526 * @throws SystemException if a system exception occurred 527 */ 528 public void removeByUserId(long userId) 529 throws com.liferay.portal.kernel.exception.SystemException; 530 531 /** 532 * Removes all the subscriptions where userId = ? and classNameId = ? from the database. 533 * 534 * @param userId the user ID 535 * @param classNameId the class name ID 536 * @throws SystemException if a system exception occurred 537 */ 538 public void removeByU_C(long userId, long classNameId) 539 throws com.liferay.portal.kernel.exception.SystemException; 540 541 /** 542 * Removes all the subscriptions where companyId = ? and classNameId = ? and classPK = ? from the database. 543 * 544 * @param companyId the company ID 545 * @param classNameId the class name ID 546 * @param classPK the class p k 547 * @throws SystemException if a system exception occurred 548 */ 549 public void removeByC_C_C(long companyId, long classNameId, long classPK) 550 throws com.liferay.portal.kernel.exception.SystemException; 551 552 /** 553 * Removes the subscription where companyId = ? and userId = ? and classNameId = ? and classPK = ? from the database. 554 * 555 * @param companyId the company ID 556 * @param userId the user ID 557 * @param classNameId the class name ID 558 * @param classPK the class p k 559 * @throws SystemException if a system exception occurred 560 */ 561 public void removeByC_U_C_C(long companyId, long userId, long classNameId, 562 long classPK) 563 throws com.liferay.portal.NoSuchSubscriptionException, 564 com.liferay.portal.kernel.exception.SystemException; 565 566 /** 567 * Removes all the subscriptions from the database. 568 * 569 * @throws SystemException if a system exception occurred 570 */ 571 public void removeAll() 572 throws com.liferay.portal.kernel.exception.SystemException; 573 574 /** 575 * Returns the number of subscriptions where userId = ?. 576 * 577 * @param userId the user ID 578 * @return the number of matching subscriptions 579 * @throws SystemException if a system exception occurred 580 */ 581 public int countByUserId(long userId) 582 throws com.liferay.portal.kernel.exception.SystemException; 583 584 /** 585 * Returns the number of subscriptions where userId = ? and classNameId = ?. 586 * 587 * @param userId the user ID 588 * @param classNameId the class name ID 589 * @return the number of matching subscriptions 590 * @throws SystemException if a system exception occurred 591 */ 592 public int countByU_C(long userId, long classNameId) 593 throws com.liferay.portal.kernel.exception.SystemException; 594 595 /** 596 * Returns the number of subscriptions where companyId = ? and classNameId = ? and classPK = ?. 597 * 598 * @param companyId the company ID 599 * @param classNameId the class name ID 600 * @param classPK the class p k 601 * @return the number of matching subscriptions 602 * @throws SystemException if a system exception occurred 603 */ 604 public int countByC_C_C(long companyId, long classNameId, long classPK) 605 throws com.liferay.portal.kernel.exception.SystemException; 606 607 /** 608 * Returns the number of subscriptions where companyId = ? and userId = ? and classNameId = ? and classPK = ?. 609 * 610 * @param companyId the company ID 611 * @param userId the user ID 612 * @param classNameId the class name ID 613 * @param classPK the class p k 614 * @return the number of matching subscriptions 615 * @throws SystemException if a system exception occurred 616 */ 617 public int countByC_U_C_C(long companyId, long userId, long classNameId, 618 long classPK) 619 throws com.liferay.portal.kernel.exception.SystemException; 620 621 /** 622 * Returns the number of subscriptions. 623 * 624 * @return the number of subscriptions 625 * @throws SystemException if a system exception occurred 626 */ 627 public int countAll() 628 throws com.liferay.portal.kernel.exception.SystemException; 629 }