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