001 /** 002 * Copyright (c) 2000-present Liferay, Inc. All rights reserved. 003 * 004 * This library is free software; you can redistribute it and/or modify it under 005 * the terms of the GNU Lesser General Public License as published by the Free 006 * Software Foundation; either version 2.1 of the License, or (at your option) 007 * any later version. 008 * 009 * This library is distributed in the hope that it will be useful, but WITHOUT 010 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 011 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 012 * details. 013 */ 014 015 package com.liferay.portlet.softwarecatalog.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.util.OrderByComparator; 022 import com.liferay.portal.kernel.util.ReferenceRegistry; 023 import com.liferay.portal.service.ServiceContext; 024 025 import com.liferay.portlet.softwarecatalog.model.SCLicense; 026 027 import java.util.List; 028 029 /** 030 * The persistence utility for the s c license service. This utility wraps {@link com.liferay.portlet.softwarecatalog.service.persistence.impl.SCLicensePersistenceImpl} 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 SCLicensePersistence 038 * @see com.liferay.portlet.softwarecatalog.service.persistence.impl.SCLicensePersistenceImpl 039 * @generated 040 */ 041 @ProviderType 042 public class SCLicenseUtil { 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(SCLicense scLicense) { 060 getPersistence().clearCache(scLicense); 061 } 062 063 /** 064 * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery) 065 */ 066 public static long countWithDynamicQuery(DynamicQuery dynamicQuery) { 067 return getPersistence().countWithDynamicQuery(dynamicQuery); 068 } 069 070 /** 071 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery) 072 */ 073 public static List<SCLicense> findWithDynamicQuery( 074 DynamicQuery dynamicQuery) { 075 return getPersistence().findWithDynamicQuery(dynamicQuery); 076 } 077 078 /** 079 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int) 080 */ 081 public static List<SCLicense> findWithDynamicQuery( 082 DynamicQuery dynamicQuery, int start, int end) { 083 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end); 084 } 085 086 /** 087 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator) 088 */ 089 public static List<SCLicense> findWithDynamicQuery( 090 DynamicQuery dynamicQuery, int start, int end, 091 OrderByComparator<SCLicense> orderByComparator) { 092 return getPersistence() 093 .findWithDynamicQuery(dynamicQuery, start, end, 094 orderByComparator); 095 } 096 097 /** 098 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel) 099 */ 100 public static SCLicense update(SCLicense scLicense) { 101 return getPersistence().update(scLicense); 102 } 103 104 /** 105 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext) 106 */ 107 public static SCLicense update(SCLicense scLicense, 108 ServiceContext serviceContext) { 109 return getPersistence().update(scLicense, serviceContext); 110 } 111 112 /** 113 * Returns all the s c licenses where active = ?. 114 * 115 * @param active the active 116 * @return the matching s c licenses 117 */ 118 public static List<SCLicense> findByActive(boolean active) { 119 return getPersistence().findByActive(active); 120 } 121 122 /** 123 * Returns a range of all the s c licenses where active = ?. 124 * 125 * <p> 126 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SCLicenseModelImpl}. 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. 127 * </p> 128 * 129 * @param active the active 130 * @param start the lower bound of the range of s c licenses 131 * @param end the upper bound of the range of s c licenses (not inclusive) 132 * @return the range of matching s c licenses 133 */ 134 public static List<SCLicense> findByActive(boolean active, int start, 135 int end) { 136 return getPersistence().findByActive(active, start, end); 137 } 138 139 /** 140 * Returns an ordered range of all the s c licenses where active = ?. 141 * 142 * <p> 143 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SCLicenseModelImpl}. 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. 144 * </p> 145 * 146 * @param active the active 147 * @param start the lower bound of the range of s c licenses 148 * @param end the upper bound of the range of s c licenses (not inclusive) 149 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 150 * @return the ordered range of matching s c licenses 151 */ 152 public static List<SCLicense> findByActive(boolean active, int start, 153 int end, OrderByComparator<SCLicense> orderByComparator) { 154 return getPersistence() 155 .findByActive(active, start, end, orderByComparator); 156 } 157 158 /** 159 * Returns an ordered range of all the s c licenses where active = ?. 160 * 161 * <p> 162 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SCLicenseModelImpl}. 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. 163 * </p> 164 * 165 * @param active the active 166 * @param start the lower bound of the range of s c licenses 167 * @param end the upper bound of the range of s c licenses (not inclusive) 168 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 169 * @param retrieveFromCache whether to retrieve from the finder cache 170 * @return the ordered range of matching s c licenses 171 */ 172 public static List<SCLicense> findByActive(boolean active, int start, 173 int end, OrderByComparator<SCLicense> orderByComparator, 174 boolean retrieveFromCache) { 175 return getPersistence() 176 .findByActive(active, start, end, orderByComparator, 177 retrieveFromCache); 178 } 179 180 /** 181 * Returns the first s c license in the ordered set where active = ?. 182 * 183 * @param active the active 184 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 185 * @return the first matching s c license 186 * @throws NoSuchLicenseException if a matching s c license could not be found 187 */ 188 public static SCLicense findByActive_First(boolean active, 189 OrderByComparator<SCLicense> orderByComparator) 190 throws com.liferay.portlet.softwarecatalog.NoSuchLicenseException { 191 return getPersistence().findByActive_First(active, orderByComparator); 192 } 193 194 /** 195 * Returns the first s c license in the ordered set where active = ?. 196 * 197 * @param active the active 198 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 199 * @return the first matching s c license, or <code>null</code> if a matching s c license could not be found 200 */ 201 public static SCLicense fetchByActive_First(boolean active, 202 OrderByComparator<SCLicense> orderByComparator) { 203 return getPersistence().fetchByActive_First(active, orderByComparator); 204 } 205 206 /** 207 * Returns the last s c license in the ordered set where active = ?. 208 * 209 * @param active the active 210 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 211 * @return the last matching s c license 212 * @throws NoSuchLicenseException if a matching s c license could not be found 213 */ 214 public static SCLicense findByActive_Last(boolean active, 215 OrderByComparator<SCLicense> orderByComparator) 216 throws com.liferay.portlet.softwarecatalog.NoSuchLicenseException { 217 return getPersistence().findByActive_Last(active, orderByComparator); 218 } 219 220 /** 221 * Returns the last s c license in the ordered set where active = ?. 222 * 223 * @param active the active 224 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 225 * @return the last matching s c license, or <code>null</code> if a matching s c license could not be found 226 */ 227 public static SCLicense fetchByActive_Last(boolean active, 228 OrderByComparator<SCLicense> orderByComparator) { 229 return getPersistence().fetchByActive_Last(active, orderByComparator); 230 } 231 232 /** 233 * Returns the s c licenses before and after the current s c license in the ordered set where active = ?. 234 * 235 * @param licenseId the primary key of the current s c license 236 * @param active the active 237 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 238 * @return the previous, current, and next s c license 239 * @throws NoSuchLicenseException if a s c license with the primary key could not be found 240 */ 241 public static SCLicense[] findByActive_PrevAndNext(long licenseId, 242 boolean active, OrderByComparator<SCLicense> orderByComparator) 243 throws com.liferay.portlet.softwarecatalog.NoSuchLicenseException { 244 return getPersistence() 245 .findByActive_PrevAndNext(licenseId, active, 246 orderByComparator); 247 } 248 249 /** 250 * Returns all the s c licenses that the user has permission to view where active = ?. 251 * 252 * @param active the active 253 * @return the matching s c licenses that the user has permission to view 254 */ 255 public static List<SCLicense> filterFindByActive(boolean active) { 256 return getPersistence().filterFindByActive(active); 257 } 258 259 /** 260 * Returns a range of all the s c licenses that the user has permission to view where active = ?. 261 * 262 * <p> 263 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SCLicenseModelImpl}. 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. 264 * </p> 265 * 266 * @param active the active 267 * @param start the lower bound of the range of s c licenses 268 * @param end the upper bound of the range of s c licenses (not inclusive) 269 * @return the range of matching s c licenses that the user has permission to view 270 */ 271 public static List<SCLicense> filterFindByActive(boolean active, int start, 272 int end) { 273 return getPersistence().filterFindByActive(active, start, end); 274 } 275 276 /** 277 * Returns an ordered range of all the s c licenses that the user has permissions to view where active = ?. 278 * 279 * <p> 280 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SCLicenseModelImpl}. 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. 281 * </p> 282 * 283 * @param active the active 284 * @param start the lower bound of the range of s c licenses 285 * @param end the upper bound of the range of s c licenses (not inclusive) 286 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 287 * @return the ordered range of matching s c licenses that the user has permission to view 288 */ 289 public static List<SCLicense> filterFindByActive(boolean active, int start, 290 int end, OrderByComparator<SCLicense> orderByComparator) { 291 return getPersistence() 292 .filterFindByActive(active, start, end, orderByComparator); 293 } 294 295 /** 296 * Returns the s c licenses before and after the current s c license in the ordered set of s c licenses that the user has permission to view where active = ?. 297 * 298 * @param licenseId the primary key of the current s c license 299 * @param active the active 300 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 301 * @return the previous, current, and next s c license 302 * @throws NoSuchLicenseException if a s c license with the primary key could not be found 303 */ 304 public static SCLicense[] filterFindByActive_PrevAndNext(long licenseId, 305 boolean active, OrderByComparator<SCLicense> orderByComparator) 306 throws com.liferay.portlet.softwarecatalog.NoSuchLicenseException { 307 return getPersistence() 308 .filterFindByActive_PrevAndNext(licenseId, active, 309 orderByComparator); 310 } 311 312 /** 313 * Removes all the s c licenses where active = ? from the database. 314 * 315 * @param active the active 316 */ 317 public static void removeByActive(boolean active) { 318 getPersistence().removeByActive(active); 319 } 320 321 /** 322 * Returns the number of s c licenses where active = ?. 323 * 324 * @param active the active 325 * @return the number of matching s c licenses 326 */ 327 public static int countByActive(boolean active) { 328 return getPersistence().countByActive(active); 329 } 330 331 /** 332 * Returns the number of s c licenses that the user has permission to view where active = ?. 333 * 334 * @param active the active 335 * @return the number of matching s c licenses that the user has permission to view 336 */ 337 public static int filterCountByActive(boolean active) { 338 return getPersistence().filterCountByActive(active); 339 } 340 341 /** 342 * Returns all the s c licenses where active = ? and recommended = ?. 343 * 344 * @param active the active 345 * @param recommended the recommended 346 * @return the matching s c licenses 347 */ 348 public static List<SCLicense> findByA_R(boolean active, boolean recommended) { 349 return getPersistence().findByA_R(active, recommended); 350 } 351 352 /** 353 * Returns a range of all the s c licenses where active = ? and recommended = ?. 354 * 355 * <p> 356 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SCLicenseModelImpl}. 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. 357 * </p> 358 * 359 * @param active the active 360 * @param recommended the recommended 361 * @param start the lower bound of the range of s c licenses 362 * @param end the upper bound of the range of s c licenses (not inclusive) 363 * @return the range of matching s c licenses 364 */ 365 public static List<SCLicense> findByA_R(boolean active, 366 boolean recommended, int start, int end) { 367 return getPersistence().findByA_R(active, recommended, start, end); 368 } 369 370 /** 371 * Returns an ordered range of all the s c licenses where active = ? and recommended = ?. 372 * 373 * <p> 374 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SCLicenseModelImpl}. 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. 375 * </p> 376 * 377 * @param active the active 378 * @param recommended the recommended 379 * @param start the lower bound of the range of s c licenses 380 * @param end the upper bound of the range of s c licenses (not inclusive) 381 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 382 * @return the ordered range of matching s c licenses 383 */ 384 public static List<SCLicense> findByA_R(boolean active, 385 boolean recommended, int start, int end, 386 OrderByComparator<SCLicense> orderByComparator) { 387 return getPersistence() 388 .findByA_R(active, recommended, start, end, orderByComparator); 389 } 390 391 /** 392 * Returns an ordered range of all the s c licenses where active = ? and recommended = ?. 393 * 394 * <p> 395 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SCLicenseModelImpl}. 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. 396 * </p> 397 * 398 * @param active the active 399 * @param recommended the recommended 400 * @param start the lower bound of the range of s c licenses 401 * @param end the upper bound of the range of s c licenses (not inclusive) 402 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 403 * @param retrieveFromCache whether to retrieve from the finder cache 404 * @return the ordered range of matching s c licenses 405 */ 406 public static List<SCLicense> findByA_R(boolean active, 407 boolean recommended, int start, int end, 408 OrderByComparator<SCLicense> orderByComparator, 409 boolean retrieveFromCache) { 410 return getPersistence() 411 .findByA_R(active, recommended, start, end, 412 orderByComparator, retrieveFromCache); 413 } 414 415 /** 416 * Returns the first s c license in the ordered set where active = ? and recommended = ?. 417 * 418 * @param active the active 419 * @param recommended the recommended 420 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 421 * @return the first matching s c license 422 * @throws NoSuchLicenseException if a matching s c license could not be found 423 */ 424 public static SCLicense findByA_R_First(boolean active, 425 boolean recommended, OrderByComparator<SCLicense> orderByComparator) 426 throws com.liferay.portlet.softwarecatalog.NoSuchLicenseException { 427 return getPersistence() 428 .findByA_R_First(active, recommended, orderByComparator); 429 } 430 431 /** 432 * Returns the first s c license in the ordered set where active = ? and recommended = ?. 433 * 434 * @param active the active 435 * @param recommended the recommended 436 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 437 * @return the first matching s c license, or <code>null</code> if a matching s c license could not be found 438 */ 439 public static SCLicense fetchByA_R_First(boolean active, 440 boolean recommended, OrderByComparator<SCLicense> orderByComparator) { 441 return getPersistence() 442 .fetchByA_R_First(active, recommended, orderByComparator); 443 } 444 445 /** 446 * Returns the last s c license in the ordered set where active = ? and recommended = ?. 447 * 448 * @param active the active 449 * @param recommended the recommended 450 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 451 * @return the last matching s c license 452 * @throws NoSuchLicenseException if a matching s c license could not be found 453 */ 454 public static SCLicense findByA_R_Last(boolean active, boolean recommended, 455 OrderByComparator<SCLicense> orderByComparator) 456 throws com.liferay.portlet.softwarecatalog.NoSuchLicenseException { 457 return getPersistence() 458 .findByA_R_Last(active, recommended, orderByComparator); 459 } 460 461 /** 462 * Returns the last s c license in the ordered set where active = ? and recommended = ?. 463 * 464 * @param active the active 465 * @param recommended the recommended 466 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 467 * @return the last matching s c license, or <code>null</code> if a matching s c license could not be found 468 */ 469 public static SCLicense fetchByA_R_Last(boolean active, 470 boolean recommended, OrderByComparator<SCLicense> orderByComparator) { 471 return getPersistence() 472 .fetchByA_R_Last(active, recommended, orderByComparator); 473 } 474 475 /** 476 * Returns the s c licenses before and after the current s c license in the ordered set where active = ? and recommended = ?. 477 * 478 * @param licenseId the primary key of the current s c license 479 * @param active the active 480 * @param recommended the recommended 481 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 482 * @return the previous, current, and next s c license 483 * @throws NoSuchLicenseException if a s c license with the primary key could not be found 484 */ 485 public static SCLicense[] findByA_R_PrevAndNext(long licenseId, 486 boolean active, boolean recommended, 487 OrderByComparator<SCLicense> orderByComparator) 488 throws com.liferay.portlet.softwarecatalog.NoSuchLicenseException { 489 return getPersistence() 490 .findByA_R_PrevAndNext(licenseId, active, recommended, 491 orderByComparator); 492 } 493 494 /** 495 * Returns all the s c licenses that the user has permission to view where active = ? and recommended = ?. 496 * 497 * @param active the active 498 * @param recommended the recommended 499 * @return the matching s c licenses that the user has permission to view 500 */ 501 public static List<SCLicense> filterFindByA_R(boolean active, 502 boolean recommended) { 503 return getPersistence().filterFindByA_R(active, recommended); 504 } 505 506 /** 507 * Returns a range of all the s c licenses that the user has permission to view where active = ? and recommended = ?. 508 * 509 * <p> 510 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SCLicenseModelImpl}. 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. 511 * </p> 512 * 513 * @param active the active 514 * @param recommended the recommended 515 * @param start the lower bound of the range of s c licenses 516 * @param end the upper bound of the range of s c licenses (not inclusive) 517 * @return the range of matching s c licenses that the user has permission to view 518 */ 519 public static List<SCLicense> filterFindByA_R(boolean active, 520 boolean recommended, int start, int end) { 521 return getPersistence().filterFindByA_R(active, recommended, start, end); 522 } 523 524 /** 525 * Returns an ordered range of all the s c licenses that the user has permissions to view where active = ? and recommended = ?. 526 * 527 * <p> 528 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SCLicenseModelImpl}. 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. 529 * </p> 530 * 531 * @param active the active 532 * @param recommended the recommended 533 * @param start the lower bound of the range of s c licenses 534 * @param end the upper bound of the range of s c licenses (not inclusive) 535 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 536 * @return the ordered range of matching s c licenses that the user has permission to view 537 */ 538 public static List<SCLicense> filterFindByA_R(boolean active, 539 boolean recommended, int start, int end, 540 OrderByComparator<SCLicense> orderByComparator) { 541 return getPersistence() 542 .filterFindByA_R(active, recommended, start, end, 543 orderByComparator); 544 } 545 546 /** 547 * Returns the s c licenses before and after the current s c license in the ordered set of s c licenses that the user has permission to view where active = ? and recommended = ?. 548 * 549 * @param licenseId the primary key of the current s c license 550 * @param active the active 551 * @param recommended the recommended 552 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 553 * @return the previous, current, and next s c license 554 * @throws NoSuchLicenseException if a s c license with the primary key could not be found 555 */ 556 public static SCLicense[] filterFindByA_R_PrevAndNext(long licenseId, 557 boolean active, boolean recommended, 558 OrderByComparator<SCLicense> orderByComparator) 559 throws com.liferay.portlet.softwarecatalog.NoSuchLicenseException { 560 return getPersistence() 561 .filterFindByA_R_PrevAndNext(licenseId, active, recommended, 562 orderByComparator); 563 } 564 565 /** 566 * Removes all the s c licenses where active = ? and recommended = ? from the database. 567 * 568 * @param active the active 569 * @param recommended the recommended 570 */ 571 public static void removeByA_R(boolean active, boolean recommended) { 572 getPersistence().removeByA_R(active, recommended); 573 } 574 575 /** 576 * Returns the number of s c licenses where active = ? and recommended = ?. 577 * 578 * @param active the active 579 * @param recommended the recommended 580 * @return the number of matching s c licenses 581 */ 582 public static int countByA_R(boolean active, boolean recommended) { 583 return getPersistence().countByA_R(active, recommended); 584 } 585 586 /** 587 * Returns the number of s c licenses that the user has permission to view where active = ? and recommended = ?. 588 * 589 * @param active the active 590 * @param recommended the recommended 591 * @return the number of matching s c licenses that the user has permission to view 592 */ 593 public static int filterCountByA_R(boolean active, boolean recommended) { 594 return getPersistence().filterCountByA_R(active, recommended); 595 } 596 597 /** 598 * Caches the s c license in the entity cache if it is enabled. 599 * 600 * @param scLicense the s c license 601 */ 602 public static void cacheResult(SCLicense scLicense) { 603 getPersistence().cacheResult(scLicense); 604 } 605 606 /** 607 * Caches the s c licenses in the entity cache if it is enabled. 608 * 609 * @param scLicenses the s c licenses 610 */ 611 public static void cacheResult(List<SCLicense> scLicenses) { 612 getPersistence().cacheResult(scLicenses); 613 } 614 615 /** 616 * Creates a new s c license with the primary key. Does not add the s c license to the database. 617 * 618 * @param licenseId the primary key for the new s c license 619 * @return the new s c license 620 */ 621 public static SCLicense create(long licenseId) { 622 return getPersistence().create(licenseId); 623 } 624 625 /** 626 * Removes the s c license with the primary key from the database. Also notifies the appropriate model listeners. 627 * 628 * @param licenseId the primary key of the s c license 629 * @return the s c license that was removed 630 * @throws NoSuchLicenseException if a s c license with the primary key could not be found 631 */ 632 public static SCLicense remove(long licenseId) 633 throws com.liferay.portlet.softwarecatalog.NoSuchLicenseException { 634 return getPersistence().remove(licenseId); 635 } 636 637 public static SCLicense updateImpl(SCLicense scLicense) { 638 return getPersistence().updateImpl(scLicense); 639 } 640 641 /** 642 * Returns the s c license with the primary key or throws a {@link NoSuchLicenseException} if it could not be found. 643 * 644 * @param licenseId the primary key of the s c license 645 * @return the s c license 646 * @throws NoSuchLicenseException if a s c license with the primary key could not be found 647 */ 648 public static SCLicense findByPrimaryKey(long licenseId) 649 throws com.liferay.portlet.softwarecatalog.NoSuchLicenseException { 650 return getPersistence().findByPrimaryKey(licenseId); 651 } 652 653 /** 654 * Returns the s c license with the primary key or returns <code>null</code> if it could not be found. 655 * 656 * @param licenseId the primary key of the s c license 657 * @return the s c license, or <code>null</code> if a s c license with the primary key could not be found 658 */ 659 public static SCLicense fetchByPrimaryKey(long licenseId) { 660 return getPersistence().fetchByPrimaryKey(licenseId); 661 } 662 663 public static java.util.Map<java.io.Serializable, SCLicense> fetchByPrimaryKeys( 664 java.util.Set<java.io.Serializable> primaryKeys) { 665 return getPersistence().fetchByPrimaryKeys(primaryKeys); 666 } 667 668 /** 669 * Returns all the s c licenses. 670 * 671 * @return the s c licenses 672 */ 673 public static List<SCLicense> findAll() { 674 return getPersistence().findAll(); 675 } 676 677 /** 678 * Returns a range of all the s c licenses. 679 * 680 * <p> 681 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SCLicenseModelImpl}. 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. 682 * </p> 683 * 684 * @param start the lower bound of the range of s c licenses 685 * @param end the upper bound of the range of s c licenses (not inclusive) 686 * @return the range of s c licenses 687 */ 688 public static List<SCLicense> findAll(int start, int end) { 689 return getPersistence().findAll(start, end); 690 } 691 692 /** 693 * Returns an ordered range of all the s c licenses. 694 * 695 * <p> 696 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SCLicenseModelImpl}. 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. 697 * </p> 698 * 699 * @param start the lower bound of the range of s c licenses 700 * @param end the upper bound of the range of s c licenses (not inclusive) 701 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 702 * @return the ordered range of s c licenses 703 */ 704 public static List<SCLicense> findAll(int start, int end, 705 OrderByComparator<SCLicense> orderByComparator) { 706 return getPersistence().findAll(start, end, orderByComparator); 707 } 708 709 /** 710 * Returns an ordered range of all the s c licenses. 711 * 712 * <p> 713 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SCLicenseModelImpl}. 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. 714 * </p> 715 * 716 * @param start the lower bound of the range of s c licenses 717 * @param end the upper bound of the range of s c licenses (not inclusive) 718 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 719 * @param retrieveFromCache whether to retrieve from the finder cache 720 * @return the ordered range of s c licenses 721 */ 722 public static List<SCLicense> findAll(int start, int end, 723 OrderByComparator<SCLicense> orderByComparator, 724 boolean retrieveFromCache) { 725 return getPersistence() 726 .findAll(start, end, orderByComparator, retrieveFromCache); 727 } 728 729 /** 730 * Removes all the s c licenses from the database. 731 */ 732 public static void removeAll() { 733 getPersistence().removeAll(); 734 } 735 736 /** 737 * Returns the number of s c licenses. 738 * 739 * @return the number of s c licenses 740 */ 741 public static int countAll() { 742 return getPersistence().countAll(); 743 } 744 745 /** 746 * Returns the primaryKeys of s c product entries associated with the s c license. 747 * 748 * @param pk the primary key of the s c license 749 * @return long[] of the primaryKeys of s c product entries associated with the s c license 750 */ 751 public static long[] getSCProductEntryPrimaryKeys(long pk) { 752 return getPersistence().getSCProductEntryPrimaryKeys(pk); 753 } 754 755 /** 756 * Returns all the s c product entries associated with the s c license. 757 * 758 * @param pk the primary key of the s c license 759 * @return the s c product entries associated with the s c license 760 */ 761 public static List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> getSCProductEntries( 762 long pk) { 763 return getPersistence().getSCProductEntries(pk); 764 } 765 766 /** 767 * Returns a range of all the s c product entries associated with the s c license. 768 * 769 * <p> 770 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SCLicenseModelImpl}. 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. 771 * </p> 772 * 773 * @param pk the primary key of the s c license 774 * @param start the lower bound of the range of s c licenses 775 * @param end the upper bound of the range of s c licenses (not inclusive) 776 * @return the range of s c product entries associated with the s c license 777 */ 778 public static List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> getSCProductEntries( 779 long pk, int start, int end) { 780 return getPersistence().getSCProductEntries(pk, start, end); 781 } 782 783 /** 784 * Returns an ordered range of all the s c product entries associated with the s c license. 785 * 786 * <p> 787 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SCLicenseModelImpl}. 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. 788 * </p> 789 * 790 * @param pk the primary key of the s c license 791 * @param start the lower bound of the range of s c licenses 792 * @param end the upper bound of the range of s c licenses (not inclusive) 793 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 794 * @return the ordered range of s c product entries associated with the s c license 795 */ 796 public static List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> getSCProductEntries( 797 long pk, int start, int end, 798 OrderByComparator<com.liferay.portlet.softwarecatalog.model.SCProductEntry> orderByComparator) { 799 return getPersistence() 800 .getSCProductEntries(pk, start, end, orderByComparator); 801 } 802 803 /** 804 * Returns the number of s c product entries associated with the s c license. 805 * 806 * @param pk the primary key of the s c license 807 * @return the number of s c product entries associated with the s c license 808 */ 809 public static int getSCProductEntriesSize(long pk) { 810 return getPersistence().getSCProductEntriesSize(pk); 811 } 812 813 /** 814 * Returns <code>true</code> if the s c product entry is associated with the s c license. 815 * 816 * @param pk the primary key of the s c license 817 * @param scProductEntryPK the primary key of the s c product entry 818 * @return <code>true</code> if the s c product entry is associated with the s c license; <code>false</code> otherwise 819 */ 820 public static boolean containsSCProductEntry(long pk, long scProductEntryPK) { 821 return getPersistence().containsSCProductEntry(pk, scProductEntryPK); 822 } 823 824 /** 825 * Returns <code>true</code> if the s c license has any s c product entries associated with it. 826 * 827 * @param pk the primary key of the s c license to check for associations with s c product entries 828 * @return <code>true</code> if the s c license has any s c product entries associated with it; <code>false</code> otherwise 829 */ 830 public static boolean containsSCProductEntries(long pk) { 831 return getPersistence().containsSCProductEntries(pk); 832 } 833 834 /** 835 * Adds an association between the s c license and the s c product entry. Also notifies the appropriate model listeners and clears the mapping table finder cache. 836 * 837 * @param pk the primary key of the s c license 838 * @param scProductEntryPK the primary key of the s c product entry 839 */ 840 public static void addSCProductEntry(long pk, long scProductEntryPK) { 841 getPersistence().addSCProductEntry(pk, scProductEntryPK); 842 } 843 844 /** 845 * Adds an association between the s c license and the s c product entry. Also notifies the appropriate model listeners and clears the mapping table finder cache. 846 * 847 * @param pk the primary key of the s c license 848 * @param scProductEntry the s c product entry 849 */ 850 public static void addSCProductEntry(long pk, 851 com.liferay.portlet.softwarecatalog.model.SCProductEntry scProductEntry) { 852 getPersistence().addSCProductEntry(pk, scProductEntry); 853 } 854 855 /** 856 * Adds an association between the s c license and the s c product entries. Also notifies the appropriate model listeners and clears the mapping table finder cache. 857 * 858 * @param pk the primary key of the s c license 859 * @param scProductEntryPKs the primary keys of the s c product entries 860 */ 861 public static void addSCProductEntries(long pk, long[] scProductEntryPKs) { 862 getPersistence().addSCProductEntries(pk, scProductEntryPKs); 863 } 864 865 /** 866 * Adds an association between the s c license and the s c product entries. Also notifies the appropriate model listeners and clears the mapping table finder cache. 867 * 868 * @param pk the primary key of the s c license 869 * @param scProductEntries the s c product entries 870 */ 871 public static void addSCProductEntries(long pk, 872 List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> scProductEntries) { 873 getPersistence().addSCProductEntries(pk, scProductEntries); 874 } 875 876 /** 877 * Clears all associations between the s c license and its s c product entries. Also notifies the appropriate model listeners and clears the mapping table finder cache. 878 * 879 * @param pk the primary key of the s c license to clear the associated s c product entries from 880 */ 881 public static void clearSCProductEntries(long pk) { 882 getPersistence().clearSCProductEntries(pk); 883 } 884 885 /** 886 * Removes the association between the s c license and the s c product entry. Also notifies the appropriate model listeners and clears the mapping table finder cache. 887 * 888 * @param pk the primary key of the s c license 889 * @param scProductEntryPK the primary key of the s c product entry 890 */ 891 public static void removeSCProductEntry(long pk, long scProductEntryPK) { 892 getPersistence().removeSCProductEntry(pk, scProductEntryPK); 893 } 894 895 /** 896 * Removes the association between the s c license and the s c product entry. Also notifies the appropriate model listeners and clears the mapping table finder cache. 897 * 898 * @param pk the primary key of the s c license 899 * @param scProductEntry the s c product entry 900 */ 901 public static void removeSCProductEntry(long pk, 902 com.liferay.portlet.softwarecatalog.model.SCProductEntry scProductEntry) { 903 getPersistence().removeSCProductEntry(pk, scProductEntry); 904 } 905 906 /** 907 * Removes the association between the s c license and the s c product entries. Also notifies the appropriate model listeners and clears the mapping table finder cache. 908 * 909 * @param pk the primary key of the s c license 910 * @param scProductEntryPKs the primary keys of the s c product entries 911 */ 912 public static void removeSCProductEntries(long pk, long[] scProductEntryPKs) { 913 getPersistence().removeSCProductEntries(pk, scProductEntryPKs); 914 } 915 916 /** 917 * Removes the association between the s c license and the s c product entries. Also notifies the appropriate model listeners and clears the mapping table finder cache. 918 * 919 * @param pk the primary key of the s c license 920 * @param scProductEntries the s c product entries 921 */ 922 public static void removeSCProductEntries(long pk, 923 List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> scProductEntries) { 924 getPersistence().removeSCProductEntries(pk, scProductEntries); 925 } 926 927 /** 928 * Sets the s c product entries associated with the s c license, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache. 929 * 930 * @param pk the primary key of the s c license 931 * @param scProductEntryPKs the primary keys of the s c product entries to be associated with the s c license 932 */ 933 public static void setSCProductEntries(long pk, long[] scProductEntryPKs) { 934 getPersistence().setSCProductEntries(pk, scProductEntryPKs); 935 } 936 937 /** 938 * Sets the s c product entries associated with the s c license, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache. 939 * 940 * @param pk the primary key of the s c license 941 * @param scProductEntries the s c product entries to be associated with the s c license 942 */ 943 public static void setSCProductEntries(long pk, 944 List<com.liferay.portlet.softwarecatalog.model.SCProductEntry> scProductEntries) { 945 getPersistence().setSCProductEntries(pk, scProductEntries); 946 } 947 948 public static java.util.Set<java.lang.String> getBadColumnNames() { 949 return getPersistence().getBadColumnNames(); 950 } 951 952 public static SCLicensePersistence getPersistence() { 953 if (_persistence == null) { 954 _persistence = (SCLicensePersistence)PortalBeanLocatorUtil.locate(SCLicensePersistence.class.getName()); 955 956 ReferenceRegistry.registerReference(SCLicenseUtil.class, 957 "_persistence"); 958 } 959 960 return _persistence; 961 } 962 963 /** 964 * @deprecated As of 6.2.0 965 */ 966 @Deprecated 967 public void setPersistence(SCLicensePersistence persistence) { 968 } 969 970 private static SCLicensePersistence _persistence; 971 }