001 /** 002 * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved. 003 * 004 * The contents of this file are subject to the terms of the Liferay Enterprise 005 * Subscription License ("License"). You may not use this file except in 006 * compliance with the License. You can obtain a copy of the License by 007 * contacting Liferay, Inc. See the License for the specific language governing 008 * permissions and limitations under the License, including but not limited to 009 * distribution rights of the Software. 010 * 011 * 012 * 013 */ 014 015 package com.liferay.portal.service.persistence; 016 017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil; 018 import com.liferay.portal.kernel.dao.orm.DynamicQuery; 019 import com.liferay.portal.kernel.exception.SystemException; 020 import com.liferay.portal.kernel.util.OrderByComparator; 021 import com.liferay.portal.kernel.util.ReferenceRegistry; 022 import com.liferay.portal.model.PasswordPolicyRel; 023 import com.liferay.portal.service.ServiceContext; 024 025 import java.util.List; 026 027 /** 028 * 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. 029 * 030 * <p> 031 * Caching information and settings can be found in <code>portal.properties</code> 032 * </p> 033 * 034 * @author Brian Wing Shun Chan 035 * @see PasswordPolicyRelPersistence 036 * @see PasswordPolicyRelPersistenceImpl 037 * @generated 038 */ 039 public class PasswordPolicyRelUtil { 040 /* 041 * NOTE FOR DEVELOPERS: 042 * 043 * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class. 044 */ 045 046 /** 047 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache() 048 */ 049 public static void clearCache() { 050 getPersistence().clearCache(); 051 } 052 053 /** 054 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel) 055 */ 056 public static void clearCache(PasswordPolicyRel passwordPolicyRel) { 057 getPersistence().clearCache(passwordPolicyRel); 058 } 059 060 /** 061 * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery) 062 */ 063 public long countWithDynamicQuery(DynamicQuery dynamicQuery) 064 throws SystemException { 065 return getPersistence().countWithDynamicQuery(dynamicQuery); 066 } 067 068 /** 069 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery) 070 */ 071 public static List<PasswordPolicyRel> findWithDynamicQuery( 072 DynamicQuery dynamicQuery) throws SystemException { 073 return getPersistence().findWithDynamicQuery(dynamicQuery); 074 } 075 076 /** 077 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int) 078 */ 079 public static List<PasswordPolicyRel> findWithDynamicQuery( 080 DynamicQuery dynamicQuery, int start, int end) 081 throws SystemException { 082 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end); 083 } 084 085 /** 086 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator) 087 */ 088 public static List<PasswordPolicyRel> findWithDynamicQuery( 089 DynamicQuery dynamicQuery, int start, int end, 090 OrderByComparator orderByComparator) throws SystemException { 091 return getPersistence() 092 .findWithDynamicQuery(dynamicQuery, start, end, 093 orderByComparator); 094 } 095 096 /** 097 * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel) 098 */ 099 public static PasswordPolicyRel remove(PasswordPolicyRel passwordPolicyRel) 100 throws SystemException { 101 return getPersistence().remove(passwordPolicyRel); 102 } 103 104 /** 105 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean) 106 */ 107 public static PasswordPolicyRel update( 108 PasswordPolicyRel passwordPolicyRel, boolean merge) 109 throws SystemException { 110 return getPersistence().update(passwordPolicyRel, merge); 111 } 112 113 /** 114 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext) 115 */ 116 public static PasswordPolicyRel update( 117 PasswordPolicyRel passwordPolicyRel, boolean merge, 118 ServiceContext serviceContext) throws SystemException { 119 return getPersistence().update(passwordPolicyRel, merge, serviceContext); 120 } 121 122 /** 123 * Caches the password policy rel in the entity cache if it is enabled. 124 * 125 * @param passwordPolicyRel the password policy rel to cache 126 */ 127 public static void cacheResult( 128 com.liferay.portal.model.PasswordPolicyRel passwordPolicyRel) { 129 getPersistence().cacheResult(passwordPolicyRel); 130 } 131 132 /** 133 * Caches the password policy rels in the entity cache if it is enabled. 134 * 135 * @param passwordPolicyRels the password policy rels to cache 136 */ 137 public static void cacheResult( 138 java.util.List<com.liferay.portal.model.PasswordPolicyRel> passwordPolicyRels) { 139 getPersistence().cacheResult(passwordPolicyRels); 140 } 141 142 /** 143 * Creates a new password policy rel with the primary key. Does not add the password policy rel to the database. 144 * 145 * @param passwordPolicyRelId the primary key for the new password policy rel 146 * @return the new password policy rel 147 */ 148 public static com.liferay.portal.model.PasswordPolicyRel create( 149 long passwordPolicyRelId) { 150 return getPersistence().create(passwordPolicyRelId); 151 } 152 153 /** 154 * Removes the password policy rel with the primary key from the database. Also notifies the appropriate model listeners. 155 * 156 * @param passwordPolicyRelId the primary key of the password policy rel to remove 157 * @return the password policy rel that was removed 158 * @throws com.liferay.portal.NoSuchPasswordPolicyRelException if a password policy rel with the primary key could not be found 159 * @throws SystemException if a system exception occurred 160 */ 161 public static com.liferay.portal.model.PasswordPolicyRel remove( 162 long passwordPolicyRelId) 163 throws com.liferay.portal.NoSuchPasswordPolicyRelException, 164 com.liferay.portal.kernel.exception.SystemException { 165 return getPersistence().remove(passwordPolicyRelId); 166 } 167 168 public static com.liferay.portal.model.PasswordPolicyRel updateImpl( 169 com.liferay.portal.model.PasswordPolicyRel passwordPolicyRel, 170 boolean merge) 171 throws com.liferay.portal.kernel.exception.SystemException { 172 return getPersistence().updateImpl(passwordPolicyRel, merge); 173 } 174 175 /** 176 * Finds the password policy rel with the primary key or throws a {@link com.liferay.portal.NoSuchPasswordPolicyRelException} if it could not be found. 177 * 178 * @param passwordPolicyRelId the primary key of the password policy rel to find 179 * @return the password policy rel 180 * @throws com.liferay.portal.NoSuchPasswordPolicyRelException if a password policy rel with the primary key could not be found 181 * @throws SystemException if a system exception occurred 182 */ 183 public static com.liferay.portal.model.PasswordPolicyRel findByPrimaryKey( 184 long passwordPolicyRelId) 185 throws com.liferay.portal.NoSuchPasswordPolicyRelException, 186 com.liferay.portal.kernel.exception.SystemException { 187 return getPersistence().findByPrimaryKey(passwordPolicyRelId); 188 } 189 190 /** 191 * Finds the password policy rel with the primary key or returns <code>null</code> if it could not be found. 192 * 193 * @param passwordPolicyRelId the primary key of the password policy rel to find 194 * @return the password policy rel, or <code>null</code> if a password policy rel with the primary key could not be found 195 * @throws SystemException if a system exception occurred 196 */ 197 public static com.liferay.portal.model.PasswordPolicyRel fetchByPrimaryKey( 198 long passwordPolicyRelId) 199 throws com.liferay.portal.kernel.exception.SystemException { 200 return getPersistence().fetchByPrimaryKey(passwordPolicyRelId); 201 } 202 203 /** 204 * Finds all the password policy rels where passwordPolicyId = ?. 205 * 206 * @param passwordPolicyId the password policy ID to search with 207 * @return the matching password policy rels 208 * @throws SystemException if a system exception occurred 209 */ 210 public static java.util.List<com.liferay.portal.model.PasswordPolicyRel> findByPasswordPolicyId( 211 long passwordPolicyId) 212 throws com.liferay.portal.kernel.exception.SystemException { 213 return getPersistence().findByPasswordPolicyId(passwordPolicyId); 214 } 215 216 /** 217 * Finds a range of all the password policy rels where passwordPolicyId = ?. 218 * 219 * <p> 220 * 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. 221 * </p> 222 * 223 * @param passwordPolicyId the password policy ID to search with 224 * @param start the lower bound of the range of password policy rels to return 225 * @param end the upper bound of the range of password policy rels to return (not inclusive) 226 * @return the range of matching password policy rels 227 * @throws SystemException if a system exception occurred 228 */ 229 public static java.util.List<com.liferay.portal.model.PasswordPolicyRel> findByPasswordPolicyId( 230 long passwordPolicyId, int start, int end) 231 throws com.liferay.portal.kernel.exception.SystemException { 232 return getPersistence() 233 .findByPasswordPolicyId(passwordPolicyId, start, end); 234 } 235 236 /** 237 * Finds an ordered range of all the password policy rels where passwordPolicyId = ?. 238 * 239 * <p> 240 * 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. 241 * </p> 242 * 243 * @param passwordPolicyId the password policy ID to search with 244 * @param start the lower bound of the range of password policy rels to return 245 * @param end the upper bound of the range of password policy rels to return (not inclusive) 246 * @param orderByComparator the comparator to order the results by 247 * @return the ordered range of matching password policy rels 248 * @throws SystemException if a system exception occurred 249 */ 250 public static java.util.List<com.liferay.portal.model.PasswordPolicyRel> findByPasswordPolicyId( 251 long passwordPolicyId, int start, int end, 252 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 253 throws com.liferay.portal.kernel.exception.SystemException { 254 return getPersistence() 255 .findByPasswordPolicyId(passwordPolicyId, start, end, 256 orderByComparator); 257 } 258 259 /** 260 * Finds the first password policy rel in the ordered set where passwordPolicyId = ?. 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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 264 * </p> 265 * 266 * @param passwordPolicyId the password policy ID to search with 267 * @param orderByComparator the comparator to order the set by 268 * @return the first matching password policy rel 269 * @throws com.liferay.portal.NoSuchPasswordPolicyRelException if a matching password policy rel could not be found 270 * @throws SystemException if a system exception occurred 271 */ 272 public static com.liferay.portal.model.PasswordPolicyRel findByPasswordPolicyId_First( 273 long passwordPolicyId, 274 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 275 throws com.liferay.portal.NoSuchPasswordPolicyRelException, 276 com.liferay.portal.kernel.exception.SystemException { 277 return getPersistence() 278 .findByPasswordPolicyId_First(passwordPolicyId, 279 orderByComparator); 280 } 281 282 /** 283 * Finds the last password policy rel in the ordered set where passwordPolicyId = ?. 284 * 285 * <p> 286 * 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. 287 * </p> 288 * 289 * @param passwordPolicyId the password policy ID to search with 290 * @param orderByComparator the comparator to order the set by 291 * @return the last matching password policy rel 292 * @throws com.liferay.portal.NoSuchPasswordPolicyRelException if a matching password policy rel could not be found 293 * @throws SystemException if a system exception occurred 294 */ 295 public static com.liferay.portal.model.PasswordPolicyRel findByPasswordPolicyId_Last( 296 long passwordPolicyId, 297 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 298 throws com.liferay.portal.NoSuchPasswordPolicyRelException, 299 com.liferay.portal.kernel.exception.SystemException { 300 return getPersistence() 301 .findByPasswordPolicyId_Last(passwordPolicyId, 302 orderByComparator); 303 } 304 305 /** 306 * Finds the password policy rels before and after the current password policy rel in the ordered set where passwordPolicyId = ?. 307 * 308 * <p> 309 * 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. 310 * </p> 311 * 312 * @param passwordPolicyRelId the primary key of the current password policy rel 313 * @param passwordPolicyId the password policy ID to search with 314 * @param orderByComparator the comparator to order the set by 315 * @return the previous, current, and next password policy rel 316 * @throws com.liferay.portal.NoSuchPasswordPolicyRelException if a password policy rel with the primary key could not be found 317 * @throws SystemException if a system exception occurred 318 */ 319 public static com.liferay.portal.model.PasswordPolicyRel[] findByPasswordPolicyId_PrevAndNext( 320 long passwordPolicyRelId, long passwordPolicyId, 321 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 322 throws com.liferay.portal.NoSuchPasswordPolicyRelException, 323 com.liferay.portal.kernel.exception.SystemException { 324 return getPersistence() 325 .findByPasswordPolicyId_PrevAndNext(passwordPolicyRelId, 326 passwordPolicyId, orderByComparator); 327 } 328 329 /** 330 * Finds the password policy rel where classNameId = ? and classPK = ? or throws a {@link com.liferay.portal.NoSuchPasswordPolicyRelException} if it could not be found. 331 * 332 * @param classNameId the class name ID to search with 333 * @param classPK the class p k to search with 334 * @return the matching password policy rel 335 * @throws com.liferay.portal.NoSuchPasswordPolicyRelException if a matching password policy rel could not be found 336 * @throws SystemException if a system exception occurred 337 */ 338 public static com.liferay.portal.model.PasswordPolicyRel findByC_C( 339 long classNameId, long classPK) 340 throws com.liferay.portal.NoSuchPasswordPolicyRelException, 341 com.liferay.portal.kernel.exception.SystemException { 342 return getPersistence().findByC_C(classNameId, classPK); 343 } 344 345 /** 346 * Finds the password policy rel where classNameId = ? and classPK = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 347 * 348 * @param classNameId the class name ID to search with 349 * @param classPK the class p k to search with 350 * @return the matching password policy rel, or <code>null</code> if a matching password policy rel could not be found 351 * @throws SystemException if a system exception occurred 352 */ 353 public static com.liferay.portal.model.PasswordPolicyRel fetchByC_C( 354 long classNameId, long classPK) 355 throws com.liferay.portal.kernel.exception.SystemException { 356 return getPersistence().fetchByC_C(classNameId, classPK); 357 } 358 359 /** 360 * Finds the password policy rel where classNameId = ? and classPK = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 361 * 362 * @param classNameId the class name ID to search with 363 * @param classPK the class p k to search with 364 * @return the matching password policy rel, or <code>null</code> if a matching password policy rel could not be found 365 * @throws SystemException if a system exception occurred 366 */ 367 public static com.liferay.portal.model.PasswordPolicyRel fetchByC_C( 368 long classNameId, long classPK, boolean retrieveFromCache) 369 throws com.liferay.portal.kernel.exception.SystemException { 370 return getPersistence() 371 .fetchByC_C(classNameId, classPK, retrieveFromCache); 372 } 373 374 /** 375 * Finds the password policy rel where passwordPolicyId = ? and classNameId = ? and classPK = ? or throws a {@link com.liferay.portal.NoSuchPasswordPolicyRelException} if it could not be found. 376 * 377 * @param passwordPolicyId the password policy ID to search with 378 * @param classNameId the class name ID to search with 379 * @param classPK the class p k to search with 380 * @return the matching password policy rel 381 * @throws com.liferay.portal.NoSuchPasswordPolicyRelException if a matching password policy rel could not be found 382 * @throws SystemException if a system exception occurred 383 */ 384 public static com.liferay.portal.model.PasswordPolicyRel findByP_C_C( 385 long passwordPolicyId, long classNameId, long classPK) 386 throws com.liferay.portal.NoSuchPasswordPolicyRelException, 387 com.liferay.portal.kernel.exception.SystemException { 388 return getPersistence() 389 .findByP_C_C(passwordPolicyId, classNameId, classPK); 390 } 391 392 /** 393 * Finds the password policy rel where passwordPolicyId = ? and classNameId = ? and classPK = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 394 * 395 * @param passwordPolicyId the password policy ID to search with 396 * @param classNameId the class name ID to search with 397 * @param classPK the class p k to search with 398 * @return the matching password policy rel, or <code>null</code> if a matching password policy rel could not be found 399 * @throws SystemException if a system exception occurred 400 */ 401 public static com.liferay.portal.model.PasswordPolicyRel fetchByP_C_C( 402 long passwordPolicyId, long classNameId, long classPK) 403 throws com.liferay.portal.kernel.exception.SystemException { 404 return getPersistence() 405 .fetchByP_C_C(passwordPolicyId, classNameId, classPK); 406 } 407 408 /** 409 * Finds the password policy rel where passwordPolicyId = ? and classNameId = ? and classPK = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 410 * 411 * @param passwordPolicyId the password policy ID to search with 412 * @param classNameId the class name ID to search with 413 * @param classPK the class p k to search with 414 * @return the matching password policy rel, or <code>null</code> if a matching password policy rel could not be found 415 * @throws SystemException if a system exception occurred 416 */ 417 public static com.liferay.portal.model.PasswordPolicyRel fetchByP_C_C( 418 long passwordPolicyId, long classNameId, long classPK, 419 boolean retrieveFromCache) 420 throws com.liferay.portal.kernel.exception.SystemException { 421 return getPersistence() 422 .fetchByP_C_C(passwordPolicyId, classNameId, classPK, 423 retrieveFromCache); 424 } 425 426 /** 427 * Finds all the password policy rels. 428 * 429 * @return the password policy rels 430 * @throws SystemException if a system exception occurred 431 */ 432 public static java.util.List<com.liferay.portal.model.PasswordPolicyRel> findAll() 433 throws com.liferay.portal.kernel.exception.SystemException { 434 return getPersistence().findAll(); 435 } 436 437 /** 438 * Finds a range of all the password policy rels. 439 * 440 * <p> 441 * 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. 442 * </p> 443 * 444 * @param start the lower bound of the range of password policy rels to return 445 * @param end the upper bound of the range of password policy rels to return (not inclusive) 446 * @return the range of password policy rels 447 * @throws SystemException if a system exception occurred 448 */ 449 public static java.util.List<com.liferay.portal.model.PasswordPolicyRel> findAll( 450 int start, int end) 451 throws com.liferay.portal.kernel.exception.SystemException { 452 return getPersistence().findAll(start, end); 453 } 454 455 /** 456 * Finds an ordered range of all the password policy rels. 457 * 458 * <p> 459 * 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. 460 * </p> 461 * 462 * @param start the lower bound of the range of password policy rels to return 463 * @param end the upper bound of the range of password policy rels to return (not inclusive) 464 * @param orderByComparator the comparator to order the results by 465 * @return the ordered range of password policy rels 466 * @throws SystemException if a system exception occurred 467 */ 468 public static java.util.List<com.liferay.portal.model.PasswordPolicyRel> findAll( 469 int start, int end, 470 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 471 throws com.liferay.portal.kernel.exception.SystemException { 472 return getPersistence().findAll(start, end, orderByComparator); 473 } 474 475 /** 476 * Removes all the password policy rels where passwordPolicyId = ? from the database. 477 * 478 * @param passwordPolicyId the password policy ID to search with 479 * @throws SystemException if a system exception occurred 480 */ 481 public static void removeByPasswordPolicyId(long passwordPolicyId) 482 throws com.liferay.portal.kernel.exception.SystemException { 483 getPersistence().removeByPasswordPolicyId(passwordPolicyId); 484 } 485 486 /** 487 * Removes the password policy rel where classNameId = ? and classPK = ? from the database. 488 * 489 * @param classNameId the class name ID to search with 490 * @param classPK the class p k to search with 491 * @throws SystemException if a system exception occurred 492 */ 493 public static void removeByC_C(long classNameId, long classPK) 494 throws com.liferay.portal.NoSuchPasswordPolicyRelException, 495 com.liferay.portal.kernel.exception.SystemException { 496 getPersistence().removeByC_C(classNameId, classPK); 497 } 498 499 /** 500 * Removes the password policy rel where passwordPolicyId = ? and classNameId = ? and classPK = ? from the database. 501 * 502 * @param passwordPolicyId the password policy ID to search with 503 * @param classNameId the class name ID to search with 504 * @param classPK the class p k to search with 505 * @throws SystemException if a system exception occurred 506 */ 507 public static void removeByP_C_C(long passwordPolicyId, long classNameId, 508 long classPK) 509 throws com.liferay.portal.NoSuchPasswordPolicyRelException, 510 com.liferay.portal.kernel.exception.SystemException { 511 getPersistence().removeByP_C_C(passwordPolicyId, classNameId, classPK); 512 } 513 514 /** 515 * Removes all the password policy rels from the database. 516 * 517 * @throws SystemException if a system exception occurred 518 */ 519 public static void removeAll() 520 throws com.liferay.portal.kernel.exception.SystemException { 521 getPersistence().removeAll(); 522 } 523 524 /** 525 * Counts all the password policy rels where passwordPolicyId = ?. 526 * 527 * @param passwordPolicyId the password policy ID to search with 528 * @return the number of matching password policy rels 529 * @throws SystemException if a system exception occurred 530 */ 531 public static int countByPasswordPolicyId(long passwordPolicyId) 532 throws com.liferay.portal.kernel.exception.SystemException { 533 return getPersistence().countByPasswordPolicyId(passwordPolicyId); 534 } 535 536 /** 537 * Counts all the password policy rels where classNameId = ? and classPK = ?. 538 * 539 * @param classNameId the class name ID to search with 540 * @param classPK the class p k to search with 541 * @return the number of matching password policy rels 542 * @throws SystemException if a system exception occurred 543 */ 544 public static int countByC_C(long classNameId, long classPK) 545 throws com.liferay.portal.kernel.exception.SystemException { 546 return getPersistence().countByC_C(classNameId, classPK); 547 } 548 549 /** 550 * Counts all the password policy rels where passwordPolicyId = ? and classNameId = ? and classPK = ?. 551 * 552 * @param passwordPolicyId the password policy ID to search with 553 * @param classNameId the class name ID to search with 554 * @param classPK the class p k to search with 555 * @return the number of matching password policy rels 556 * @throws SystemException if a system exception occurred 557 */ 558 public static int countByP_C_C(long passwordPolicyId, long classNameId, 559 long classPK) 560 throws com.liferay.portal.kernel.exception.SystemException { 561 return getPersistence() 562 .countByP_C_C(passwordPolicyId, classNameId, classPK); 563 } 564 565 /** 566 * Counts all the password policy rels. 567 * 568 * @return the number of password policy rels 569 * @throws SystemException if a system exception occurred 570 */ 571 public static int countAll() 572 throws com.liferay.portal.kernel.exception.SystemException { 573 return getPersistence().countAll(); 574 } 575 576 public static PasswordPolicyRelPersistence getPersistence() { 577 if (_persistence == null) { 578 _persistence = (PasswordPolicyRelPersistence)PortalBeanLocatorUtil.locate(PasswordPolicyRelPersistence.class.getName()); 579 580 ReferenceRegistry.registerReference(PasswordPolicyRelUtil.class, 581 "_persistence"); 582 } 583 584 return _persistence; 585 } 586 587 public void setPersistence(PasswordPolicyRelPersistence persistence) { 588 _persistence = persistence; 589 590 ReferenceRegistry.registerReference(PasswordPolicyRelUtil.class, 591 "_persistence"); 592 } 593 594 private static PasswordPolicyRelPersistence _persistence; 595 }