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