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
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
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
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            * Returns 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
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            * Returns 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
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            * Returns all the password policy rels where passwordPolicyId = &#63;.
205            *
206            * @param passwordPolicyId the password policy ID
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            * Returns a range of all the password policy rels where passwordPolicyId = &#63;.
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
224            * @param start the lower bound of the range of password policy rels
225            * @param end the upper bound of the range of password policy rels (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            * Returns an ordered range of all the password policy rels where passwordPolicyId = &#63;.
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
244            * @param start the lower bound of the range of password policy rels
245            * @param end the upper bound of the range of password policy rels (not inclusive)
246            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
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            * Returns the first password policy rel in the ordered set where passwordPolicyId = &#63;.
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
267            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
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            * Returns the last password policy rel in the ordered set where passwordPolicyId = &#63;.
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
290            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
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            * Returns the password policy rels before and after the current password policy rel in the ordered set where passwordPolicyId = &#63;.
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
314            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
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            * 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.
331            *
332            * @param classNameId the class name ID
333            * @param classPK the class p k
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            * 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.
347            *
348            * @param classNameId the class name ID
349            * @param classPK the class p k
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            * 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.
361            *
362            * @param classNameId the class name ID
363            * @param classPK the class p k
364            * @param retrieveFromCache whether to use the finder cache
365            * @return the matching password policy rel, or <code>null</code> if a matching password policy rel could not be found
366            * @throws SystemException if a system exception occurred
367            */
368            public static com.liferay.portal.model.PasswordPolicyRel fetchByC_C(
369                    long classNameId, long classPK, boolean retrieveFromCache)
370                    throws com.liferay.portal.kernel.exception.SystemException {
371                    return getPersistence()
372                                       .fetchByC_C(classNameId, classPK, retrieveFromCache);
373            }
374    
375            /**
376            * 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.
377            *
378            * @param passwordPolicyId the password policy ID
379            * @param classNameId the class name ID
380            * @param classPK the class p k
381            * @return the matching password policy rel
382            * @throws com.liferay.portal.NoSuchPasswordPolicyRelException if a matching password policy rel could not be found
383            * @throws SystemException if a system exception occurred
384            */
385            public static com.liferay.portal.model.PasswordPolicyRel findByP_C_C(
386                    long passwordPolicyId, long classNameId, long classPK)
387                    throws com.liferay.portal.NoSuchPasswordPolicyRelException,
388                            com.liferay.portal.kernel.exception.SystemException {
389                    return getPersistence()
390                                       .findByP_C_C(passwordPolicyId, classNameId, classPK);
391            }
392    
393            /**
394            * 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.
395            *
396            * @param passwordPolicyId the password policy ID
397            * @param classNameId the class name ID
398            * @param classPK the class p k
399            * @return the matching password policy rel, or <code>null</code> if a matching password policy rel could not be found
400            * @throws SystemException if a system exception occurred
401            */
402            public static com.liferay.portal.model.PasswordPolicyRel fetchByP_C_C(
403                    long passwordPolicyId, long classNameId, long classPK)
404                    throws com.liferay.portal.kernel.exception.SystemException {
405                    return getPersistence()
406                                       .fetchByP_C_C(passwordPolicyId, classNameId, classPK);
407            }
408    
409            /**
410            * 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.
411            *
412            * @param passwordPolicyId the password policy ID
413            * @param classNameId the class name ID
414            * @param classPK the class p k
415            * @param retrieveFromCache whether to use the finder cache
416            * @return the matching password policy rel, or <code>null</code> if a matching password policy rel could not be found
417            * @throws SystemException if a system exception occurred
418            */
419            public static com.liferay.portal.model.PasswordPolicyRel fetchByP_C_C(
420                    long passwordPolicyId, long classNameId, long classPK,
421                    boolean retrieveFromCache)
422                    throws com.liferay.portal.kernel.exception.SystemException {
423                    return getPersistence()
424                                       .fetchByP_C_C(passwordPolicyId, classNameId, classPK,
425                            retrieveFromCache);
426            }
427    
428            /**
429            * Returns all the password policy rels.
430            *
431            * @return the password policy rels
432            * @throws SystemException if a system exception occurred
433            */
434            public static java.util.List<com.liferay.portal.model.PasswordPolicyRel> findAll()
435                    throws com.liferay.portal.kernel.exception.SystemException {
436                    return getPersistence().findAll();
437            }
438    
439            /**
440            * Returns a range of all the password policy rels.
441            *
442            * <p>
443            * 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.
444            * </p>
445            *
446            * @param start the lower bound of the range of password policy rels
447            * @param end the upper bound of the range of password policy rels (not inclusive)
448            * @return the range of password policy rels
449            * @throws SystemException if a system exception occurred
450            */
451            public static java.util.List<com.liferay.portal.model.PasswordPolicyRel> findAll(
452                    int start, int end)
453                    throws com.liferay.portal.kernel.exception.SystemException {
454                    return getPersistence().findAll(start, end);
455            }
456    
457            /**
458            * Returns an ordered range of all the password policy rels.
459            *
460            * <p>
461            * 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.
462            * </p>
463            *
464            * @param start the lower bound of the range of password policy rels
465            * @param end the upper bound of the range of password policy rels (not inclusive)
466            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
467            * @return the ordered range of password policy rels
468            * @throws SystemException if a system exception occurred
469            */
470            public static java.util.List<com.liferay.portal.model.PasswordPolicyRel> findAll(
471                    int start, int end,
472                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
473                    throws com.liferay.portal.kernel.exception.SystemException {
474                    return getPersistence().findAll(start, end, orderByComparator);
475            }
476    
477            /**
478            * Removes all the password policy rels where passwordPolicyId = &#63; from the database.
479            *
480            * @param passwordPolicyId the password policy ID
481            * @throws SystemException if a system exception occurred
482            */
483            public static void removeByPasswordPolicyId(long passwordPolicyId)
484                    throws com.liferay.portal.kernel.exception.SystemException {
485                    getPersistence().removeByPasswordPolicyId(passwordPolicyId);
486            }
487    
488            /**
489            * Removes the password policy rel where classNameId = &#63; and classPK = &#63; from the database.
490            *
491            * @param classNameId the class name ID
492            * @param classPK the class p k
493            * @throws SystemException if a system exception occurred
494            */
495            public static void removeByC_C(long classNameId, long classPK)
496                    throws com.liferay.portal.NoSuchPasswordPolicyRelException,
497                            com.liferay.portal.kernel.exception.SystemException {
498                    getPersistence().removeByC_C(classNameId, classPK);
499            }
500    
501            /**
502            * Removes the password policy rel where passwordPolicyId = &#63; and classNameId = &#63; and classPK = &#63; from the database.
503            *
504            * @param passwordPolicyId the password policy ID
505            * @param classNameId the class name ID
506            * @param classPK the class p k
507            * @throws SystemException if a system exception occurred
508            */
509            public static void removeByP_C_C(long passwordPolicyId, long classNameId,
510                    long classPK)
511                    throws com.liferay.portal.NoSuchPasswordPolicyRelException,
512                            com.liferay.portal.kernel.exception.SystemException {
513                    getPersistence().removeByP_C_C(passwordPolicyId, classNameId, classPK);
514            }
515    
516            /**
517            * Removes all the password policy rels from the database.
518            *
519            * @throws SystemException if a system exception occurred
520            */
521            public static void removeAll()
522                    throws com.liferay.portal.kernel.exception.SystemException {
523                    getPersistence().removeAll();
524            }
525    
526            /**
527            * Returns the number of password policy rels where passwordPolicyId = &#63;.
528            *
529            * @param passwordPolicyId the password policy ID
530            * @return the number of matching password policy rels
531            * @throws SystemException if a system exception occurred
532            */
533            public static int countByPasswordPolicyId(long passwordPolicyId)
534                    throws com.liferay.portal.kernel.exception.SystemException {
535                    return getPersistence().countByPasswordPolicyId(passwordPolicyId);
536            }
537    
538            /**
539            * Returns the number of password policy rels where classNameId = &#63; and classPK = &#63;.
540            *
541            * @param classNameId the class name ID
542            * @param classPK the class p k
543            * @return the number of matching password policy rels
544            * @throws SystemException if a system exception occurred
545            */
546            public static int countByC_C(long classNameId, long classPK)
547                    throws com.liferay.portal.kernel.exception.SystemException {
548                    return getPersistence().countByC_C(classNameId, classPK);
549            }
550    
551            /**
552            * Returns the number of password policy rels where passwordPolicyId = &#63; and classNameId = &#63; and classPK = &#63;.
553            *
554            * @param passwordPolicyId the password policy ID
555            * @param classNameId the class name ID
556            * @param classPK the class p k
557            * @return the number of matching password policy rels
558            * @throws SystemException if a system exception occurred
559            */
560            public static int countByP_C_C(long passwordPolicyId, long classNameId,
561                    long classPK)
562                    throws com.liferay.portal.kernel.exception.SystemException {
563                    return getPersistence()
564                                       .countByP_C_C(passwordPolicyId, classNameId, classPK);
565            }
566    
567            /**
568            * Returns the number of password policy rels.
569            *
570            * @return the number of password policy rels
571            * @throws SystemException if a system exception occurred
572            */
573            public static int countAll()
574                    throws com.liferay.portal.kernel.exception.SystemException {
575                    return getPersistence().countAll();
576            }
577    
578            public static PasswordPolicyRelPersistence getPersistence() {
579                    if (_persistence == null) {
580                            _persistence = (PasswordPolicyRelPersistence)PortalBeanLocatorUtil.locate(PasswordPolicyRelPersistence.class.getName());
581    
582                            ReferenceRegistry.registerReference(PasswordPolicyRelUtil.class,
583                                    "_persistence");
584                    }
585    
586                    return _persistence;
587            }
588    
589            public void setPersistence(PasswordPolicyRelPersistence persistence) {
590                    _persistence = persistence;
591    
592                    ReferenceRegistry.registerReference(PasswordPolicyRelUtil.class,
593                            "_persistence");
594            }
595    
596            private static PasswordPolicyRelPersistence _persistence;
597    }