001 /** 002 * Copyright (c) 2000-present Liferay, Inc. All rights reserved. 003 * 004 * This library is free software; you can redistribute it and/or modify it under 005 * the terms of the GNU Lesser General Public License as published by the Free 006 * Software Foundation; either version 2.1 of the License, or (at your option) 007 * any later version. 008 * 009 * This library is distributed in the hope that it will be useful, but WITHOUT 010 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 011 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 012 * details. 013 */ 014 015 package com.liferay.portal.service.persistence; 016 017 import aQute.bnd.annotation.ProviderType; 018 019 import com.liferay.portal.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.model.PasswordPolicyRel; 024 import com.liferay.portal.service.ServiceContext; 025 026 import java.util.List; 027 028 /** 029 * The persistence utility for the password policy rel service. This utility wraps {@link com.liferay.portal.service.persistence.impl.PasswordPolicyRelPersistenceImpl} 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. 030 * 031 * <p> 032 * Caching information and settings can be found in <code>portal.properties</code> 033 * </p> 034 * 035 * @author Brian Wing Shun Chan 036 * @see PasswordPolicyRelPersistence 037 * @see com.liferay.portal.service.persistence.impl.PasswordPolicyRelPersistenceImpl 038 * @generated 039 */ 040 @ProviderType 041 public class PasswordPolicyRelUtil { 042 /* 043 * NOTE FOR DEVELOPERS: 044 * 045 * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class. 046 */ 047 048 /** 049 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache() 050 */ 051 public static void clearCache() { 052 getPersistence().clearCache(); 053 } 054 055 /** 056 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel) 057 */ 058 public static void clearCache(PasswordPolicyRel passwordPolicyRel) { 059 getPersistence().clearCache(passwordPolicyRel); 060 } 061 062 /** 063 * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery) 064 */ 065 public static long countWithDynamicQuery(DynamicQuery dynamicQuery) { 066 return getPersistence().countWithDynamicQuery(dynamicQuery); 067 } 068 069 /** 070 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery) 071 */ 072 public static List<PasswordPolicyRel> findWithDynamicQuery( 073 DynamicQuery dynamicQuery) { 074 return getPersistence().findWithDynamicQuery(dynamicQuery); 075 } 076 077 /** 078 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int) 079 */ 080 public static List<PasswordPolicyRel> findWithDynamicQuery( 081 DynamicQuery dynamicQuery, int start, int end) { 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<PasswordPolicyRel> findWithDynamicQuery( 089 DynamicQuery dynamicQuery, int start, int end, 090 OrderByComparator<PasswordPolicyRel> orderByComparator) { 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 PasswordPolicyRel update(PasswordPolicyRel passwordPolicyRel) { 100 return getPersistence().update(passwordPolicyRel); 101 } 102 103 /** 104 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext) 105 */ 106 public static PasswordPolicyRel update( 107 PasswordPolicyRel passwordPolicyRel, ServiceContext serviceContext) { 108 return getPersistence().update(passwordPolicyRel, serviceContext); 109 } 110 111 /** 112 * Returns all the password policy rels where passwordPolicyId = ?. 113 * 114 * @param passwordPolicyId the password policy ID 115 * @return the matching password policy rels 116 */ 117 public static List<PasswordPolicyRel> findByPasswordPolicyId( 118 long passwordPolicyId) { 119 return getPersistence().findByPasswordPolicyId(passwordPolicyId); 120 } 121 122 /** 123 * Returns a range of all the password policy rels where passwordPolicyId = ?. 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 PasswordPolicyRelModelImpl}. 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 passwordPolicyId the password policy ID 130 * @param start the lower bound of the range of password policy rels 131 * @param end the upper bound of the range of password policy rels (not inclusive) 132 * @return the range of matching password policy rels 133 */ 134 public static List<PasswordPolicyRel> findByPasswordPolicyId( 135 long passwordPolicyId, int start, int end) { 136 return getPersistence() 137 .findByPasswordPolicyId(passwordPolicyId, start, end); 138 } 139 140 /** 141 * Returns an ordered range of all the password policy rels where passwordPolicyId = ?. 142 * 143 * <p> 144 * 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 PasswordPolicyRelModelImpl}. 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. 145 * </p> 146 * 147 * @param passwordPolicyId the password policy ID 148 * @param start the lower bound of the range of password policy rels 149 * @param end the upper bound of the range of password policy rels (not inclusive) 150 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 151 * @return the ordered range of matching password policy rels 152 */ 153 public static List<PasswordPolicyRel> findByPasswordPolicyId( 154 long passwordPolicyId, int start, int end, 155 OrderByComparator<PasswordPolicyRel> orderByComparator) { 156 return getPersistence() 157 .findByPasswordPolicyId(passwordPolicyId, start, end, 158 orderByComparator); 159 } 160 161 /** 162 * Returns the first password policy rel in the ordered set where passwordPolicyId = ?. 163 * 164 * @param passwordPolicyId the password policy ID 165 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 166 * @return the first matching password policy rel 167 * @throws NoSuchPasswordPolicyRelException if a matching password policy rel could not be found 168 */ 169 public static PasswordPolicyRel findByPasswordPolicyId_First( 170 long passwordPolicyId, 171 OrderByComparator<PasswordPolicyRel> orderByComparator) 172 throws com.liferay.portal.NoSuchPasswordPolicyRelException { 173 return getPersistence() 174 .findByPasswordPolicyId_First(passwordPolicyId, 175 orderByComparator); 176 } 177 178 /** 179 * Returns the first password policy rel in the ordered set where passwordPolicyId = ?. 180 * 181 * @param passwordPolicyId the password policy ID 182 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 183 * @return the first matching password policy rel, or <code>null</code> if a matching password policy rel could not be found 184 */ 185 public static PasswordPolicyRel fetchByPasswordPolicyId_First( 186 long passwordPolicyId, 187 OrderByComparator<PasswordPolicyRel> orderByComparator) { 188 return getPersistence() 189 .fetchByPasswordPolicyId_First(passwordPolicyId, 190 orderByComparator); 191 } 192 193 /** 194 * Returns the last password policy rel in the ordered set where passwordPolicyId = ?. 195 * 196 * @param passwordPolicyId the password policy ID 197 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 198 * @return the last matching password policy rel 199 * @throws NoSuchPasswordPolicyRelException if a matching password policy rel could not be found 200 */ 201 public static PasswordPolicyRel findByPasswordPolicyId_Last( 202 long passwordPolicyId, 203 OrderByComparator<PasswordPolicyRel> orderByComparator) 204 throws com.liferay.portal.NoSuchPasswordPolicyRelException { 205 return getPersistence() 206 .findByPasswordPolicyId_Last(passwordPolicyId, 207 orderByComparator); 208 } 209 210 /** 211 * Returns the last password policy rel in the ordered set where passwordPolicyId = ?. 212 * 213 * @param passwordPolicyId the password policy ID 214 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 215 * @return the last matching password policy rel, or <code>null</code> if a matching password policy rel could not be found 216 */ 217 public static PasswordPolicyRel fetchByPasswordPolicyId_Last( 218 long passwordPolicyId, 219 OrderByComparator<PasswordPolicyRel> orderByComparator) { 220 return getPersistence() 221 .fetchByPasswordPolicyId_Last(passwordPolicyId, 222 orderByComparator); 223 } 224 225 /** 226 * Returns the password policy rels before and after the current password policy rel in the ordered set where passwordPolicyId = ?. 227 * 228 * @param passwordPolicyRelId the primary key of the current password policy rel 229 * @param passwordPolicyId the password policy ID 230 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 231 * @return the previous, current, and next password policy rel 232 * @throws NoSuchPasswordPolicyRelException if a password policy rel with the primary key could not be found 233 */ 234 public static PasswordPolicyRel[] findByPasswordPolicyId_PrevAndNext( 235 long passwordPolicyRelId, long passwordPolicyId, 236 OrderByComparator<PasswordPolicyRel> orderByComparator) 237 throws com.liferay.portal.NoSuchPasswordPolicyRelException { 238 return getPersistence() 239 .findByPasswordPolicyId_PrevAndNext(passwordPolicyRelId, 240 passwordPolicyId, orderByComparator); 241 } 242 243 /** 244 * Removes all the password policy rels where passwordPolicyId = ? from the database. 245 * 246 * @param passwordPolicyId the password policy ID 247 */ 248 public static void removeByPasswordPolicyId(long passwordPolicyId) { 249 getPersistence().removeByPasswordPolicyId(passwordPolicyId); 250 } 251 252 /** 253 * Returns the number of password policy rels where passwordPolicyId = ?. 254 * 255 * @param passwordPolicyId the password policy ID 256 * @return the number of matching password policy rels 257 */ 258 public static int countByPasswordPolicyId(long passwordPolicyId) { 259 return getPersistence().countByPasswordPolicyId(passwordPolicyId); 260 } 261 262 /** 263 * Returns the password policy rel where classNameId = ? and classPK = ? or throws a {@link NoSuchPasswordPolicyRelException} if it could not be found. 264 * 265 * @param classNameId the class name ID 266 * @param classPK the class p k 267 * @return the matching password policy rel 268 * @throws NoSuchPasswordPolicyRelException if a matching password policy rel could not be found 269 */ 270 public static PasswordPolicyRel findByC_C(long classNameId, long classPK) 271 throws com.liferay.portal.NoSuchPasswordPolicyRelException { 272 return getPersistence().findByC_C(classNameId, classPK); 273 } 274 275 /** 276 * Returns the password policy rel where classNameId = ? and classPK = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 277 * 278 * @param classNameId the class name ID 279 * @param classPK the class p k 280 * @return the matching password policy rel, or <code>null</code> if a matching password policy rel could not be found 281 */ 282 public static PasswordPolicyRel fetchByC_C(long classNameId, long classPK) { 283 return getPersistence().fetchByC_C(classNameId, classPK); 284 } 285 286 /** 287 * Returns the password policy rel where classNameId = ? and classPK = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 288 * 289 * @param classNameId the class name ID 290 * @param classPK the class p k 291 * @param retrieveFromCache whether to use the finder cache 292 * @return the matching password policy rel, or <code>null</code> if a matching password policy rel could not be found 293 */ 294 public static PasswordPolicyRel fetchByC_C(long classNameId, long classPK, 295 boolean retrieveFromCache) { 296 return getPersistence() 297 .fetchByC_C(classNameId, classPK, retrieveFromCache); 298 } 299 300 /** 301 * Removes the password policy rel where classNameId = ? and classPK = ? from the database. 302 * 303 * @param classNameId the class name ID 304 * @param classPK the class p k 305 * @return the password policy rel that was removed 306 */ 307 public static PasswordPolicyRel removeByC_C(long classNameId, long classPK) 308 throws com.liferay.portal.NoSuchPasswordPolicyRelException { 309 return getPersistence().removeByC_C(classNameId, classPK); 310 } 311 312 /** 313 * Returns the number of password policy rels where classNameId = ? and classPK = ?. 314 * 315 * @param classNameId the class name ID 316 * @param classPK the class p k 317 * @return the number of matching password policy rels 318 */ 319 public static int countByC_C(long classNameId, long classPK) { 320 return getPersistence().countByC_C(classNameId, classPK); 321 } 322 323 /** 324 * Caches the password policy rel in the entity cache if it is enabled. 325 * 326 * @param passwordPolicyRel the password policy rel 327 */ 328 public static void cacheResult(PasswordPolicyRel passwordPolicyRel) { 329 getPersistence().cacheResult(passwordPolicyRel); 330 } 331 332 /** 333 * Caches the password policy rels in the entity cache if it is enabled. 334 * 335 * @param passwordPolicyRels the password policy rels 336 */ 337 public static void cacheResult(List<PasswordPolicyRel> passwordPolicyRels) { 338 getPersistence().cacheResult(passwordPolicyRels); 339 } 340 341 /** 342 * Creates a new password policy rel with the primary key. Does not add the password policy rel to the database. 343 * 344 * @param passwordPolicyRelId the primary key for the new password policy rel 345 * @return the new password policy rel 346 */ 347 public static PasswordPolicyRel create(long passwordPolicyRelId) { 348 return getPersistence().create(passwordPolicyRelId); 349 } 350 351 /** 352 * Removes the password policy rel with the primary key from the database. Also notifies the appropriate model listeners. 353 * 354 * @param passwordPolicyRelId the primary key of the password policy rel 355 * @return the password policy rel that was removed 356 * @throws NoSuchPasswordPolicyRelException if a password policy rel with the primary key could not be found 357 */ 358 public static PasswordPolicyRel remove(long passwordPolicyRelId) 359 throws com.liferay.portal.NoSuchPasswordPolicyRelException { 360 return getPersistence().remove(passwordPolicyRelId); 361 } 362 363 public static PasswordPolicyRel updateImpl( 364 PasswordPolicyRel passwordPolicyRel) { 365 return getPersistence().updateImpl(passwordPolicyRel); 366 } 367 368 /** 369 * Returns the password policy rel with the primary key or throws a {@link NoSuchPasswordPolicyRelException} if it could not be found. 370 * 371 * @param passwordPolicyRelId the primary key of the password policy rel 372 * @return the password policy rel 373 * @throws NoSuchPasswordPolicyRelException if a password policy rel with the primary key could not be found 374 */ 375 public static PasswordPolicyRel findByPrimaryKey(long passwordPolicyRelId) 376 throws com.liferay.portal.NoSuchPasswordPolicyRelException { 377 return getPersistence().findByPrimaryKey(passwordPolicyRelId); 378 } 379 380 /** 381 * Returns the password policy rel with the primary key or returns <code>null</code> if it could not be found. 382 * 383 * @param passwordPolicyRelId the primary key of the password policy rel 384 * @return the password policy rel, or <code>null</code> if a password policy rel with the primary key could not be found 385 */ 386 public static PasswordPolicyRel fetchByPrimaryKey(long passwordPolicyRelId) { 387 return getPersistence().fetchByPrimaryKey(passwordPolicyRelId); 388 } 389 390 public static java.util.Map<java.io.Serializable, PasswordPolicyRel> fetchByPrimaryKeys( 391 java.util.Set<java.io.Serializable> primaryKeys) { 392 return getPersistence().fetchByPrimaryKeys(primaryKeys); 393 } 394 395 /** 396 * Returns all the password policy rels. 397 * 398 * @return the password policy rels 399 */ 400 public static List<PasswordPolicyRel> findAll() { 401 return getPersistence().findAll(); 402 } 403 404 /** 405 * Returns a range of all the password policy rels. 406 * 407 * <p> 408 * 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 PasswordPolicyRelModelImpl}. 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. 409 * </p> 410 * 411 * @param start the lower bound of the range of password policy rels 412 * @param end the upper bound of the range of password policy rels (not inclusive) 413 * @return the range of password policy rels 414 */ 415 public static List<PasswordPolicyRel> findAll(int start, int end) { 416 return getPersistence().findAll(start, end); 417 } 418 419 /** 420 * Returns an ordered range of all the password policy rels. 421 * 422 * <p> 423 * 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 PasswordPolicyRelModelImpl}. 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. 424 * </p> 425 * 426 * @param start the lower bound of the range of password policy rels 427 * @param end the upper bound of the range of password policy rels (not inclusive) 428 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 429 * @return the ordered range of password policy rels 430 */ 431 public static List<PasswordPolicyRel> findAll(int start, int end, 432 OrderByComparator<PasswordPolicyRel> orderByComparator) { 433 return getPersistence().findAll(start, end, orderByComparator); 434 } 435 436 /** 437 * Removes all the password policy rels from the database. 438 */ 439 public static void removeAll() { 440 getPersistence().removeAll(); 441 } 442 443 /** 444 * Returns the number of password policy rels. 445 * 446 * @return the number of password policy rels 447 */ 448 public static int countAll() { 449 return getPersistence().countAll(); 450 } 451 452 public static PasswordPolicyRelPersistence getPersistence() { 453 if (_persistence == null) { 454 _persistence = (PasswordPolicyRelPersistence)PortalBeanLocatorUtil.locate(PasswordPolicyRelPersistence.class.getName()); 455 456 ReferenceRegistry.registerReference(PasswordPolicyRelUtil.class, 457 "_persistence"); 458 } 459 460 return _persistence; 461 } 462 463 /** 464 * @deprecated As of 6.2.0 465 */ 466 @Deprecated 467 public void setPersistence(PasswordPolicyRelPersistence persistence) { 468 } 469 470 private static PasswordPolicyRelPersistence _persistence; 471 }