001    /**
002     * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.service.persistence;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
019    import com.liferay.portal.kernel.exception.SystemException;
020    import com.liferay.portal.kernel.util.OrderByComparator;
021    import com.liferay.portal.kernel.util.ReferenceRegistry;
022    import com.liferay.portal.model.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#update(com.liferay.portal.model.BaseModel)
098             */
099            public static PasswordPolicyRel update(PasswordPolicyRel passwordPolicyRel)
100                    throws SystemException {
101                    return getPersistence().update(passwordPolicyRel);
102            }
103    
104            /**
105             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext)
106             */
107            public static PasswordPolicyRel update(
108                    PasswordPolicyRel passwordPolicyRel, ServiceContext serviceContext)
109                    throws SystemException {
110                    return getPersistence().update(passwordPolicyRel, serviceContext);
111            }
112    
113            /**
114            * Caches the password policy rel in the entity cache if it is enabled.
115            *
116            * @param passwordPolicyRel the password policy rel
117            */
118            public static void cacheResult(
119                    com.liferay.portal.model.PasswordPolicyRel passwordPolicyRel) {
120                    getPersistence().cacheResult(passwordPolicyRel);
121            }
122    
123            /**
124            * Caches the password policy rels in the entity cache if it is enabled.
125            *
126            * @param passwordPolicyRels the password policy rels
127            */
128            public static void cacheResult(
129                    java.util.List<com.liferay.portal.model.PasswordPolicyRel> passwordPolicyRels) {
130                    getPersistence().cacheResult(passwordPolicyRels);
131            }
132    
133            /**
134            * Creates a new password policy rel with the primary key. Does not add the password policy rel to the database.
135            *
136            * @param passwordPolicyRelId the primary key for the new password policy rel
137            * @return the new password policy rel
138            */
139            public static com.liferay.portal.model.PasswordPolicyRel create(
140                    long passwordPolicyRelId) {
141                    return getPersistence().create(passwordPolicyRelId);
142            }
143    
144            /**
145            * Removes the password policy rel with the primary key from the database. Also notifies the appropriate model listeners.
146            *
147            * @param passwordPolicyRelId the primary key of the password policy rel
148            * @return the password policy rel that was removed
149            * @throws com.liferay.portal.NoSuchPasswordPolicyRelException if a password policy rel with the primary key could not be found
150            * @throws SystemException if a system exception occurred
151            */
152            public static com.liferay.portal.model.PasswordPolicyRel remove(
153                    long passwordPolicyRelId)
154                    throws com.liferay.portal.NoSuchPasswordPolicyRelException,
155                            com.liferay.portal.kernel.exception.SystemException {
156                    return getPersistence().remove(passwordPolicyRelId);
157            }
158    
159            public static com.liferay.portal.model.PasswordPolicyRel updateImpl(
160                    com.liferay.portal.model.PasswordPolicyRel passwordPolicyRel)
161                    throws com.liferay.portal.kernel.exception.SystemException {
162                    return getPersistence().updateImpl(passwordPolicyRel);
163            }
164    
165            /**
166            * Returns the password policy rel with the primary key or throws a {@link com.liferay.portal.NoSuchPasswordPolicyRelException} if it could not be found.
167            *
168            * @param passwordPolicyRelId the primary key of the password policy rel
169            * @return the password policy rel
170            * @throws com.liferay.portal.NoSuchPasswordPolicyRelException if a password policy rel with the primary key could not be found
171            * @throws SystemException if a system exception occurred
172            */
173            public static com.liferay.portal.model.PasswordPolicyRel findByPrimaryKey(
174                    long passwordPolicyRelId)
175                    throws com.liferay.portal.NoSuchPasswordPolicyRelException,
176                            com.liferay.portal.kernel.exception.SystemException {
177                    return getPersistence().findByPrimaryKey(passwordPolicyRelId);
178            }
179    
180            /**
181            * Returns the password policy rel with the primary key or returns <code>null</code> if it could not be found.
182            *
183            * @param passwordPolicyRelId the primary key of the password policy rel
184            * @return the password policy rel, or <code>null</code> if a password policy rel with the primary key could not be found
185            * @throws SystemException if a system exception occurred
186            */
187            public static com.liferay.portal.model.PasswordPolicyRel fetchByPrimaryKey(
188                    long passwordPolicyRelId)
189                    throws com.liferay.portal.kernel.exception.SystemException {
190                    return getPersistence().fetchByPrimaryKey(passwordPolicyRelId);
191            }
192    
193            /**
194            * Returns all the password policy rels where passwordPolicyId = &#63;.
195            *
196            * @param passwordPolicyId the password policy ID
197            * @return the matching password policy rels
198            * @throws SystemException if a system exception occurred
199            */
200            public static java.util.List<com.liferay.portal.model.PasswordPolicyRel> findByPasswordPolicyId(
201                    long passwordPolicyId)
202                    throws com.liferay.portal.kernel.exception.SystemException {
203                    return getPersistence().findByPasswordPolicyId(passwordPolicyId);
204            }
205    
206            /**
207            * Returns a range of all the password policy rels where passwordPolicyId = &#63;.
208            *
209            * <p>
210            * 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.
211            * </p>
212            *
213            * @param passwordPolicyId the password policy ID
214            * @param start the lower bound of the range of password policy rels
215            * @param end the upper bound of the range of password policy rels (not inclusive)
216            * @return the range of matching password policy rels
217            * @throws SystemException if a system exception occurred
218            */
219            public static java.util.List<com.liferay.portal.model.PasswordPolicyRel> findByPasswordPolicyId(
220                    long passwordPolicyId, int start, int end)
221                    throws com.liferay.portal.kernel.exception.SystemException {
222                    return getPersistence()
223                                       .findByPasswordPolicyId(passwordPolicyId, start, end);
224            }
225    
226            /**
227            * Returns an ordered range of all the password policy rels where passwordPolicyId = &#63;.
228            *
229            * <p>
230            * 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.
231            * </p>
232            *
233            * @param passwordPolicyId the password policy ID
234            * @param start the lower bound of the range of password policy rels
235            * @param end the upper bound of the range of password policy rels (not inclusive)
236            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
237            * @return the ordered range of matching password policy rels
238            * @throws SystemException if a system exception occurred
239            */
240            public static java.util.List<com.liferay.portal.model.PasswordPolicyRel> findByPasswordPolicyId(
241                    long passwordPolicyId, int start, int end,
242                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
243                    throws com.liferay.portal.kernel.exception.SystemException {
244                    return getPersistence()
245                                       .findByPasswordPolicyId(passwordPolicyId, start, end,
246                            orderByComparator);
247            }
248    
249            /**
250            * Returns the first password policy rel in the ordered set where passwordPolicyId = &#63;.
251            *
252            * @param passwordPolicyId the password policy ID
253            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
254            * @return the first matching password policy rel
255            * @throws com.liferay.portal.NoSuchPasswordPolicyRelException if a matching password policy rel could not be found
256            * @throws SystemException if a system exception occurred
257            */
258            public static com.liferay.portal.model.PasswordPolicyRel findByPasswordPolicyId_First(
259                    long passwordPolicyId,
260                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
261                    throws com.liferay.portal.NoSuchPasswordPolicyRelException,
262                            com.liferay.portal.kernel.exception.SystemException {
263                    return getPersistence()
264                                       .findByPasswordPolicyId_First(passwordPolicyId,
265                            orderByComparator);
266            }
267    
268            /**
269            * Returns the first password policy rel in the ordered set where passwordPolicyId = &#63;.
270            *
271            * @param passwordPolicyId the password policy ID
272            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
273            * @return the first matching password policy rel, or <code>null</code> if a matching password policy rel could not be found
274            * @throws SystemException if a system exception occurred
275            */
276            public static com.liferay.portal.model.PasswordPolicyRel fetchByPasswordPolicyId_First(
277                    long passwordPolicyId,
278                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
279                    throws com.liferay.portal.kernel.exception.SystemException {
280                    return getPersistence()
281                                       .fetchByPasswordPolicyId_First(passwordPolicyId,
282                            orderByComparator);
283            }
284    
285            /**
286            * Returns the last password policy rel in the ordered set where passwordPolicyId = &#63;.
287            *
288            * @param passwordPolicyId the password policy ID
289            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
290            * @return the last matching password policy rel
291            * @throws com.liferay.portal.NoSuchPasswordPolicyRelException if a matching password policy rel could not be found
292            * @throws SystemException if a system exception occurred
293            */
294            public static com.liferay.portal.model.PasswordPolicyRel findByPasswordPolicyId_Last(
295                    long passwordPolicyId,
296                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
297                    throws com.liferay.portal.NoSuchPasswordPolicyRelException,
298                            com.liferay.portal.kernel.exception.SystemException {
299                    return getPersistence()
300                                       .findByPasswordPolicyId_Last(passwordPolicyId,
301                            orderByComparator);
302            }
303    
304            /**
305            * Returns the last password policy rel in the ordered set where passwordPolicyId = &#63;.
306            *
307            * @param passwordPolicyId the password policy ID
308            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
309            * @return the last matching password policy rel, or <code>null</code> if a matching password policy rel could not be found
310            * @throws SystemException if a system exception occurred
311            */
312            public static com.liferay.portal.model.PasswordPolicyRel fetchByPasswordPolicyId_Last(
313                    long passwordPolicyId,
314                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
315                    throws com.liferay.portal.kernel.exception.SystemException {
316                    return getPersistence()
317                                       .fetchByPasswordPolicyId_Last(passwordPolicyId,
318                            orderByComparator);
319            }
320    
321            /**
322            * Returns the password policy rels before and after the current password policy rel in the ordered set where passwordPolicyId = &#63;.
323            *
324            * @param passwordPolicyRelId the primary key of the current password policy rel
325            * @param passwordPolicyId the password policy ID
326            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
327            * @return the previous, current, and next password policy rel
328            * @throws com.liferay.portal.NoSuchPasswordPolicyRelException if a password policy rel with the primary key could not be found
329            * @throws SystemException if a system exception occurred
330            */
331            public static com.liferay.portal.model.PasswordPolicyRel[] findByPasswordPolicyId_PrevAndNext(
332                    long passwordPolicyRelId, long passwordPolicyId,
333                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
334                    throws com.liferay.portal.NoSuchPasswordPolicyRelException,
335                            com.liferay.portal.kernel.exception.SystemException {
336                    return getPersistence()
337                                       .findByPasswordPolicyId_PrevAndNext(passwordPolicyRelId,
338                            passwordPolicyId, orderByComparator);
339            }
340    
341            /**
342            * Returns the password policy rel where classNameId = &#63; and classPK = &#63; or throws a {@link com.liferay.portal.NoSuchPasswordPolicyRelException} if it could not be found.
343            *
344            * @param classNameId the class name ID
345            * @param classPK the class p k
346            * @return the matching password policy rel
347            * @throws com.liferay.portal.NoSuchPasswordPolicyRelException if a matching password policy rel could not be found
348            * @throws SystemException if a system exception occurred
349            */
350            public static com.liferay.portal.model.PasswordPolicyRel findByC_C(
351                    long classNameId, long classPK)
352                    throws com.liferay.portal.NoSuchPasswordPolicyRelException,
353                            com.liferay.portal.kernel.exception.SystemException {
354                    return getPersistence().findByC_C(classNameId, classPK);
355            }
356    
357            /**
358            * Returns the password policy rel where classNameId = &#63; and classPK = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
359            *
360            * @param classNameId the class name ID
361            * @param classPK the class p k
362            * @return the matching password policy rel, or <code>null</code> if a matching password policy rel could not be found
363            * @throws SystemException if a system exception occurred
364            */
365            public static com.liferay.portal.model.PasswordPolicyRel fetchByC_C(
366                    long classNameId, long classPK)
367                    throws com.liferay.portal.kernel.exception.SystemException {
368                    return getPersistence().fetchByC_C(classNameId, classPK);
369            }
370    
371            /**
372            * Returns the password policy rel where classNameId = &#63; and classPK = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
373            *
374            * @param classNameId the class name ID
375            * @param classPK the class p k
376            * @param retrieveFromCache whether to use the finder cache
377            * @return the matching password policy rel, or <code>null</code> if a matching password policy rel could not be found
378            * @throws SystemException if a system exception occurred
379            */
380            public static com.liferay.portal.model.PasswordPolicyRel fetchByC_C(
381                    long classNameId, long classPK, boolean retrieveFromCache)
382                    throws com.liferay.portal.kernel.exception.SystemException {
383                    return getPersistence()
384                                       .fetchByC_C(classNameId, classPK, retrieveFromCache);
385            }
386    
387            /**
388            * Returns the password policy rel where passwordPolicyId = &#63; and classNameId = &#63; and classPK = &#63; or throws a {@link com.liferay.portal.NoSuchPasswordPolicyRelException} if it could not be found.
389            *
390            * @param passwordPolicyId the password policy ID
391            * @param classNameId the class name ID
392            * @param classPK the class p k
393            * @return the matching password policy rel
394            * @throws com.liferay.portal.NoSuchPasswordPolicyRelException if a matching password policy rel could not be found
395            * @throws SystemException if a system exception occurred
396            */
397            public static com.liferay.portal.model.PasswordPolicyRel findByP_C_C(
398                    long passwordPolicyId, long classNameId, long classPK)
399                    throws com.liferay.portal.NoSuchPasswordPolicyRelException,
400                            com.liferay.portal.kernel.exception.SystemException {
401                    return getPersistence()
402                                       .findByP_C_C(passwordPolicyId, classNameId, classPK);
403            }
404    
405            /**
406            * Returns the password policy rel where passwordPolicyId = &#63; and classNameId = &#63; and classPK = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
407            *
408            * @param passwordPolicyId the password policy ID
409            * @param classNameId the class name ID
410            * @param classPK the class p k
411            * @return the matching password policy rel, or <code>null</code> if a matching password policy rel could not be found
412            * @throws SystemException if a system exception occurred
413            */
414            public static com.liferay.portal.model.PasswordPolicyRel fetchByP_C_C(
415                    long passwordPolicyId, long classNameId, long classPK)
416                    throws com.liferay.portal.kernel.exception.SystemException {
417                    return getPersistence()
418                                       .fetchByP_C_C(passwordPolicyId, classNameId, classPK);
419            }
420    
421            /**
422            * Returns the password policy rel where passwordPolicyId = &#63; and classNameId = &#63; and classPK = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
423            *
424            * @param passwordPolicyId the password policy ID
425            * @param classNameId the class name ID
426            * @param classPK the class p k
427            * @param retrieveFromCache whether to use the finder cache
428            * @return the matching password policy rel, or <code>null</code> if a matching password policy rel could not be found
429            * @throws SystemException if a system exception occurred
430            */
431            public static com.liferay.portal.model.PasswordPolicyRel fetchByP_C_C(
432                    long passwordPolicyId, long classNameId, long classPK,
433                    boolean retrieveFromCache)
434                    throws com.liferay.portal.kernel.exception.SystemException {
435                    return getPersistence()
436                                       .fetchByP_C_C(passwordPolicyId, classNameId, classPK,
437                            retrieveFromCache);
438            }
439    
440            /**
441            * Returns all the password policy rels.
442            *
443            * @return the password policy rels
444            * @throws SystemException if a system exception occurred
445            */
446            public static java.util.List<com.liferay.portal.model.PasswordPolicyRel> findAll()
447                    throws com.liferay.portal.kernel.exception.SystemException {
448                    return getPersistence().findAll();
449            }
450    
451            /**
452            * Returns a range of all the password policy rels.
453            *
454            * <p>
455            * 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.
456            * </p>
457            *
458            * @param start the lower bound of the range of password policy rels
459            * @param end the upper bound of the range of password policy rels (not inclusive)
460            * @return the range of password policy rels
461            * @throws SystemException if a system exception occurred
462            */
463            public static java.util.List<com.liferay.portal.model.PasswordPolicyRel> findAll(
464                    int start, int end)
465                    throws com.liferay.portal.kernel.exception.SystemException {
466                    return getPersistence().findAll(start, end);
467            }
468    
469            /**
470            * Returns an ordered range of all the password policy rels.
471            *
472            * <p>
473            * 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.
474            * </p>
475            *
476            * @param start the lower bound of the range of password policy rels
477            * @param end the upper bound of the range of password policy rels (not inclusive)
478            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
479            * @return the ordered range of password policy rels
480            * @throws SystemException if a system exception occurred
481            */
482            public static java.util.List<com.liferay.portal.model.PasswordPolicyRel> findAll(
483                    int start, int end,
484                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
485                    throws com.liferay.portal.kernel.exception.SystemException {
486                    return getPersistence().findAll(start, end, orderByComparator);
487            }
488    
489            /**
490            * Removes all the password policy rels where passwordPolicyId = &#63; from the database.
491            *
492            * @param passwordPolicyId the password policy ID
493            * @throws SystemException if a system exception occurred
494            */
495            public static void removeByPasswordPolicyId(long passwordPolicyId)
496                    throws com.liferay.portal.kernel.exception.SystemException {
497                    getPersistence().removeByPasswordPolicyId(passwordPolicyId);
498            }
499    
500            /**
501            * Removes the password policy rel where classNameId = &#63; and classPK = &#63; from the database.
502            *
503            * @param classNameId the class name ID
504            * @param classPK the class p k
505            * @return the password policy rel that was removed
506            * @throws SystemException if a system exception occurred
507            */
508            public static com.liferay.portal.model.PasswordPolicyRel removeByC_C(
509                    long classNameId, long classPK)
510                    throws com.liferay.portal.NoSuchPasswordPolicyRelException,
511                            com.liferay.portal.kernel.exception.SystemException {
512                    return getPersistence().removeByC_C(classNameId, classPK);
513            }
514    
515            /**
516            * Removes the password policy rel where passwordPolicyId = &#63; and classNameId = &#63; and classPK = &#63; from the database.
517            *
518            * @param passwordPolicyId the password policy ID
519            * @param classNameId the class name ID
520            * @param classPK the class p k
521            * @return the password policy rel that was removed
522            * @throws SystemException if a system exception occurred
523            */
524            public static com.liferay.portal.model.PasswordPolicyRel removeByP_C_C(
525                    long passwordPolicyId, long classNameId, long classPK)
526                    throws com.liferay.portal.NoSuchPasswordPolicyRelException,
527                            com.liferay.portal.kernel.exception.SystemException {
528                    return getPersistence()
529                                       .removeByP_C_C(passwordPolicyId, classNameId, classPK);
530            }
531    
532            /**
533            * Removes all the password policy rels from the database.
534            *
535            * @throws SystemException if a system exception occurred
536            */
537            public static void removeAll()
538                    throws com.liferay.portal.kernel.exception.SystemException {
539                    getPersistence().removeAll();
540            }
541    
542            /**
543            * Returns the number of password policy rels where passwordPolicyId = &#63;.
544            *
545            * @param passwordPolicyId the password policy ID
546            * @return the number of matching password policy rels
547            * @throws SystemException if a system exception occurred
548            */
549            public static int countByPasswordPolicyId(long passwordPolicyId)
550                    throws com.liferay.portal.kernel.exception.SystemException {
551                    return getPersistence().countByPasswordPolicyId(passwordPolicyId);
552            }
553    
554            /**
555            * Returns the number of password policy rels where classNameId = &#63; and classPK = &#63;.
556            *
557            * @param classNameId the class name ID
558            * @param classPK the class p k
559            * @return the number of matching password policy rels
560            * @throws SystemException if a system exception occurred
561            */
562            public static int countByC_C(long classNameId, long classPK)
563                    throws com.liferay.portal.kernel.exception.SystemException {
564                    return getPersistence().countByC_C(classNameId, classPK);
565            }
566    
567            /**
568            * Returns the number of password policy rels where passwordPolicyId = &#63; and classNameId = &#63; and classPK = &#63;.
569            *
570            * @param passwordPolicyId the password policy ID
571            * @param classNameId the class name ID
572            * @param classPK the class p k
573            * @return the number of matching password policy rels
574            * @throws SystemException if a system exception occurred
575            */
576            public static int countByP_C_C(long passwordPolicyId, long classNameId,
577                    long classPK)
578                    throws com.liferay.portal.kernel.exception.SystemException {
579                    return getPersistence()
580                                       .countByP_C_C(passwordPolicyId, classNameId, classPK);
581            }
582    
583            /**
584            * Returns the number of password policy rels.
585            *
586            * @return the number of password policy rels
587            * @throws SystemException if a system exception occurred
588            */
589            public static int countAll()
590                    throws com.liferay.portal.kernel.exception.SystemException {
591                    return getPersistence().countAll();
592            }
593    
594            public static PasswordPolicyRelPersistence getPersistence() {
595                    if (_persistence == null) {
596                            _persistence = (PasswordPolicyRelPersistence)PortalBeanLocatorUtil.locate(PasswordPolicyRelPersistence.class.getName());
597    
598                            ReferenceRegistry.registerReference(PasswordPolicyRelUtil.class,
599                                    "_persistence");
600                    }
601    
602                    return _persistence;
603            }
604    
605            /**
606             * @deprecated
607             */
608            public void setPersistence(PasswordPolicyRelPersistence persistence) {
609            }
610    
611            private static PasswordPolicyRelPersistence _persistence;
612    }