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 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 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 java.util.List<com.liferay.portal.model.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 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.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 java.util.List<com.liferay.portal.model.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 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.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 java.util.List<com.liferay.portal.model.PasswordPolicyRel> findByPasswordPolicyId( 154 long passwordPolicyId, int start, int end, 155 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.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 com.liferay.portal.NoSuchPasswordPolicyRelException if a matching password policy rel could not be found 168 */ 169 public static com.liferay.portal.model.PasswordPolicyRel findByPasswordPolicyId_First( 170 long passwordPolicyId, 171 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.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 com.liferay.portal.model.PasswordPolicyRel fetchByPasswordPolicyId_First( 186 long passwordPolicyId, 187 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.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 com.liferay.portal.NoSuchPasswordPolicyRelException if a matching password policy rel could not be found 200 */ 201 public static com.liferay.portal.model.PasswordPolicyRel findByPasswordPolicyId_Last( 202 long passwordPolicyId, 203 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.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 com.liferay.portal.model.PasswordPolicyRel fetchByPasswordPolicyId_Last( 218 long passwordPolicyId, 219 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.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 com.liferay.portal.NoSuchPasswordPolicyRelException if a password policy rel with the primary key could not be found 233 */ 234 public static com.liferay.portal.model.PasswordPolicyRel[] findByPasswordPolicyId_PrevAndNext( 235 long passwordPolicyRelId, long passwordPolicyId, 236 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.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 com.liferay.portal.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 com.liferay.portal.NoSuchPasswordPolicyRelException if a matching password policy rel could not be found 269 */ 270 public static com.liferay.portal.model.PasswordPolicyRel findByC_C( 271 long classNameId, long classPK) 272 throws com.liferay.portal.NoSuchPasswordPolicyRelException { 273 return getPersistence().findByC_C(classNameId, classPK); 274 } 275 276 /** 277 * Returns the password policy rel where classNameId = ? and classPK = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 278 * 279 * @param classNameId the class name ID 280 * @param classPK the class p k 281 * @return the matching password policy rel, or <code>null</code> if a matching password policy rel could not be found 282 */ 283 public static com.liferay.portal.model.PasswordPolicyRel fetchByC_C( 284 long classNameId, long classPK) { 285 return getPersistence().fetchByC_C(classNameId, classPK); 286 } 287 288 /** 289 * 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. 290 * 291 * @param classNameId the class name ID 292 * @param classPK the class p k 293 * @param retrieveFromCache whether to use the finder cache 294 * @return the matching password policy rel, or <code>null</code> if a matching password policy rel could not be found 295 */ 296 public static com.liferay.portal.model.PasswordPolicyRel fetchByC_C( 297 long classNameId, long classPK, boolean retrieveFromCache) { 298 return getPersistence() 299 .fetchByC_C(classNameId, classPK, retrieveFromCache); 300 } 301 302 /** 303 * Removes the password policy rel where classNameId = ? and classPK = ? from the database. 304 * 305 * @param classNameId the class name ID 306 * @param classPK the class p k 307 * @return the password policy rel that was removed 308 */ 309 public static com.liferay.portal.model.PasswordPolicyRel removeByC_C( 310 long classNameId, long classPK) 311 throws com.liferay.portal.NoSuchPasswordPolicyRelException { 312 return getPersistence().removeByC_C(classNameId, classPK); 313 } 314 315 /** 316 * Returns the number of password policy rels where classNameId = ? and classPK = ?. 317 * 318 * @param classNameId the class name ID 319 * @param classPK the class p k 320 * @return the number of matching password policy rels 321 */ 322 public static int countByC_C(long classNameId, long classPK) { 323 return getPersistence().countByC_C(classNameId, classPK); 324 } 325 326 /** 327 * Caches the password policy rel in the entity cache if it is enabled. 328 * 329 * @param passwordPolicyRel the password policy rel 330 */ 331 public static void cacheResult( 332 com.liferay.portal.model.PasswordPolicyRel passwordPolicyRel) { 333 getPersistence().cacheResult(passwordPolicyRel); 334 } 335 336 /** 337 * Caches the password policy rels in the entity cache if it is enabled. 338 * 339 * @param passwordPolicyRels the password policy rels 340 */ 341 public static void cacheResult( 342 java.util.List<com.liferay.portal.model.PasswordPolicyRel> passwordPolicyRels) { 343 getPersistence().cacheResult(passwordPolicyRels); 344 } 345 346 /** 347 * Creates a new password policy rel with the primary key. Does not add the password policy rel to the database. 348 * 349 * @param passwordPolicyRelId the primary key for the new password policy rel 350 * @return the new password policy rel 351 */ 352 public static com.liferay.portal.model.PasswordPolicyRel create( 353 long passwordPolicyRelId) { 354 return getPersistence().create(passwordPolicyRelId); 355 } 356 357 /** 358 * Removes the password policy rel with the primary key from the database. Also notifies the appropriate model listeners. 359 * 360 * @param passwordPolicyRelId the primary key of the password policy rel 361 * @return the password policy rel that was removed 362 * @throws com.liferay.portal.NoSuchPasswordPolicyRelException if a password policy rel with the primary key could not be found 363 */ 364 public static com.liferay.portal.model.PasswordPolicyRel remove( 365 long passwordPolicyRelId) 366 throws com.liferay.portal.NoSuchPasswordPolicyRelException { 367 return getPersistence().remove(passwordPolicyRelId); 368 } 369 370 public static com.liferay.portal.model.PasswordPolicyRel updateImpl( 371 com.liferay.portal.model.PasswordPolicyRel passwordPolicyRel) { 372 return getPersistence().updateImpl(passwordPolicyRel); 373 } 374 375 /** 376 * Returns the password policy rel with the primary key or throws a {@link com.liferay.portal.NoSuchPasswordPolicyRelException} if it could not be found. 377 * 378 * @param passwordPolicyRelId the primary key of the password policy rel 379 * @return the password policy rel 380 * @throws com.liferay.portal.NoSuchPasswordPolicyRelException if a password policy rel with the primary key could not be found 381 */ 382 public static com.liferay.portal.model.PasswordPolicyRel findByPrimaryKey( 383 long passwordPolicyRelId) 384 throws com.liferay.portal.NoSuchPasswordPolicyRelException { 385 return getPersistence().findByPrimaryKey(passwordPolicyRelId); 386 } 387 388 /** 389 * Returns the password policy rel with the primary key or returns <code>null</code> if it could not be found. 390 * 391 * @param passwordPolicyRelId the primary key of the password policy rel 392 * @return the password policy rel, or <code>null</code> if a password policy rel with the primary key could not be found 393 */ 394 public static com.liferay.portal.model.PasswordPolicyRel fetchByPrimaryKey( 395 long passwordPolicyRelId) { 396 return getPersistence().fetchByPrimaryKey(passwordPolicyRelId); 397 } 398 399 public static java.util.Map<java.io.Serializable, com.liferay.portal.model.PasswordPolicyRel> fetchByPrimaryKeys( 400 java.util.Set<java.io.Serializable> primaryKeys) { 401 return getPersistence().fetchByPrimaryKeys(primaryKeys); 402 } 403 404 /** 405 * Returns all the password policy rels. 406 * 407 * @return the password policy rels 408 */ 409 public static java.util.List<com.liferay.portal.model.PasswordPolicyRel> findAll() { 410 return getPersistence().findAll(); 411 } 412 413 /** 414 * Returns a range of all the password policy rels. 415 * 416 * <p> 417 * 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.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. 418 * </p> 419 * 420 * @param start the lower bound of the range of password policy rels 421 * @param end the upper bound of the range of password policy rels (not inclusive) 422 * @return the range of password policy rels 423 */ 424 public static java.util.List<com.liferay.portal.model.PasswordPolicyRel> findAll( 425 int start, int end) { 426 return getPersistence().findAll(start, end); 427 } 428 429 /** 430 * Returns an ordered range of all the password policy rels. 431 * 432 * <p> 433 * 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.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. 434 * </p> 435 * 436 * @param start the lower bound of the range of password policy rels 437 * @param end the upper bound of the range of password policy rels (not inclusive) 438 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 439 * @return the ordered range of password policy rels 440 */ 441 public static java.util.List<com.liferay.portal.model.PasswordPolicyRel> findAll( 442 int start, int end, 443 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.PasswordPolicyRel> orderByComparator) { 444 return getPersistence().findAll(start, end, orderByComparator); 445 } 446 447 /** 448 * Removes all the password policy rels from the database. 449 */ 450 public static void removeAll() { 451 getPersistence().removeAll(); 452 } 453 454 /** 455 * Returns the number of password policy rels. 456 * 457 * @return the number of password policy rels 458 */ 459 public static int countAll() { 460 return getPersistence().countAll(); 461 } 462 463 public static PasswordPolicyRelPersistence getPersistence() { 464 if (_persistence == null) { 465 _persistence = (PasswordPolicyRelPersistence)PortalBeanLocatorUtil.locate(PasswordPolicyRelPersistence.class.getName()); 466 467 ReferenceRegistry.registerReference(PasswordPolicyRelUtil.class, 468 "_persistence"); 469 } 470 471 return _persistence; 472 } 473 474 /** 475 * @deprecated As of 6.2.0 476 */ 477 @Deprecated 478 public void setPersistence(PasswordPolicyRelPersistence persistence) { 479 } 480 481 private static PasswordPolicyRelPersistence _persistence; 482 }