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