001 /** 002 * Copyright (c) 2000-2013 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.kernel.bean.PortalBeanLocatorUtil; 020 import com.liferay.portal.kernel.dao.orm.DynamicQuery; 021 import com.liferay.portal.kernel.exception.SystemException; 022 import com.liferay.portal.kernel.util.OrderByComparator; 023 import com.liferay.portal.kernel.util.ReferenceRegistry; 024 import com.liferay.portal.model.Subscription; 025 import com.liferay.portal.service.ServiceContext; 026 027 import java.util.List; 028 029 /** 030 * The persistence utility for the subscription service. This utility wraps {@link SubscriptionPersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class. 031 * 032 * <p> 033 * Caching information and settings can be found in <code>portal.properties</code> 034 * </p> 035 * 036 * @author Brian Wing Shun Chan 037 * @see SubscriptionPersistence 038 * @see SubscriptionPersistenceImpl 039 * @generated 040 */ 041 @ProviderType 042 public class SubscriptionUtil { 043 /* 044 * NOTE FOR DEVELOPERS: 045 * 046 * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class. 047 */ 048 049 /** 050 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache() 051 */ 052 public static void clearCache() { 053 getPersistence().clearCache(); 054 } 055 056 /** 057 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel) 058 */ 059 public static void clearCache(Subscription subscription) { 060 getPersistence().clearCache(subscription); 061 } 062 063 /** 064 * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery) 065 */ 066 public static long countWithDynamicQuery(DynamicQuery dynamicQuery) 067 throws SystemException { 068 return getPersistence().countWithDynamicQuery(dynamicQuery); 069 } 070 071 /** 072 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery) 073 */ 074 public static List<Subscription> findWithDynamicQuery( 075 DynamicQuery dynamicQuery) throws SystemException { 076 return getPersistence().findWithDynamicQuery(dynamicQuery); 077 } 078 079 /** 080 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int) 081 */ 082 public static List<Subscription> findWithDynamicQuery( 083 DynamicQuery dynamicQuery, int start, int end) 084 throws SystemException { 085 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end); 086 } 087 088 /** 089 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator) 090 */ 091 public static List<Subscription> findWithDynamicQuery( 092 DynamicQuery dynamicQuery, int start, int end, 093 OrderByComparator orderByComparator) throws SystemException { 094 return getPersistence() 095 .findWithDynamicQuery(dynamicQuery, start, end, 096 orderByComparator); 097 } 098 099 /** 100 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel) 101 */ 102 public static Subscription update(Subscription subscription) 103 throws SystemException { 104 return getPersistence().update(subscription); 105 } 106 107 /** 108 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext) 109 */ 110 public static Subscription update(Subscription subscription, 111 ServiceContext serviceContext) throws SystemException { 112 return getPersistence().update(subscription, serviceContext); 113 } 114 115 /** 116 * Returns all the subscriptions where userId = ?. 117 * 118 * @param userId the user ID 119 * @return the matching subscriptions 120 * @throws SystemException if a system exception occurred 121 */ 122 public static java.util.List<com.liferay.portal.model.Subscription> findByUserId( 123 long userId) throws com.liferay.portal.kernel.exception.SystemException { 124 return getPersistence().findByUserId(userId); 125 } 126 127 /** 128 * Returns a range of all the subscriptions where userId = ?. 129 * 130 * <p> 131 * 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. 132 * </p> 133 * 134 * @param userId the user ID 135 * @param start the lower bound of the range of subscriptions 136 * @param end the upper bound of the range of subscriptions (not inclusive) 137 * @return the range of matching subscriptions 138 * @throws SystemException if a system exception occurred 139 */ 140 public static java.util.List<com.liferay.portal.model.Subscription> findByUserId( 141 long userId, int start, int end) 142 throws com.liferay.portal.kernel.exception.SystemException { 143 return getPersistence().findByUserId(userId, start, end); 144 } 145 146 /** 147 * Returns an ordered range of all the subscriptions where userId = ?. 148 * 149 * <p> 150 * 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. 151 * </p> 152 * 153 * @param userId the user ID 154 * @param start the lower bound of the range of subscriptions 155 * @param end the upper bound of the range of subscriptions (not inclusive) 156 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 157 * @return the ordered range of matching subscriptions 158 * @throws SystemException if a system exception occurred 159 */ 160 public static java.util.List<com.liferay.portal.model.Subscription> findByUserId( 161 long userId, int start, int end, 162 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 163 throws com.liferay.portal.kernel.exception.SystemException { 164 return getPersistence() 165 .findByUserId(userId, start, end, orderByComparator); 166 } 167 168 /** 169 * Returns the first subscription in the ordered set where userId = ?. 170 * 171 * @param userId the user ID 172 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 173 * @return the first matching subscription 174 * @throws com.liferay.portal.NoSuchSubscriptionException if a matching subscription could not be found 175 * @throws SystemException if a system exception occurred 176 */ 177 public static com.liferay.portal.model.Subscription findByUserId_First( 178 long userId, 179 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 180 throws com.liferay.portal.NoSuchSubscriptionException, 181 com.liferay.portal.kernel.exception.SystemException { 182 return getPersistence().findByUserId_First(userId, orderByComparator); 183 } 184 185 /** 186 * Returns the first subscription in the ordered set where userId = ?. 187 * 188 * @param userId the user ID 189 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 190 * @return the first matching subscription, or <code>null</code> if a matching subscription could not be found 191 * @throws SystemException if a system exception occurred 192 */ 193 public static com.liferay.portal.model.Subscription fetchByUserId_First( 194 long userId, 195 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 196 throws com.liferay.portal.kernel.exception.SystemException { 197 return getPersistence().fetchByUserId_First(userId, orderByComparator); 198 } 199 200 /** 201 * Returns the last subscription in the ordered set where userId = ?. 202 * 203 * @param userId the user ID 204 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 205 * @return the last matching subscription 206 * @throws com.liferay.portal.NoSuchSubscriptionException if a matching subscription could not be found 207 * @throws SystemException if a system exception occurred 208 */ 209 public static com.liferay.portal.model.Subscription findByUserId_Last( 210 long userId, 211 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 212 throws com.liferay.portal.NoSuchSubscriptionException, 213 com.liferay.portal.kernel.exception.SystemException { 214 return getPersistence().findByUserId_Last(userId, orderByComparator); 215 } 216 217 /** 218 * Returns the last subscription in the ordered set where userId = ?. 219 * 220 * @param userId the user ID 221 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 222 * @return the last matching subscription, or <code>null</code> if a matching subscription could not be found 223 * @throws SystemException if a system exception occurred 224 */ 225 public static com.liferay.portal.model.Subscription fetchByUserId_Last( 226 long userId, 227 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 228 throws com.liferay.portal.kernel.exception.SystemException { 229 return getPersistence().fetchByUserId_Last(userId, orderByComparator); 230 } 231 232 /** 233 * Returns the subscriptions before and after the current subscription in the ordered set where userId = ?. 234 * 235 * @param subscriptionId the primary key of the current subscription 236 * @param userId the user ID 237 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 238 * @return the previous, current, and next subscription 239 * @throws com.liferay.portal.NoSuchSubscriptionException if a subscription with the primary key could not be found 240 * @throws SystemException if a system exception occurred 241 */ 242 public static com.liferay.portal.model.Subscription[] findByUserId_PrevAndNext( 243 long subscriptionId, long userId, 244 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 245 throws com.liferay.portal.NoSuchSubscriptionException, 246 com.liferay.portal.kernel.exception.SystemException { 247 return getPersistence() 248 .findByUserId_PrevAndNext(subscriptionId, userId, 249 orderByComparator); 250 } 251 252 /** 253 * Removes all the subscriptions where userId = ? from the database. 254 * 255 * @param userId the user ID 256 * @throws SystemException if a system exception occurred 257 */ 258 public static void removeByUserId(long userId) 259 throws com.liferay.portal.kernel.exception.SystemException { 260 getPersistence().removeByUserId(userId); 261 } 262 263 /** 264 * Returns the number of subscriptions where userId = ?. 265 * 266 * @param userId the user ID 267 * @return the number of matching subscriptions 268 * @throws SystemException if a system exception occurred 269 */ 270 public static int countByUserId(long userId) 271 throws com.liferay.portal.kernel.exception.SystemException { 272 return getPersistence().countByUserId(userId); 273 } 274 275 /** 276 * Returns all the subscriptions where userId = ? and classNameId = ?. 277 * 278 * @param userId the user ID 279 * @param classNameId the class name ID 280 * @return the matching subscriptions 281 * @throws SystemException if a system exception occurred 282 */ 283 public static java.util.List<com.liferay.portal.model.Subscription> findByU_C( 284 long userId, long classNameId) 285 throws com.liferay.portal.kernel.exception.SystemException { 286 return getPersistence().findByU_C(userId, classNameId); 287 } 288 289 /** 290 * Returns a range of all the subscriptions where userId = ? and classNameId = ?. 291 * 292 * <p> 293 * 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. 294 * </p> 295 * 296 * @param userId the user ID 297 * @param classNameId the class name ID 298 * @param start the lower bound of the range of subscriptions 299 * @param end the upper bound of the range of subscriptions (not inclusive) 300 * @return the range of matching subscriptions 301 * @throws SystemException if a system exception occurred 302 */ 303 public static java.util.List<com.liferay.portal.model.Subscription> findByU_C( 304 long userId, long classNameId, int start, int end) 305 throws com.liferay.portal.kernel.exception.SystemException { 306 return getPersistence().findByU_C(userId, classNameId, start, end); 307 } 308 309 /** 310 * Returns an ordered range of all the subscriptions where userId = ? and classNameId = ?. 311 * 312 * <p> 313 * 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. 314 * </p> 315 * 316 * @param userId the user ID 317 * @param classNameId the class name ID 318 * @param start the lower bound of the range of subscriptions 319 * @param end the upper bound of the range of subscriptions (not inclusive) 320 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 321 * @return the ordered range of matching subscriptions 322 * @throws SystemException if a system exception occurred 323 */ 324 public static java.util.List<com.liferay.portal.model.Subscription> findByU_C( 325 long userId, long classNameId, int start, int end, 326 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 327 throws com.liferay.portal.kernel.exception.SystemException { 328 return getPersistence() 329 .findByU_C(userId, classNameId, start, end, orderByComparator); 330 } 331 332 /** 333 * Returns the first subscription in the ordered set where userId = ? and classNameId = ?. 334 * 335 * @param userId the user ID 336 * @param classNameId the class name ID 337 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 338 * @return the first matching subscription 339 * @throws com.liferay.portal.NoSuchSubscriptionException if a matching subscription could not be found 340 * @throws SystemException if a system exception occurred 341 */ 342 public static com.liferay.portal.model.Subscription findByU_C_First( 343 long userId, long classNameId, 344 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 345 throws com.liferay.portal.NoSuchSubscriptionException, 346 com.liferay.portal.kernel.exception.SystemException { 347 return getPersistence() 348 .findByU_C_First(userId, classNameId, orderByComparator); 349 } 350 351 /** 352 * Returns the first subscription in the ordered set where userId = ? and classNameId = ?. 353 * 354 * @param userId the user ID 355 * @param classNameId the class name ID 356 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 357 * @return the first matching subscription, or <code>null</code> if a matching subscription could not be found 358 * @throws SystemException if a system exception occurred 359 */ 360 public static com.liferay.portal.model.Subscription fetchByU_C_First( 361 long userId, long classNameId, 362 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 363 throws com.liferay.portal.kernel.exception.SystemException { 364 return getPersistence() 365 .fetchByU_C_First(userId, classNameId, orderByComparator); 366 } 367 368 /** 369 * Returns the last subscription in the ordered set where userId = ? and classNameId = ?. 370 * 371 * @param userId the user ID 372 * @param classNameId the class name ID 373 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 374 * @return the last matching subscription 375 * @throws com.liferay.portal.NoSuchSubscriptionException if a matching subscription could not be found 376 * @throws SystemException if a system exception occurred 377 */ 378 public static com.liferay.portal.model.Subscription findByU_C_Last( 379 long userId, long classNameId, 380 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 381 throws com.liferay.portal.NoSuchSubscriptionException, 382 com.liferay.portal.kernel.exception.SystemException { 383 return getPersistence() 384 .findByU_C_Last(userId, classNameId, orderByComparator); 385 } 386 387 /** 388 * Returns the last subscription in the ordered set where userId = ? and classNameId = ?. 389 * 390 * @param userId the user ID 391 * @param classNameId the class name ID 392 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 393 * @return the last matching subscription, or <code>null</code> if a matching subscription could not be found 394 * @throws SystemException if a system exception occurred 395 */ 396 public static com.liferay.portal.model.Subscription fetchByU_C_Last( 397 long userId, long classNameId, 398 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 399 throws com.liferay.portal.kernel.exception.SystemException { 400 return getPersistence() 401 .fetchByU_C_Last(userId, classNameId, orderByComparator); 402 } 403 404 /** 405 * Returns the subscriptions before and after the current subscription in the ordered set where userId = ? and classNameId = ?. 406 * 407 * @param subscriptionId the primary key of the current subscription 408 * @param userId the user ID 409 * @param classNameId the class name ID 410 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 411 * @return the previous, current, and next subscription 412 * @throws com.liferay.portal.NoSuchSubscriptionException if a subscription with the primary key could not be found 413 * @throws SystemException if a system exception occurred 414 */ 415 public static com.liferay.portal.model.Subscription[] findByU_C_PrevAndNext( 416 long subscriptionId, long userId, long classNameId, 417 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 418 throws com.liferay.portal.NoSuchSubscriptionException, 419 com.liferay.portal.kernel.exception.SystemException { 420 return getPersistence() 421 .findByU_C_PrevAndNext(subscriptionId, userId, classNameId, 422 orderByComparator); 423 } 424 425 /** 426 * Removes all the subscriptions where userId = ? and classNameId = ? from the database. 427 * 428 * @param userId the user ID 429 * @param classNameId the class name ID 430 * @throws SystemException if a system exception occurred 431 */ 432 public static void removeByU_C(long userId, long classNameId) 433 throws com.liferay.portal.kernel.exception.SystemException { 434 getPersistence().removeByU_C(userId, classNameId); 435 } 436 437 /** 438 * Returns the number of subscriptions where userId = ? and classNameId = ?. 439 * 440 * @param userId the user ID 441 * @param classNameId the class name ID 442 * @return the number of matching subscriptions 443 * @throws SystemException if a system exception occurred 444 */ 445 public static int countByU_C(long userId, long classNameId) 446 throws com.liferay.portal.kernel.exception.SystemException { 447 return getPersistence().countByU_C(userId, classNameId); 448 } 449 450 /** 451 * Returns all the subscriptions where companyId = ? and classNameId = ? and classPK = ?. 452 * 453 * @param companyId the company ID 454 * @param classNameId the class name ID 455 * @param classPK the class p k 456 * @return the matching subscriptions 457 * @throws SystemException if a system exception occurred 458 */ 459 public static java.util.List<com.liferay.portal.model.Subscription> findByC_C_C( 460 long companyId, long classNameId, long classPK) 461 throws com.liferay.portal.kernel.exception.SystemException { 462 return getPersistence().findByC_C_C(companyId, classNameId, classPK); 463 } 464 465 /** 466 * Returns a range of all the subscriptions where companyId = ? and classNameId = ? and classPK = ?. 467 * 468 * <p> 469 * 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. 470 * </p> 471 * 472 * @param companyId the company ID 473 * @param classNameId the class name ID 474 * @param classPK the class p k 475 * @param start the lower bound of the range of subscriptions 476 * @param end the upper bound of the range of subscriptions (not inclusive) 477 * @return the range of matching subscriptions 478 * @throws SystemException if a system exception occurred 479 */ 480 public static java.util.List<com.liferay.portal.model.Subscription> findByC_C_C( 481 long companyId, long classNameId, long classPK, int start, int end) 482 throws com.liferay.portal.kernel.exception.SystemException { 483 return getPersistence() 484 .findByC_C_C(companyId, classNameId, classPK, start, end); 485 } 486 487 /** 488 * Returns an ordered range of all the subscriptions where companyId = ? and classNameId = ? and classPK = ?. 489 * 490 * <p> 491 * 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. 492 * </p> 493 * 494 * @param companyId the company ID 495 * @param classNameId the class name ID 496 * @param classPK the class p k 497 * @param start the lower bound of the range of subscriptions 498 * @param end the upper bound of the range of subscriptions (not inclusive) 499 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 500 * @return the ordered range of matching subscriptions 501 * @throws SystemException if a system exception occurred 502 */ 503 public static java.util.List<com.liferay.portal.model.Subscription> findByC_C_C( 504 long companyId, long classNameId, long classPK, int start, int end, 505 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 506 throws com.liferay.portal.kernel.exception.SystemException { 507 return getPersistence() 508 .findByC_C_C(companyId, classNameId, classPK, start, end, 509 orderByComparator); 510 } 511 512 /** 513 * Returns the first subscription in the ordered set where companyId = ? and classNameId = ? and classPK = ?. 514 * 515 * @param companyId the company ID 516 * @param classNameId the class name ID 517 * @param classPK the class p k 518 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 519 * @return the first matching subscription 520 * @throws com.liferay.portal.NoSuchSubscriptionException if a matching subscription could not be found 521 * @throws SystemException if a system exception occurred 522 */ 523 public static com.liferay.portal.model.Subscription findByC_C_C_First( 524 long companyId, long classNameId, long classPK, 525 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 526 throws com.liferay.portal.NoSuchSubscriptionException, 527 com.liferay.portal.kernel.exception.SystemException { 528 return getPersistence() 529 .findByC_C_C_First(companyId, classNameId, classPK, 530 orderByComparator); 531 } 532 533 /** 534 * Returns the first subscription in the ordered set where companyId = ? and classNameId = ? and classPK = ?. 535 * 536 * @param companyId the company ID 537 * @param classNameId the class name ID 538 * @param classPK the class p k 539 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 540 * @return the first matching subscription, or <code>null</code> if a matching subscription could not be found 541 * @throws SystemException if a system exception occurred 542 */ 543 public static com.liferay.portal.model.Subscription fetchByC_C_C_First( 544 long companyId, long classNameId, long classPK, 545 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 546 throws com.liferay.portal.kernel.exception.SystemException { 547 return getPersistence() 548 .fetchByC_C_C_First(companyId, classNameId, classPK, 549 orderByComparator); 550 } 551 552 /** 553 * Returns the last subscription in the ordered set where companyId = ? and classNameId = ? and classPK = ?. 554 * 555 * @param companyId the company ID 556 * @param classNameId the class name ID 557 * @param classPK the class p k 558 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 559 * @return the last matching subscription 560 * @throws com.liferay.portal.NoSuchSubscriptionException if a matching subscription could not be found 561 * @throws SystemException if a system exception occurred 562 */ 563 public static com.liferay.portal.model.Subscription findByC_C_C_Last( 564 long companyId, long classNameId, long classPK, 565 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 566 throws com.liferay.portal.NoSuchSubscriptionException, 567 com.liferay.portal.kernel.exception.SystemException { 568 return getPersistence() 569 .findByC_C_C_Last(companyId, classNameId, classPK, 570 orderByComparator); 571 } 572 573 /** 574 * Returns the last subscription in the ordered set where companyId = ? and classNameId = ? and classPK = ?. 575 * 576 * @param companyId the company ID 577 * @param classNameId the class name ID 578 * @param classPK the class p k 579 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 580 * @return the last matching subscription, or <code>null</code> if a matching subscription could not be found 581 * @throws SystemException if a system exception occurred 582 */ 583 public static com.liferay.portal.model.Subscription fetchByC_C_C_Last( 584 long companyId, long classNameId, long classPK, 585 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 586 throws com.liferay.portal.kernel.exception.SystemException { 587 return getPersistence() 588 .fetchByC_C_C_Last(companyId, classNameId, classPK, 589 orderByComparator); 590 } 591 592 /** 593 * Returns the subscriptions before and after the current subscription in the ordered set where companyId = ? and classNameId = ? and classPK = ?. 594 * 595 * @param subscriptionId the primary key of the current subscription 596 * @param companyId the company ID 597 * @param classNameId the class name ID 598 * @param classPK the class p k 599 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 600 * @return the previous, current, and next subscription 601 * @throws com.liferay.portal.NoSuchSubscriptionException if a subscription with the primary key could not be found 602 * @throws SystemException if a system exception occurred 603 */ 604 public static com.liferay.portal.model.Subscription[] findByC_C_C_PrevAndNext( 605 long subscriptionId, long companyId, long classNameId, long classPK, 606 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 607 throws com.liferay.portal.NoSuchSubscriptionException, 608 com.liferay.portal.kernel.exception.SystemException { 609 return getPersistence() 610 .findByC_C_C_PrevAndNext(subscriptionId, companyId, 611 classNameId, classPK, orderByComparator); 612 } 613 614 /** 615 * Removes all the subscriptions where companyId = ? and classNameId = ? and classPK = ? from the database. 616 * 617 * @param companyId the company ID 618 * @param classNameId the class name ID 619 * @param classPK the class p k 620 * @throws SystemException if a system exception occurred 621 */ 622 public static void removeByC_C_C(long companyId, long classNameId, 623 long classPK) 624 throws com.liferay.portal.kernel.exception.SystemException { 625 getPersistence().removeByC_C_C(companyId, classNameId, classPK); 626 } 627 628 /** 629 * Returns the number of subscriptions where companyId = ? and classNameId = ? and classPK = ?. 630 * 631 * @param companyId the company ID 632 * @param classNameId the class name ID 633 * @param classPK the class p k 634 * @return the number of matching subscriptions 635 * @throws SystemException if a system exception occurred 636 */ 637 public static int countByC_C_C(long companyId, long classNameId, 638 long classPK) 639 throws com.liferay.portal.kernel.exception.SystemException { 640 return getPersistence().countByC_C_C(companyId, classNameId, classPK); 641 } 642 643 /** 644 * Returns all the subscriptions where companyId = ? and userId = ? and classNameId = ? and classPK = any ?. 645 * 646 * <p> 647 * 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. 648 * </p> 649 * 650 * @param companyId the company ID 651 * @param userId the user ID 652 * @param classNameId the class name ID 653 * @param classPKs the class p ks 654 * @return the matching subscriptions 655 * @throws SystemException if a system exception occurred 656 */ 657 public static java.util.List<com.liferay.portal.model.Subscription> findByC_U_C_C( 658 long companyId, long userId, long classNameId, long[] classPKs) 659 throws com.liferay.portal.kernel.exception.SystemException { 660 return getPersistence() 661 .findByC_U_C_C(companyId, userId, classNameId, classPKs); 662 } 663 664 /** 665 * Returns a range of all the subscriptions where companyId = ? and userId = ? and classNameId = ? and classPK = any ?. 666 * 667 * <p> 668 * 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. 669 * </p> 670 * 671 * @param companyId the company ID 672 * @param userId the user ID 673 * @param classNameId the class name ID 674 * @param classPKs the class p ks 675 * @param start the lower bound of the range of subscriptions 676 * @param end the upper bound of the range of subscriptions (not inclusive) 677 * @return the range of matching subscriptions 678 * @throws SystemException if a system exception occurred 679 */ 680 public static java.util.List<com.liferay.portal.model.Subscription> findByC_U_C_C( 681 long companyId, long userId, long classNameId, long[] classPKs, 682 int start, int end) 683 throws com.liferay.portal.kernel.exception.SystemException { 684 return getPersistence() 685 .findByC_U_C_C(companyId, userId, classNameId, classPKs, 686 start, end); 687 } 688 689 /** 690 * Returns an ordered range of all the subscriptions where companyId = ? and userId = ? and classNameId = ? and classPK = any ?. 691 * 692 * <p> 693 * 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. 694 * </p> 695 * 696 * @param companyId the company ID 697 * @param userId the user ID 698 * @param classNameId the class name ID 699 * @param classPKs the class p ks 700 * @param start the lower bound of the range of subscriptions 701 * @param end the upper bound of the range of subscriptions (not inclusive) 702 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 703 * @return the ordered range of matching subscriptions 704 * @throws SystemException if a system exception occurred 705 */ 706 public static java.util.List<com.liferay.portal.model.Subscription> findByC_U_C_C( 707 long companyId, long userId, long classNameId, long[] classPKs, 708 int start, int end, 709 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 710 throws com.liferay.portal.kernel.exception.SystemException { 711 return getPersistence() 712 .findByC_U_C_C(companyId, userId, classNameId, classPKs, 713 start, end, orderByComparator); 714 } 715 716 /** 717 * 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. 718 * 719 * @param companyId the company ID 720 * @param userId the user ID 721 * @param classNameId the class name ID 722 * @param classPK the class p k 723 * @return the matching subscription 724 * @throws com.liferay.portal.NoSuchSubscriptionException if a matching subscription could not be found 725 * @throws SystemException if a system exception occurred 726 */ 727 public static com.liferay.portal.model.Subscription findByC_U_C_C( 728 long companyId, long userId, long classNameId, long classPK) 729 throws com.liferay.portal.NoSuchSubscriptionException, 730 com.liferay.portal.kernel.exception.SystemException { 731 return getPersistence() 732 .findByC_U_C_C(companyId, userId, classNameId, classPK); 733 } 734 735 /** 736 * 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. 737 * 738 * @param companyId the company ID 739 * @param userId the user ID 740 * @param classNameId the class name ID 741 * @param classPK the class p k 742 * @return the matching subscription, or <code>null</code> if a matching subscription could not be found 743 * @throws SystemException if a system exception occurred 744 */ 745 public static com.liferay.portal.model.Subscription fetchByC_U_C_C( 746 long companyId, long userId, long classNameId, long classPK) 747 throws com.liferay.portal.kernel.exception.SystemException { 748 return getPersistence() 749 .fetchByC_U_C_C(companyId, userId, classNameId, classPK); 750 } 751 752 /** 753 * 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. 754 * 755 * @param companyId the company ID 756 * @param userId the user ID 757 * @param classNameId the class name ID 758 * @param classPK the class p k 759 * @param retrieveFromCache whether to use the finder cache 760 * @return the matching subscription, or <code>null</code> if a matching subscription could not be found 761 * @throws SystemException if a system exception occurred 762 */ 763 public static com.liferay.portal.model.Subscription fetchByC_U_C_C( 764 long companyId, long userId, long classNameId, long classPK, 765 boolean retrieveFromCache) 766 throws com.liferay.portal.kernel.exception.SystemException { 767 return getPersistence() 768 .fetchByC_U_C_C(companyId, userId, classNameId, classPK, 769 retrieveFromCache); 770 } 771 772 /** 773 * Removes the subscription where companyId = ? and userId = ? and classNameId = ? and classPK = ? from the database. 774 * 775 * @param companyId the company ID 776 * @param userId the user ID 777 * @param classNameId the class name ID 778 * @param classPK the class p k 779 * @return the subscription that was removed 780 * @throws SystemException if a system exception occurred 781 */ 782 public static com.liferay.portal.model.Subscription removeByC_U_C_C( 783 long companyId, long userId, long classNameId, long classPK) 784 throws com.liferay.portal.NoSuchSubscriptionException, 785 com.liferay.portal.kernel.exception.SystemException { 786 return getPersistence() 787 .removeByC_U_C_C(companyId, userId, classNameId, classPK); 788 } 789 790 /** 791 * Returns the number of subscriptions where companyId = ? and userId = ? and classNameId = ? and classPK = ?. 792 * 793 * @param companyId the company ID 794 * @param userId the user ID 795 * @param classNameId the class name ID 796 * @param classPK the class p k 797 * @return the number of matching subscriptions 798 * @throws SystemException if a system exception occurred 799 */ 800 public static int countByC_U_C_C(long companyId, long userId, 801 long classNameId, long classPK) 802 throws com.liferay.portal.kernel.exception.SystemException { 803 return getPersistence() 804 .countByC_U_C_C(companyId, userId, classNameId, classPK); 805 } 806 807 /** 808 * Returns the number of subscriptions where companyId = ? and userId = ? and classNameId = ? and classPK = any ?. 809 * 810 * @param companyId the company ID 811 * @param userId the user ID 812 * @param classNameId the class name ID 813 * @param classPKs the class p ks 814 * @return the number of matching subscriptions 815 * @throws SystemException if a system exception occurred 816 */ 817 public static int countByC_U_C_C(long companyId, long userId, 818 long classNameId, long[] classPKs) 819 throws com.liferay.portal.kernel.exception.SystemException { 820 return getPersistence() 821 .countByC_U_C_C(companyId, userId, classNameId, classPKs); 822 } 823 824 /** 825 * Caches the subscription in the entity cache if it is enabled. 826 * 827 * @param subscription the subscription 828 */ 829 public static void cacheResult( 830 com.liferay.portal.model.Subscription subscription) { 831 getPersistence().cacheResult(subscription); 832 } 833 834 /** 835 * Caches the subscriptions in the entity cache if it is enabled. 836 * 837 * @param subscriptions the subscriptions 838 */ 839 public static void cacheResult( 840 java.util.List<com.liferay.portal.model.Subscription> subscriptions) { 841 getPersistence().cacheResult(subscriptions); 842 } 843 844 /** 845 * Creates a new subscription with the primary key. Does not add the subscription to the database. 846 * 847 * @param subscriptionId the primary key for the new subscription 848 * @return the new subscription 849 */ 850 public static com.liferay.portal.model.Subscription create( 851 long subscriptionId) { 852 return getPersistence().create(subscriptionId); 853 } 854 855 /** 856 * Removes the subscription with the primary key from the database. Also notifies the appropriate model listeners. 857 * 858 * @param subscriptionId the primary key of the subscription 859 * @return the subscription that was removed 860 * @throws com.liferay.portal.NoSuchSubscriptionException if a subscription with the primary key could not be found 861 * @throws SystemException if a system exception occurred 862 */ 863 public static com.liferay.portal.model.Subscription remove( 864 long subscriptionId) 865 throws com.liferay.portal.NoSuchSubscriptionException, 866 com.liferay.portal.kernel.exception.SystemException { 867 return getPersistence().remove(subscriptionId); 868 } 869 870 public static com.liferay.portal.model.Subscription updateImpl( 871 com.liferay.portal.model.Subscription subscription) 872 throws com.liferay.portal.kernel.exception.SystemException { 873 return getPersistence().updateImpl(subscription); 874 } 875 876 /** 877 * Returns the subscription with the primary key or throws a {@link com.liferay.portal.NoSuchSubscriptionException} if it could not be found. 878 * 879 * @param subscriptionId the primary key of the subscription 880 * @return the subscription 881 * @throws com.liferay.portal.NoSuchSubscriptionException if a subscription with the primary key could not be found 882 * @throws SystemException if a system exception occurred 883 */ 884 public static com.liferay.portal.model.Subscription findByPrimaryKey( 885 long subscriptionId) 886 throws com.liferay.portal.NoSuchSubscriptionException, 887 com.liferay.portal.kernel.exception.SystemException { 888 return getPersistence().findByPrimaryKey(subscriptionId); 889 } 890 891 /** 892 * Returns the subscription with the primary key or returns <code>null</code> if it could not be found. 893 * 894 * @param subscriptionId the primary key of the subscription 895 * @return the subscription, or <code>null</code> if a subscription with the primary key could not be found 896 * @throws SystemException if a system exception occurred 897 */ 898 public static com.liferay.portal.model.Subscription fetchByPrimaryKey( 899 long subscriptionId) 900 throws com.liferay.portal.kernel.exception.SystemException { 901 return getPersistence().fetchByPrimaryKey(subscriptionId); 902 } 903 904 /** 905 * Returns all the subscriptions. 906 * 907 * @return the subscriptions 908 * @throws SystemException if a system exception occurred 909 */ 910 public static java.util.List<com.liferay.portal.model.Subscription> findAll() 911 throws com.liferay.portal.kernel.exception.SystemException { 912 return getPersistence().findAll(); 913 } 914 915 /** 916 * Returns a range of all the subscriptions. 917 * 918 * <p> 919 * 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. 920 * </p> 921 * 922 * @param start the lower bound of the range of subscriptions 923 * @param end the upper bound of the range of subscriptions (not inclusive) 924 * @return the range of subscriptions 925 * @throws SystemException if a system exception occurred 926 */ 927 public static java.util.List<com.liferay.portal.model.Subscription> findAll( 928 int start, int end) 929 throws com.liferay.portal.kernel.exception.SystemException { 930 return getPersistence().findAll(start, end); 931 } 932 933 /** 934 * Returns an ordered range of all the subscriptions. 935 * 936 * <p> 937 * 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. 938 * </p> 939 * 940 * @param start the lower bound of the range of subscriptions 941 * @param end the upper bound of the range of subscriptions (not inclusive) 942 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 943 * @return the ordered range of subscriptions 944 * @throws SystemException if a system exception occurred 945 */ 946 public static java.util.List<com.liferay.portal.model.Subscription> findAll( 947 int start, int end, 948 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 949 throws com.liferay.portal.kernel.exception.SystemException { 950 return getPersistence().findAll(start, end, orderByComparator); 951 } 952 953 /** 954 * Removes all the subscriptions from the database. 955 * 956 * @throws SystemException if a system exception occurred 957 */ 958 public static void removeAll() 959 throws com.liferay.portal.kernel.exception.SystemException { 960 getPersistence().removeAll(); 961 } 962 963 /** 964 * Returns the number of subscriptions. 965 * 966 * @return the number of subscriptions 967 * @throws SystemException if a system exception occurred 968 */ 969 public static int countAll() 970 throws com.liferay.portal.kernel.exception.SystemException { 971 return getPersistence().countAll(); 972 } 973 974 public static SubscriptionPersistence getPersistence() { 975 if (_persistence == null) { 976 _persistence = (SubscriptionPersistence)PortalBeanLocatorUtil.locate(SubscriptionPersistence.class.getName()); 977 978 ReferenceRegistry.registerReference(SubscriptionUtil.class, 979 "_persistence"); 980 } 981 982 return _persistence; 983 } 984 985 /** 986 * @deprecated As of 6.2.0 987 */ 988 public void setPersistence(SubscriptionPersistence persistence) { 989 } 990 991 private static SubscriptionPersistence _persistence; 992 }