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