001 /** 002 * Copyright (c) 2000-present Liferay, Inc. All rights reserved. 003 * 004 * This library is free software; you can redistribute it and/or modify it under 005 * the terms of the GNU Lesser General Public License as published by the Free 006 * Software Foundation; either version 2.1 of the License, or (at your option) 007 * any later version. 008 * 009 * This library is distributed in the hope that it will be useful, but WITHOUT 010 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 011 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 012 * details. 013 */ 014 015 package com.liferay.portal.service.persistence; 016 017 import aQute.bnd.annotation.ProviderType; 018 019 import com.liferay.portal.model.Subscription; 020 021 /** 022 * The persistence interface for the subscription service. 023 * 024 * <p> 025 * Caching information and settings can be found in <code>portal.properties</code> 026 * </p> 027 * 028 * @author Brian Wing Shun Chan 029 * @see com.liferay.portal.service.persistence.impl.SubscriptionPersistenceImpl 030 * @see SubscriptionUtil 031 * @generated 032 */ 033 @ProviderType 034 public interface SubscriptionPersistence extends BasePersistence<Subscription> { 035 /* 036 * NOTE FOR DEVELOPERS: 037 * 038 * 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. 039 */ 040 041 /** 042 * Returns all the subscriptions where userId = ?. 043 * 044 * @param userId the user ID 045 * @return the matching subscriptions 046 */ 047 public java.util.List<Subscription> findByUserId(long userId); 048 049 /** 050 * Returns a range of all the subscriptions where userId = ?. 051 * 052 * <p> 053 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SubscriptionModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 054 * </p> 055 * 056 * @param userId the user ID 057 * @param start the lower bound of the range of subscriptions 058 * @param end the upper bound of the range of subscriptions (not inclusive) 059 * @return the range of matching subscriptions 060 */ 061 public java.util.List<Subscription> findByUserId(long userId, int start, 062 int end); 063 064 /** 065 * Returns an ordered range of all the subscriptions where userId = ?. 066 * 067 * <p> 068 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SubscriptionModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 069 * </p> 070 * 071 * @param userId the user ID 072 * @param start the lower bound of the range of subscriptions 073 * @param end the upper bound of the range of subscriptions (not inclusive) 074 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 075 * @return the ordered range of matching subscriptions 076 */ 077 public java.util.List<Subscription> findByUserId(long userId, int start, 078 int end, 079 com.liferay.portal.kernel.util.OrderByComparator<Subscription> orderByComparator); 080 081 /** 082 * Returns the first subscription in the ordered set where userId = ?. 083 * 084 * @param userId the user ID 085 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 086 * @return the first matching subscription 087 * @throws NoSuchSubscriptionException if a matching subscription could not be found 088 */ 089 public Subscription findByUserId_First(long userId, 090 com.liferay.portal.kernel.util.OrderByComparator<Subscription> orderByComparator) 091 throws com.liferay.portal.NoSuchSubscriptionException; 092 093 /** 094 * Returns the first subscription in the ordered set where userId = ?. 095 * 096 * @param userId the user ID 097 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 098 * @return the first matching subscription, or <code>null</code> if a matching subscription could not be found 099 */ 100 public Subscription fetchByUserId_First(long userId, 101 com.liferay.portal.kernel.util.OrderByComparator<Subscription> orderByComparator); 102 103 /** 104 * Returns the last subscription in the ordered set where userId = ?. 105 * 106 * @param userId the user ID 107 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 108 * @return the last matching subscription 109 * @throws NoSuchSubscriptionException if a matching subscription could not be found 110 */ 111 public Subscription findByUserId_Last(long userId, 112 com.liferay.portal.kernel.util.OrderByComparator<Subscription> orderByComparator) 113 throws com.liferay.portal.NoSuchSubscriptionException; 114 115 /** 116 * Returns the last subscription in the ordered set where userId = ?. 117 * 118 * @param userId the user ID 119 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 120 * @return the last matching subscription, or <code>null</code> if a matching subscription could not be found 121 */ 122 public Subscription fetchByUserId_Last(long userId, 123 com.liferay.portal.kernel.util.OrderByComparator<Subscription> orderByComparator); 124 125 /** 126 * Returns the subscriptions before and after the current subscription in the ordered set where userId = ?. 127 * 128 * @param subscriptionId the primary key of the current subscription 129 * @param userId the user ID 130 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 131 * @return the previous, current, and next subscription 132 * @throws NoSuchSubscriptionException if a subscription with the primary key could not be found 133 */ 134 public Subscription[] findByUserId_PrevAndNext(long subscriptionId, 135 long userId, 136 com.liferay.portal.kernel.util.OrderByComparator<Subscription> orderByComparator) 137 throws com.liferay.portal.NoSuchSubscriptionException; 138 139 /** 140 * Removes all the subscriptions where userId = ? from the database. 141 * 142 * @param userId the user ID 143 */ 144 public void removeByUserId(long userId); 145 146 /** 147 * Returns the number of subscriptions where userId = ?. 148 * 149 * @param userId the user ID 150 * @return the number of matching subscriptions 151 */ 152 public int countByUserId(long userId); 153 154 /** 155 * Returns all the subscriptions where groupId = ? and userId = ?. 156 * 157 * @param groupId the group ID 158 * @param userId the user ID 159 * @return the matching subscriptions 160 */ 161 public java.util.List<Subscription> findByG_U(long groupId, long userId); 162 163 /** 164 * Returns a range of all the subscriptions where groupId = ? and userId = ?. 165 * 166 * <p> 167 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SubscriptionModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 168 * </p> 169 * 170 * @param groupId the group ID 171 * @param userId the user ID 172 * @param start the lower bound of the range of subscriptions 173 * @param end the upper bound of the range of subscriptions (not inclusive) 174 * @return the range of matching subscriptions 175 */ 176 public java.util.List<Subscription> findByG_U(long groupId, long userId, 177 int start, int end); 178 179 /** 180 * Returns an ordered range of all the subscriptions where groupId = ? and userId = ?. 181 * 182 * <p> 183 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SubscriptionModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 184 * </p> 185 * 186 * @param groupId the group ID 187 * @param userId the user ID 188 * @param start the lower bound of the range of subscriptions 189 * @param end the upper bound of the range of subscriptions (not inclusive) 190 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 191 * @return the ordered range of matching subscriptions 192 */ 193 public java.util.List<Subscription> findByG_U(long groupId, long userId, 194 int start, int end, 195 com.liferay.portal.kernel.util.OrderByComparator<Subscription> orderByComparator); 196 197 /** 198 * Returns the first subscription in the ordered set where groupId = ? and userId = ?. 199 * 200 * @param groupId the group ID 201 * @param userId the user ID 202 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 203 * @return the first matching subscription 204 * @throws NoSuchSubscriptionException if a matching subscription could not be found 205 */ 206 public Subscription findByG_U_First(long groupId, long userId, 207 com.liferay.portal.kernel.util.OrderByComparator<Subscription> orderByComparator) 208 throws com.liferay.portal.NoSuchSubscriptionException; 209 210 /** 211 * Returns the first subscription in the ordered set where groupId = ? and userId = ?. 212 * 213 * @param groupId the group ID 214 * @param userId the user ID 215 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 216 * @return the first matching subscription, or <code>null</code> if a matching subscription could not be found 217 */ 218 public Subscription fetchByG_U_First(long groupId, long userId, 219 com.liferay.portal.kernel.util.OrderByComparator<Subscription> orderByComparator); 220 221 /** 222 * Returns the last subscription in the ordered set where groupId = ? and userId = ?. 223 * 224 * @param groupId the group ID 225 * @param userId the user ID 226 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 227 * @return the last matching subscription 228 * @throws NoSuchSubscriptionException if a matching subscription could not be found 229 */ 230 public Subscription findByG_U_Last(long groupId, long userId, 231 com.liferay.portal.kernel.util.OrderByComparator<Subscription> orderByComparator) 232 throws com.liferay.portal.NoSuchSubscriptionException; 233 234 /** 235 * Returns the last subscription in the ordered set where groupId = ? and userId = ?. 236 * 237 * @param groupId the group ID 238 * @param userId the user ID 239 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 240 * @return the last matching subscription, or <code>null</code> if a matching subscription could not be found 241 */ 242 public Subscription fetchByG_U_Last(long groupId, long userId, 243 com.liferay.portal.kernel.util.OrderByComparator<Subscription> orderByComparator); 244 245 /** 246 * Returns the subscriptions before and after the current subscription in the ordered set where groupId = ? and userId = ?. 247 * 248 * @param subscriptionId the primary key of the current subscription 249 * @param groupId the group ID 250 * @param userId the user ID 251 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 252 * @return the previous, current, and next subscription 253 * @throws NoSuchSubscriptionException if a subscription with the primary key could not be found 254 */ 255 public Subscription[] findByG_U_PrevAndNext(long subscriptionId, 256 long groupId, long userId, 257 com.liferay.portal.kernel.util.OrderByComparator<Subscription> orderByComparator) 258 throws com.liferay.portal.NoSuchSubscriptionException; 259 260 /** 261 * Removes all the subscriptions where groupId = ? and userId = ? from the database. 262 * 263 * @param groupId the group ID 264 * @param userId the user ID 265 */ 266 public void removeByG_U(long groupId, long userId); 267 268 /** 269 * Returns the number of subscriptions where groupId = ? and userId = ?. 270 * 271 * @param groupId the group ID 272 * @param userId the user ID 273 * @return the number of matching subscriptions 274 */ 275 public int countByG_U(long groupId, long userId); 276 277 /** 278 * Returns all the subscriptions where userId = ? and classNameId = ?. 279 * 280 * @param userId the user ID 281 * @param classNameId the class name ID 282 * @return the matching subscriptions 283 */ 284 public java.util.List<Subscription> findByU_C(long userId, long classNameId); 285 286 /** 287 * Returns a range of all the subscriptions where userId = ? and classNameId = ?. 288 * 289 * <p> 290 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SubscriptionModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 291 * </p> 292 * 293 * @param userId the user ID 294 * @param classNameId the class name ID 295 * @param start the lower bound of the range of subscriptions 296 * @param end the upper bound of the range of subscriptions (not inclusive) 297 * @return the range of matching subscriptions 298 */ 299 public java.util.List<Subscription> findByU_C(long userId, 300 long classNameId, int start, int end); 301 302 /** 303 * Returns an ordered range of all the subscriptions where userId = ? and classNameId = ?. 304 * 305 * <p> 306 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SubscriptionModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 307 * </p> 308 * 309 * @param userId the user ID 310 * @param classNameId the class name ID 311 * @param start the lower bound of the range of subscriptions 312 * @param end the upper bound of the range of subscriptions (not inclusive) 313 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 314 * @return the ordered range of matching subscriptions 315 */ 316 public java.util.List<Subscription> findByU_C(long userId, 317 long classNameId, int start, int end, 318 com.liferay.portal.kernel.util.OrderByComparator<Subscription> orderByComparator); 319 320 /** 321 * Returns the first subscription in the ordered set where userId = ? and classNameId = ?. 322 * 323 * @param userId the user ID 324 * @param classNameId the class name ID 325 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 326 * @return the first matching subscription 327 * @throws NoSuchSubscriptionException if a matching subscription could not be found 328 */ 329 public Subscription findByU_C_First(long userId, long classNameId, 330 com.liferay.portal.kernel.util.OrderByComparator<Subscription> orderByComparator) 331 throws com.liferay.portal.NoSuchSubscriptionException; 332 333 /** 334 * Returns the first subscription in the ordered set where userId = ? and classNameId = ?. 335 * 336 * @param userId the user ID 337 * @param classNameId the class name ID 338 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 339 * @return the first matching subscription, or <code>null</code> if a matching subscription could not be found 340 */ 341 public Subscription fetchByU_C_First(long userId, long classNameId, 342 com.liferay.portal.kernel.util.OrderByComparator<Subscription> orderByComparator); 343 344 /** 345 * Returns the last subscription in the ordered set where userId = ? and classNameId = ?. 346 * 347 * @param userId the user ID 348 * @param classNameId the class name ID 349 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 350 * @return the last matching subscription 351 * @throws NoSuchSubscriptionException if a matching subscription could not be found 352 */ 353 public Subscription findByU_C_Last(long userId, long classNameId, 354 com.liferay.portal.kernel.util.OrderByComparator<Subscription> orderByComparator) 355 throws com.liferay.portal.NoSuchSubscriptionException; 356 357 /** 358 * Returns the last subscription in the ordered set where userId = ? and classNameId = ?. 359 * 360 * @param userId the user ID 361 * @param classNameId the class name ID 362 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 363 * @return the last matching subscription, or <code>null</code> if a matching subscription could not be found 364 */ 365 public Subscription fetchByU_C_Last(long userId, long classNameId, 366 com.liferay.portal.kernel.util.OrderByComparator<Subscription> orderByComparator); 367 368 /** 369 * Returns the subscriptions before and after the current subscription in the ordered set where userId = ? and classNameId = ?. 370 * 371 * @param subscriptionId the primary key of the current subscription 372 * @param userId the user ID 373 * @param classNameId the class name ID 374 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 375 * @return the previous, current, and next subscription 376 * @throws NoSuchSubscriptionException if a subscription with the primary key could not be found 377 */ 378 public Subscription[] findByU_C_PrevAndNext(long subscriptionId, 379 long userId, long classNameId, 380 com.liferay.portal.kernel.util.OrderByComparator<Subscription> orderByComparator) 381 throws com.liferay.portal.NoSuchSubscriptionException; 382 383 /** 384 * Removes all the subscriptions where userId = ? and classNameId = ? from the database. 385 * 386 * @param userId the user ID 387 * @param classNameId the class name ID 388 */ 389 public void removeByU_C(long userId, long classNameId); 390 391 /** 392 * Returns the number of subscriptions where userId = ? and classNameId = ?. 393 * 394 * @param userId the user ID 395 * @param classNameId the class name ID 396 * @return the number of matching subscriptions 397 */ 398 public int countByU_C(long userId, long classNameId); 399 400 /** 401 * Returns all the subscriptions where companyId = ? and classNameId = ? and classPK = ?. 402 * 403 * @param companyId the company ID 404 * @param classNameId the class name ID 405 * @param classPK the class p k 406 * @return the matching subscriptions 407 */ 408 public java.util.List<Subscription> findByC_C_C(long companyId, 409 long classNameId, long classPK); 410 411 /** 412 * Returns a range of all the subscriptions 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 QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SubscriptionModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 416 * </p> 417 * 418 * @param companyId the company ID 419 * @param classNameId the class name ID 420 * @param classPK the class p k 421 * @param start the lower bound of the range of subscriptions 422 * @param end the upper bound of the range of subscriptions (not inclusive) 423 * @return the range of matching subscriptions 424 */ 425 public java.util.List<Subscription> findByC_C_C(long companyId, 426 long classNameId, long classPK, int start, int end); 427 428 /** 429 * Returns an ordered range of all the subscriptions where companyId = ? and classNameId = ? and classPK = ?. 430 * 431 * <p> 432 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SubscriptionModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 433 * </p> 434 * 435 * @param companyId the company ID 436 * @param classNameId the class name ID 437 * @param classPK the class p k 438 * @param start the lower bound of the range of subscriptions 439 * @param end the upper bound of the range of subscriptions (not inclusive) 440 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 441 * @return the ordered range of matching subscriptions 442 */ 443 public java.util.List<Subscription> findByC_C_C(long companyId, 444 long classNameId, long classPK, int start, int end, 445 com.liferay.portal.kernel.util.OrderByComparator<Subscription> orderByComparator); 446 447 /** 448 * Returns the first subscription in the ordered set where companyId = ? and classNameId = ? and classPK = ?. 449 * 450 * @param companyId the company ID 451 * @param classNameId the class name ID 452 * @param classPK the class p k 453 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 454 * @return the first matching subscription 455 * @throws NoSuchSubscriptionException if a matching subscription could not be found 456 */ 457 public Subscription findByC_C_C_First(long companyId, long classNameId, 458 long classPK, 459 com.liferay.portal.kernel.util.OrderByComparator<Subscription> orderByComparator) 460 throws com.liferay.portal.NoSuchSubscriptionException; 461 462 /** 463 * Returns the first subscription in the ordered set where companyId = ? and classNameId = ? and classPK = ?. 464 * 465 * @param companyId the company ID 466 * @param classNameId the class name ID 467 * @param classPK the class p k 468 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 469 * @return the first matching subscription, or <code>null</code> if a matching subscription could not be found 470 */ 471 public Subscription fetchByC_C_C_First(long companyId, long classNameId, 472 long classPK, 473 com.liferay.portal.kernel.util.OrderByComparator<Subscription> orderByComparator); 474 475 /** 476 * Returns the last subscription in the ordered set where companyId = ? and classNameId = ? and classPK = ?. 477 * 478 * @param companyId the company ID 479 * @param classNameId the class name ID 480 * @param classPK the class p k 481 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 482 * @return the last matching subscription 483 * @throws NoSuchSubscriptionException if a matching subscription could not be found 484 */ 485 public Subscription findByC_C_C_Last(long companyId, long classNameId, 486 long classPK, 487 com.liferay.portal.kernel.util.OrderByComparator<Subscription> orderByComparator) 488 throws com.liferay.portal.NoSuchSubscriptionException; 489 490 /** 491 * Returns the last subscription in the ordered set where companyId = ? and classNameId = ? and classPK = ?. 492 * 493 * @param companyId the company ID 494 * @param classNameId the class name ID 495 * @param classPK the class p k 496 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 497 * @return the last matching subscription, or <code>null</code> if a matching subscription could not be found 498 */ 499 public Subscription fetchByC_C_C_Last(long companyId, long classNameId, 500 long classPK, 501 com.liferay.portal.kernel.util.OrderByComparator<Subscription> orderByComparator); 502 503 /** 504 * Returns the subscriptions before and after the current subscription in the ordered set where companyId = ? and classNameId = ? and classPK = ?. 505 * 506 * @param subscriptionId the primary key of the current subscription 507 * @param companyId the company ID 508 * @param classNameId the class name ID 509 * @param classPK the class p k 510 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 511 * @return the previous, current, and next subscription 512 * @throws NoSuchSubscriptionException if a subscription with the primary key could not be found 513 */ 514 public Subscription[] findByC_C_C_PrevAndNext(long subscriptionId, 515 long companyId, long classNameId, long classPK, 516 com.liferay.portal.kernel.util.OrderByComparator<Subscription> orderByComparator) 517 throws com.liferay.portal.NoSuchSubscriptionException; 518 519 /** 520 * Removes all the subscriptions where companyId = ? and classNameId = ? and classPK = ? from the database. 521 * 522 * @param companyId the company ID 523 * @param classNameId the class name ID 524 * @param classPK the class p k 525 */ 526 public void removeByC_C_C(long companyId, long classNameId, long classPK); 527 528 /** 529 * Returns the number of subscriptions where companyId = ? and classNameId = ? and classPK = ?. 530 * 531 * @param companyId the company ID 532 * @param classNameId the class name ID 533 * @param classPK the class p k 534 * @return the number of matching subscriptions 535 */ 536 public int countByC_C_C(long companyId, long classNameId, long classPK); 537 538 /** 539 * Returns all the subscriptions where companyId = ? and userId = ? and classNameId = ? and classPK = any ?. 540 * 541 * <p> 542 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SubscriptionModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 543 * </p> 544 * 545 * @param companyId the company ID 546 * @param userId the user ID 547 * @param classNameId the class name ID 548 * @param classPKs the class p ks 549 * @return the matching subscriptions 550 */ 551 public java.util.List<Subscription> findByC_U_C_C(long companyId, 552 long userId, long classNameId, long[] classPKs); 553 554 /** 555 * Returns a range of all the subscriptions where companyId = ? and userId = ? and classNameId = ? and classPK = any ?. 556 * 557 * <p> 558 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SubscriptionModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 559 * </p> 560 * 561 * @param companyId the company ID 562 * @param userId the user ID 563 * @param classNameId the class name ID 564 * @param classPKs the class p ks 565 * @param start the lower bound of the range of subscriptions 566 * @param end the upper bound of the range of subscriptions (not inclusive) 567 * @return the range of matching subscriptions 568 */ 569 public java.util.List<Subscription> findByC_U_C_C(long companyId, 570 long userId, long classNameId, long[] classPKs, int start, int end); 571 572 /** 573 * Returns an ordered range of all the subscriptions where companyId = ? and userId = ? and classNameId = ? and classPK = any ?. 574 * 575 * <p> 576 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SubscriptionModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 577 * </p> 578 * 579 * @param companyId the company ID 580 * @param userId the user ID 581 * @param classNameId the class name ID 582 * @param classPKs the class p ks 583 * @param start the lower bound of the range of subscriptions 584 * @param end the upper bound of the range of subscriptions (not inclusive) 585 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 586 * @return the ordered range of matching subscriptions 587 */ 588 public java.util.List<Subscription> findByC_U_C_C(long companyId, 589 long userId, long classNameId, long[] classPKs, int start, int end, 590 com.liferay.portal.kernel.util.OrderByComparator<Subscription> orderByComparator); 591 592 /** 593 * Returns the subscription where companyId = ? and userId = ? and classNameId = ? and classPK = ? or throws a {@link NoSuchSubscriptionException} if it could not be found. 594 * 595 * @param companyId the company ID 596 * @param userId the user ID 597 * @param classNameId the class name ID 598 * @param classPK the class p k 599 * @return the matching subscription 600 * @throws NoSuchSubscriptionException if a matching subscription could not be found 601 */ 602 public Subscription findByC_U_C_C(long companyId, long userId, 603 long classNameId, long classPK) 604 throws com.liferay.portal.NoSuchSubscriptionException; 605 606 /** 607 * 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. 608 * 609 * @param companyId the company ID 610 * @param userId the user ID 611 * @param classNameId the class name ID 612 * @param classPK the class p k 613 * @return the matching subscription, or <code>null</code> if a matching subscription could not be found 614 */ 615 public Subscription fetchByC_U_C_C(long companyId, long userId, 616 long classNameId, long classPK); 617 618 /** 619 * 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. 620 * 621 * @param companyId the company ID 622 * @param userId the user ID 623 * @param classNameId the class name ID 624 * @param classPK the class p k 625 * @param retrieveFromCache whether to use the finder cache 626 * @return the matching subscription, or <code>null</code> if a matching subscription could not be found 627 */ 628 public Subscription fetchByC_U_C_C(long companyId, long userId, 629 long classNameId, long classPK, boolean retrieveFromCache); 630 631 /** 632 * Removes the subscription where companyId = ? and userId = ? and classNameId = ? and classPK = ? from the database. 633 * 634 * @param companyId the company ID 635 * @param userId the user ID 636 * @param classNameId the class name ID 637 * @param classPK the class p k 638 * @return the subscription that was removed 639 */ 640 public Subscription removeByC_U_C_C(long companyId, long userId, 641 long classNameId, long classPK) 642 throws com.liferay.portal.NoSuchSubscriptionException; 643 644 /** 645 * Returns the number of subscriptions where companyId = ? and userId = ? and classNameId = ? and classPK = ?. 646 * 647 * @param companyId the company ID 648 * @param userId the user ID 649 * @param classNameId the class name ID 650 * @param classPK the class p k 651 * @return the number of matching subscriptions 652 */ 653 public int countByC_U_C_C(long companyId, long userId, long classNameId, 654 long classPK); 655 656 /** 657 * Returns the number of subscriptions where companyId = ? and userId = ? and classNameId = ? and classPK = any ?. 658 * 659 * @param companyId the company ID 660 * @param userId the user ID 661 * @param classNameId the class name ID 662 * @param classPKs the class p ks 663 * @return the number of matching subscriptions 664 */ 665 public int countByC_U_C_C(long companyId, long userId, long classNameId, 666 long[] classPKs); 667 668 /** 669 * Caches the subscription in the entity cache if it is enabled. 670 * 671 * @param subscription the subscription 672 */ 673 public void cacheResult(Subscription subscription); 674 675 /** 676 * Caches the subscriptions in the entity cache if it is enabled. 677 * 678 * @param subscriptions the subscriptions 679 */ 680 public void cacheResult(java.util.List<Subscription> subscriptions); 681 682 /** 683 * Creates a new subscription with the primary key. Does not add the subscription to the database. 684 * 685 * @param subscriptionId the primary key for the new subscription 686 * @return the new subscription 687 */ 688 public Subscription create(long subscriptionId); 689 690 /** 691 * Removes the subscription with the primary key from the database. Also notifies the appropriate model listeners. 692 * 693 * @param subscriptionId the primary key of the subscription 694 * @return the subscription that was removed 695 * @throws NoSuchSubscriptionException if a subscription with the primary key could not be found 696 */ 697 public Subscription remove(long subscriptionId) 698 throws com.liferay.portal.NoSuchSubscriptionException; 699 700 public Subscription updateImpl(Subscription subscription); 701 702 /** 703 * Returns the subscription with the primary key or throws a {@link NoSuchSubscriptionException} if it could not be found. 704 * 705 * @param subscriptionId the primary key of the subscription 706 * @return the subscription 707 * @throws NoSuchSubscriptionException if a subscription with the primary key could not be found 708 */ 709 public Subscription findByPrimaryKey(long subscriptionId) 710 throws com.liferay.portal.NoSuchSubscriptionException; 711 712 /** 713 * Returns the subscription with the primary key or returns <code>null</code> if it could not be found. 714 * 715 * @param subscriptionId the primary key of the subscription 716 * @return the subscription, or <code>null</code> if a subscription with the primary key could not be found 717 */ 718 public Subscription fetchByPrimaryKey(long subscriptionId); 719 720 @Override 721 public java.util.Map<java.io.Serializable, Subscription> fetchByPrimaryKeys( 722 java.util.Set<java.io.Serializable> primaryKeys); 723 724 /** 725 * Returns all the subscriptions. 726 * 727 * @return the subscriptions 728 */ 729 public java.util.List<Subscription> findAll(); 730 731 /** 732 * Returns a range of all the subscriptions. 733 * 734 * <p> 735 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SubscriptionModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 736 * </p> 737 * 738 * @param start the lower bound of the range of subscriptions 739 * @param end the upper bound of the range of subscriptions (not inclusive) 740 * @return the range of subscriptions 741 */ 742 public java.util.List<Subscription> findAll(int start, int end); 743 744 /** 745 * Returns an ordered range of all the subscriptions. 746 * 747 * <p> 748 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SubscriptionModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 749 * </p> 750 * 751 * @param start the lower bound of the range of subscriptions 752 * @param end the upper bound of the range of subscriptions (not inclusive) 753 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 754 * @return the ordered range of subscriptions 755 */ 756 public java.util.List<Subscription> findAll(int start, int end, 757 com.liferay.portal.kernel.util.OrderByComparator<Subscription> orderByComparator); 758 759 /** 760 * Removes all the subscriptions from the database. 761 */ 762 public void removeAll(); 763 764 /** 765 * Returns the number of subscriptions. 766 * 767 * @return the number of subscriptions 768 */ 769 public int countAll(); 770 }