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