1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   * 
13   */
14  
15  package com.liferay.portal.service.persistence;
16  
17  import com.liferay.portal.NoSuchModelException;
18  import com.liferay.portal.NoSuchPasswordPolicyRelException;
19  import com.liferay.portal.SystemException;
20  import com.liferay.portal.kernel.annotation.BeanReference;
21  import com.liferay.portal.kernel.cache.CacheRegistry;
22  import com.liferay.portal.kernel.dao.orm.DynamicQuery;
23  import com.liferay.portal.kernel.dao.orm.EntityCacheUtil;
24  import com.liferay.portal.kernel.dao.orm.FinderCacheUtil;
25  import com.liferay.portal.kernel.dao.orm.FinderPath;
26  import com.liferay.portal.kernel.dao.orm.Query;
27  import com.liferay.portal.kernel.dao.orm.QueryPos;
28  import com.liferay.portal.kernel.dao.orm.QueryUtil;
29  import com.liferay.portal.kernel.dao.orm.Session;
30  import com.liferay.portal.kernel.log.Log;
31  import com.liferay.portal.kernel.log.LogFactoryUtil;
32  import com.liferay.portal.kernel.util.GetterUtil;
33  import com.liferay.portal.kernel.util.OrderByComparator;
34  import com.liferay.portal.kernel.util.StringBundler;
35  import com.liferay.portal.kernel.util.StringPool;
36  import com.liferay.portal.kernel.util.StringUtil;
37  import com.liferay.portal.model.ModelListener;
38  import com.liferay.portal.model.PasswordPolicyRel;
39  import com.liferay.portal.model.impl.PasswordPolicyRelImpl;
40  import com.liferay.portal.model.impl.PasswordPolicyRelModelImpl;
41  import com.liferay.portal.service.persistence.impl.BasePersistenceImpl;
42  
43  import java.io.Serializable;
44  
45  import java.util.ArrayList;
46  import java.util.Collections;
47  import java.util.List;
48  
49  /**
50   * <a href="PasswordPolicyRelPersistenceImpl.java.html"><b><i>View Source</i></b></a>
51   *
52   * <p>
53   * ServiceBuilder generated this class. Modifications in this class will be
54   * overwritten the next time is generated.
55   * </p>
56   *
57   * @author    Brian Wing Shun Chan
58   * @see       PasswordPolicyRelPersistence
59   * @see       PasswordPolicyRelUtil
60   * @generated
61   */
62  public class PasswordPolicyRelPersistenceImpl extends BasePersistenceImpl<PasswordPolicyRel>
63      implements PasswordPolicyRelPersistence {
64      public static final String FINDER_CLASS_NAME_ENTITY = PasswordPolicyRelImpl.class.getName();
65      public static final String FINDER_CLASS_NAME_LIST = FINDER_CLASS_NAME_ENTITY +
66          ".List";
67      public static final FinderPath FINDER_PATH_FIND_BY_PASSWORDPOLICYID = new FinderPath(PasswordPolicyRelModelImpl.ENTITY_CACHE_ENABLED,
68              PasswordPolicyRelModelImpl.FINDER_CACHE_ENABLED,
69              FINDER_CLASS_NAME_LIST, "findByPasswordPolicyId",
70              new String[] { Long.class.getName() });
71      public static final FinderPath FINDER_PATH_FIND_BY_OBC_PASSWORDPOLICYID = new FinderPath(PasswordPolicyRelModelImpl.ENTITY_CACHE_ENABLED,
72              PasswordPolicyRelModelImpl.FINDER_CACHE_ENABLED,
73              FINDER_CLASS_NAME_LIST, "findByPasswordPolicyId",
74              new String[] {
75                  Long.class.getName(),
76                  
77              "java.lang.Integer", "java.lang.Integer",
78                  "com.liferay.portal.kernel.util.OrderByComparator"
79              });
80      public static final FinderPath FINDER_PATH_COUNT_BY_PASSWORDPOLICYID = new FinderPath(PasswordPolicyRelModelImpl.ENTITY_CACHE_ENABLED,
81              PasswordPolicyRelModelImpl.FINDER_CACHE_ENABLED,
82              FINDER_CLASS_NAME_LIST, "countByPasswordPolicyId",
83              new String[] { Long.class.getName() });
84      public static final FinderPath FINDER_PATH_FETCH_BY_C_C = new FinderPath(PasswordPolicyRelModelImpl.ENTITY_CACHE_ENABLED,
85              PasswordPolicyRelModelImpl.FINDER_CACHE_ENABLED,
86              FINDER_CLASS_NAME_ENTITY, "fetchByC_C",
87              new String[] { Long.class.getName(), Long.class.getName() });
88      public static final FinderPath FINDER_PATH_COUNT_BY_C_C = new FinderPath(PasswordPolicyRelModelImpl.ENTITY_CACHE_ENABLED,
89              PasswordPolicyRelModelImpl.FINDER_CACHE_ENABLED,
90              FINDER_CLASS_NAME_LIST, "countByC_C",
91              new String[] { Long.class.getName(), Long.class.getName() });
92      public static final FinderPath FINDER_PATH_FETCH_BY_P_C_C = new FinderPath(PasswordPolicyRelModelImpl.ENTITY_CACHE_ENABLED,
93              PasswordPolicyRelModelImpl.FINDER_CACHE_ENABLED,
94              FINDER_CLASS_NAME_ENTITY, "fetchByP_C_C",
95              new String[] {
96                  Long.class.getName(), Long.class.getName(), Long.class.getName()
97              });
98      public static final FinderPath FINDER_PATH_COUNT_BY_P_C_C = new FinderPath(PasswordPolicyRelModelImpl.ENTITY_CACHE_ENABLED,
99              PasswordPolicyRelModelImpl.FINDER_CACHE_ENABLED,
100             FINDER_CLASS_NAME_LIST, "countByP_C_C",
101             new String[] {
102                 Long.class.getName(), Long.class.getName(), Long.class.getName()
103             });
104     public static final FinderPath FINDER_PATH_FIND_ALL = new FinderPath(PasswordPolicyRelModelImpl.ENTITY_CACHE_ENABLED,
105             PasswordPolicyRelModelImpl.FINDER_CACHE_ENABLED,
106             FINDER_CLASS_NAME_LIST, "findAll", new String[0]);
107     public static final FinderPath FINDER_PATH_COUNT_ALL = new FinderPath(PasswordPolicyRelModelImpl.ENTITY_CACHE_ENABLED,
108             PasswordPolicyRelModelImpl.FINDER_CACHE_ENABLED,
109             FINDER_CLASS_NAME_LIST, "countAll", new String[0]);
110 
111     public void cacheResult(PasswordPolicyRel passwordPolicyRel) {
112         EntityCacheUtil.putResult(PasswordPolicyRelModelImpl.ENTITY_CACHE_ENABLED,
113             PasswordPolicyRelImpl.class, passwordPolicyRel.getPrimaryKey(),
114             passwordPolicyRel);
115 
116         FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_C_C,
117             new Object[] {
118                 new Long(passwordPolicyRel.getClassNameId()),
119                 new Long(passwordPolicyRel.getClassPK())
120             }, passwordPolicyRel);
121 
122         FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_P_C_C,
123             new Object[] {
124                 new Long(passwordPolicyRel.getPasswordPolicyId()),
125                 new Long(passwordPolicyRel.getClassNameId()),
126                 new Long(passwordPolicyRel.getClassPK())
127             }, passwordPolicyRel);
128     }
129 
130     public void cacheResult(List<PasswordPolicyRel> passwordPolicyRels) {
131         for (PasswordPolicyRel passwordPolicyRel : passwordPolicyRels) {
132             if (EntityCacheUtil.getResult(
133                         PasswordPolicyRelModelImpl.ENTITY_CACHE_ENABLED,
134                         PasswordPolicyRelImpl.class,
135                         passwordPolicyRel.getPrimaryKey(), this) == null) {
136                 cacheResult(passwordPolicyRel);
137             }
138         }
139     }
140 
141     public void clearCache() {
142         CacheRegistry.clear(PasswordPolicyRelImpl.class.getName());
143         EntityCacheUtil.clearCache(PasswordPolicyRelImpl.class.getName());
144         FinderCacheUtil.clearCache(FINDER_CLASS_NAME_ENTITY);
145         FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST);
146     }
147 
148     public PasswordPolicyRel create(long passwordPolicyRelId) {
149         PasswordPolicyRel passwordPolicyRel = new PasswordPolicyRelImpl();
150 
151         passwordPolicyRel.setNew(true);
152         passwordPolicyRel.setPrimaryKey(passwordPolicyRelId);
153 
154         return passwordPolicyRel;
155     }
156 
157     public PasswordPolicyRel remove(Serializable primaryKey)
158         throws NoSuchModelException, SystemException {
159         return remove(((Long)primaryKey).longValue());
160     }
161 
162     public PasswordPolicyRel remove(long passwordPolicyRelId)
163         throws NoSuchPasswordPolicyRelException, SystemException {
164         Session session = null;
165 
166         try {
167             session = openSession();
168 
169             PasswordPolicyRel passwordPolicyRel = (PasswordPolicyRel)session.get(PasswordPolicyRelImpl.class,
170                     new Long(passwordPolicyRelId));
171 
172             if (passwordPolicyRel == null) {
173                 if (_log.isWarnEnabled()) {
174                     _log.warn(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY +
175                         passwordPolicyRelId);
176                 }
177 
178                 throw new NoSuchPasswordPolicyRelException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY +
179                     passwordPolicyRelId);
180             }
181 
182             return remove(passwordPolicyRel);
183         }
184         catch (NoSuchPasswordPolicyRelException nsee) {
185             throw nsee;
186         }
187         catch (Exception e) {
188             throw processException(e);
189         }
190         finally {
191             closeSession(session);
192         }
193     }
194 
195     public PasswordPolicyRel remove(PasswordPolicyRel passwordPolicyRel)
196         throws SystemException {
197         for (ModelListener<PasswordPolicyRel> listener : listeners) {
198             listener.onBeforeRemove(passwordPolicyRel);
199         }
200 
201         passwordPolicyRel = removeImpl(passwordPolicyRel);
202 
203         for (ModelListener<PasswordPolicyRel> listener : listeners) {
204             listener.onAfterRemove(passwordPolicyRel);
205         }
206 
207         return passwordPolicyRel;
208     }
209 
210     protected PasswordPolicyRel removeImpl(PasswordPolicyRel passwordPolicyRel)
211         throws SystemException {
212         passwordPolicyRel = toUnwrappedModel(passwordPolicyRel);
213 
214         Session session = null;
215 
216         try {
217             session = openSession();
218 
219             if (passwordPolicyRel.isCachedModel() ||
220                     BatchSessionUtil.isEnabled()) {
221                 Object staleObject = session.get(PasswordPolicyRelImpl.class,
222                         passwordPolicyRel.getPrimaryKeyObj());
223 
224                 if (staleObject != null) {
225                     session.evict(staleObject);
226                 }
227             }
228 
229             session.delete(passwordPolicyRel);
230 
231             session.flush();
232         }
233         catch (Exception e) {
234             throw processException(e);
235         }
236         finally {
237             closeSession(session);
238         }
239 
240         FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST);
241 
242         PasswordPolicyRelModelImpl passwordPolicyRelModelImpl = (PasswordPolicyRelModelImpl)passwordPolicyRel;
243 
244         FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_C_C,
245             new Object[] {
246                 new Long(passwordPolicyRelModelImpl.getOriginalClassNameId()),
247                 new Long(passwordPolicyRelModelImpl.getOriginalClassPK())
248             });
249 
250         FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_P_C_C,
251             new Object[] {
252                 new Long(passwordPolicyRelModelImpl.getOriginalPasswordPolicyId()),
253                 new Long(passwordPolicyRelModelImpl.getOriginalClassNameId()),
254                 new Long(passwordPolicyRelModelImpl.getOriginalClassPK())
255             });
256 
257         EntityCacheUtil.removeResult(PasswordPolicyRelModelImpl.ENTITY_CACHE_ENABLED,
258             PasswordPolicyRelImpl.class, passwordPolicyRel.getPrimaryKey());
259 
260         return passwordPolicyRel;
261     }
262 
263     /**
264      * @deprecated Use {@link BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)}.
265      */
266     public PasswordPolicyRel update(PasswordPolicyRel passwordPolicyRel)
267         throws SystemException {
268         if (_log.isWarnEnabled()) {
269             _log.warn(
270                 "Using the deprecated update(PasswordPolicyRel passwordPolicyRel) method. Use update(PasswordPolicyRel passwordPolicyRel, boolean merge) instead.");
271         }
272 
273         return update(passwordPolicyRel, false);
274     }
275 
276     public PasswordPolicyRel updateImpl(
277         com.liferay.portal.model.PasswordPolicyRel passwordPolicyRel,
278         boolean merge) throws SystemException {
279         passwordPolicyRel = toUnwrappedModel(passwordPolicyRel);
280 
281         boolean isNew = passwordPolicyRel.isNew();
282 
283         PasswordPolicyRelModelImpl passwordPolicyRelModelImpl = (PasswordPolicyRelModelImpl)passwordPolicyRel;
284 
285         Session session = null;
286 
287         try {
288             session = openSession();
289 
290             BatchSessionUtil.update(session, passwordPolicyRel, merge);
291 
292             passwordPolicyRel.setNew(false);
293         }
294         catch (Exception e) {
295             throw processException(e);
296         }
297         finally {
298             closeSession(session);
299         }
300 
301         FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST);
302 
303         EntityCacheUtil.putResult(PasswordPolicyRelModelImpl.ENTITY_CACHE_ENABLED,
304             PasswordPolicyRelImpl.class, passwordPolicyRel.getPrimaryKey(),
305             passwordPolicyRel);
306 
307         if (!isNew &&
308                 ((passwordPolicyRel.getClassNameId() != passwordPolicyRelModelImpl.getOriginalClassNameId()) ||
309                 (passwordPolicyRel.getClassPK() != passwordPolicyRelModelImpl.getOriginalClassPK()))) {
310             FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_C_C,
311                 new Object[] {
312                     new Long(passwordPolicyRelModelImpl.getOriginalClassNameId()),
313                     new Long(passwordPolicyRelModelImpl.getOriginalClassPK())
314                 });
315         }
316 
317         if (isNew ||
318                 ((passwordPolicyRel.getClassNameId() != passwordPolicyRelModelImpl.getOriginalClassNameId()) ||
319                 (passwordPolicyRel.getClassPK() != passwordPolicyRelModelImpl.getOriginalClassPK()))) {
320             FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_C_C,
321                 new Object[] {
322                     new Long(passwordPolicyRel.getClassNameId()),
323                     new Long(passwordPolicyRel.getClassPK())
324                 }, passwordPolicyRel);
325         }
326 
327         if (!isNew &&
328                 ((passwordPolicyRel.getPasswordPolicyId() != passwordPolicyRelModelImpl.getOriginalPasswordPolicyId()) ||
329                 (passwordPolicyRel.getClassNameId() != passwordPolicyRelModelImpl.getOriginalClassNameId()) ||
330                 (passwordPolicyRel.getClassPK() != passwordPolicyRelModelImpl.getOriginalClassPK()))) {
331             FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_P_C_C,
332                 new Object[] {
333                     new Long(passwordPolicyRelModelImpl.getOriginalPasswordPolicyId()),
334                     new Long(passwordPolicyRelModelImpl.getOriginalClassNameId()),
335                     new Long(passwordPolicyRelModelImpl.getOriginalClassPK())
336                 });
337         }
338 
339         if (isNew ||
340                 ((passwordPolicyRel.getPasswordPolicyId() != passwordPolicyRelModelImpl.getOriginalPasswordPolicyId()) ||
341                 (passwordPolicyRel.getClassNameId() != passwordPolicyRelModelImpl.getOriginalClassNameId()) ||
342                 (passwordPolicyRel.getClassPK() != passwordPolicyRelModelImpl.getOriginalClassPK()))) {
343             FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_P_C_C,
344                 new Object[] {
345                     new Long(passwordPolicyRel.getPasswordPolicyId()),
346                     new Long(passwordPolicyRel.getClassNameId()),
347                     new Long(passwordPolicyRel.getClassPK())
348                 }, passwordPolicyRel);
349         }
350 
351         return passwordPolicyRel;
352     }
353 
354     protected PasswordPolicyRel toUnwrappedModel(
355         PasswordPolicyRel passwordPolicyRel) {
356         if (passwordPolicyRel instanceof PasswordPolicyRelImpl) {
357             return passwordPolicyRel;
358         }
359 
360         PasswordPolicyRelImpl passwordPolicyRelImpl = new PasswordPolicyRelImpl();
361 
362         passwordPolicyRelImpl.setNew(passwordPolicyRel.isNew());
363         passwordPolicyRelImpl.setPrimaryKey(passwordPolicyRel.getPrimaryKey());
364 
365         passwordPolicyRelImpl.setPasswordPolicyRelId(passwordPolicyRel.getPasswordPolicyRelId());
366         passwordPolicyRelImpl.setPasswordPolicyId(passwordPolicyRel.getPasswordPolicyId());
367         passwordPolicyRelImpl.setClassNameId(passwordPolicyRel.getClassNameId());
368         passwordPolicyRelImpl.setClassPK(passwordPolicyRel.getClassPK());
369 
370         return passwordPolicyRelImpl;
371     }
372 
373     public PasswordPolicyRel findByPrimaryKey(Serializable primaryKey)
374         throws NoSuchModelException, SystemException {
375         return findByPrimaryKey(((Long)primaryKey).longValue());
376     }
377 
378     public PasswordPolicyRel findByPrimaryKey(long passwordPolicyRelId)
379         throws NoSuchPasswordPolicyRelException, SystemException {
380         PasswordPolicyRel passwordPolicyRel = fetchByPrimaryKey(passwordPolicyRelId);
381 
382         if (passwordPolicyRel == null) {
383             if (_log.isWarnEnabled()) {
384                 _log.warn(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY +
385                     passwordPolicyRelId);
386             }
387 
388             throw new NoSuchPasswordPolicyRelException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY +
389                 passwordPolicyRelId);
390         }
391 
392         return passwordPolicyRel;
393     }
394 
395     public PasswordPolicyRel fetchByPrimaryKey(Serializable primaryKey)
396         throws SystemException {
397         return fetchByPrimaryKey(((Long)primaryKey).longValue());
398     }
399 
400     public PasswordPolicyRel fetchByPrimaryKey(long passwordPolicyRelId)
401         throws SystemException {
402         PasswordPolicyRel passwordPolicyRel = (PasswordPolicyRel)EntityCacheUtil.getResult(PasswordPolicyRelModelImpl.ENTITY_CACHE_ENABLED,
403                 PasswordPolicyRelImpl.class, passwordPolicyRelId, this);
404 
405         if (passwordPolicyRel == null) {
406             Session session = null;
407 
408             try {
409                 session = openSession();
410 
411                 passwordPolicyRel = (PasswordPolicyRel)session.get(PasswordPolicyRelImpl.class,
412                         new Long(passwordPolicyRelId));
413             }
414             catch (Exception e) {
415                 throw processException(e);
416             }
417             finally {
418                 if (passwordPolicyRel != null) {
419                     cacheResult(passwordPolicyRel);
420                 }
421 
422                 closeSession(session);
423             }
424         }
425 
426         return passwordPolicyRel;
427     }
428 
429     public List<PasswordPolicyRel> findByPasswordPolicyId(long passwordPolicyId)
430         throws SystemException {
431         Object[] finderArgs = new Object[] { new Long(passwordPolicyId) };
432 
433         List<PasswordPolicyRel> list = (List<PasswordPolicyRel>)FinderCacheUtil.getResult(FINDER_PATH_FIND_BY_PASSWORDPOLICYID,
434                 finderArgs, this);
435 
436         if (list == null) {
437             Session session = null;
438 
439             try {
440                 session = openSession();
441 
442                 StringBundler query = new StringBundler(2);
443 
444                 query.append(_SQL_SELECT_PASSWORDPOLICYREL_WHERE);
445 
446                 query.append(_FINDER_COLUMN_PASSWORDPOLICYID_PASSWORDPOLICYID_2);
447 
448                 String sql = query.toString();
449 
450                 Query q = session.createQuery(sql);
451 
452                 QueryPos qPos = QueryPos.getInstance(q);
453 
454                 qPos.add(passwordPolicyId);
455 
456                 list = q.list();
457             }
458             catch (Exception e) {
459                 throw processException(e);
460             }
461             finally {
462                 if (list == null) {
463                     list = new ArrayList<PasswordPolicyRel>();
464                 }
465 
466                 cacheResult(list);
467 
468                 FinderCacheUtil.putResult(FINDER_PATH_FIND_BY_PASSWORDPOLICYID,
469                     finderArgs, list);
470 
471                 closeSession(session);
472             }
473         }
474 
475         return list;
476     }
477 
478     public List<PasswordPolicyRel> findByPasswordPolicyId(
479         long passwordPolicyId, int start, int end) throws SystemException {
480         return findByPasswordPolicyId(passwordPolicyId, start, end, null);
481     }
482 
483     public List<PasswordPolicyRel> findByPasswordPolicyId(
484         long passwordPolicyId, int start, int end, OrderByComparator obc)
485         throws SystemException {
486         Object[] finderArgs = new Object[] {
487                 new Long(passwordPolicyId),
488                 
489                 String.valueOf(start), String.valueOf(end), String.valueOf(obc)
490             };
491 
492         List<PasswordPolicyRel> list = (List<PasswordPolicyRel>)FinderCacheUtil.getResult(FINDER_PATH_FIND_BY_OBC_PASSWORDPOLICYID,
493                 finderArgs, this);
494 
495         if (list == null) {
496             Session session = null;
497 
498             try {
499                 session = openSession();
500 
501                 StringBundler query = null;
502 
503                 if (obc != null) {
504                     query = new StringBundler(3 +
505                             (obc.getOrderByFields().length * 3));
506                 }
507                 else {
508                     query = new StringBundler(2);
509                 }
510 
511                 query.append(_SQL_SELECT_PASSWORDPOLICYREL_WHERE);
512 
513                 query.append(_FINDER_COLUMN_PASSWORDPOLICYID_PASSWORDPOLICYID_2);
514 
515                 if (obc != null) {
516                     appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, obc);
517                 }
518 
519                 String sql = query.toString();
520 
521                 Query q = session.createQuery(sql);
522 
523                 QueryPos qPos = QueryPos.getInstance(q);
524 
525                 qPos.add(passwordPolicyId);
526 
527                 list = (List<PasswordPolicyRel>)QueryUtil.list(q, getDialect(),
528                         start, end);
529             }
530             catch (Exception e) {
531                 throw processException(e);
532             }
533             finally {
534                 if (list == null) {
535                     list = new ArrayList<PasswordPolicyRel>();
536                 }
537 
538                 cacheResult(list);
539 
540                 FinderCacheUtil.putResult(FINDER_PATH_FIND_BY_OBC_PASSWORDPOLICYID,
541                     finderArgs, list);
542 
543                 closeSession(session);
544             }
545         }
546 
547         return list;
548     }
549 
550     public PasswordPolicyRel findByPasswordPolicyId_First(
551         long passwordPolicyId, OrderByComparator obc)
552         throws NoSuchPasswordPolicyRelException, SystemException {
553         List<PasswordPolicyRel> list = findByPasswordPolicyId(passwordPolicyId,
554                 0, 1, obc);
555 
556         if (list.isEmpty()) {
557             StringBundler msg = new StringBundler(4);
558 
559             msg.append(_NO_SUCH_ENTITY_WITH_KEY);
560 
561             msg.append("passwordPolicyId=");
562             msg.append(passwordPolicyId);
563 
564             msg.append(StringPool.CLOSE_CURLY_BRACE);
565 
566             throw new NoSuchPasswordPolicyRelException(msg.toString());
567         }
568         else {
569             return list.get(0);
570         }
571     }
572 
573     public PasswordPolicyRel findByPasswordPolicyId_Last(
574         long passwordPolicyId, OrderByComparator obc)
575         throws NoSuchPasswordPolicyRelException, SystemException {
576         int count = countByPasswordPolicyId(passwordPolicyId);
577 
578         List<PasswordPolicyRel> list = findByPasswordPolicyId(passwordPolicyId,
579                 count - 1, count, obc);
580 
581         if (list.isEmpty()) {
582             StringBundler msg = new StringBundler(4);
583 
584             msg.append(_NO_SUCH_ENTITY_WITH_KEY);
585 
586             msg.append("passwordPolicyId=");
587             msg.append(passwordPolicyId);
588 
589             msg.append(StringPool.CLOSE_CURLY_BRACE);
590 
591             throw new NoSuchPasswordPolicyRelException(msg.toString());
592         }
593         else {
594             return list.get(0);
595         }
596     }
597 
598     public PasswordPolicyRel[] findByPasswordPolicyId_PrevAndNext(
599         long passwordPolicyRelId, long passwordPolicyId, OrderByComparator obc)
600         throws NoSuchPasswordPolicyRelException, SystemException {
601         PasswordPolicyRel passwordPolicyRel = findByPrimaryKey(passwordPolicyRelId);
602 
603         int count = countByPasswordPolicyId(passwordPolicyId);
604 
605         Session session = null;
606 
607         try {
608             session = openSession();
609 
610             StringBundler query = null;
611 
612             if (obc != null) {
613                 query = new StringBundler(3 +
614                         (obc.getOrderByFields().length * 3));
615             }
616             else {
617                 query = new StringBundler(2);
618             }
619 
620             query.append(_SQL_SELECT_PASSWORDPOLICYREL_WHERE);
621 
622             query.append(_FINDER_COLUMN_PASSWORDPOLICYID_PASSWORDPOLICYID_2);
623 
624             if (obc != null) {
625                 appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, obc);
626             }
627 
628             String sql = query.toString();
629 
630             Query q = session.createQuery(sql);
631 
632             QueryPos qPos = QueryPos.getInstance(q);
633 
634             qPos.add(passwordPolicyId);
635 
636             Object[] objArray = QueryUtil.getPrevAndNext(q, count, obc,
637                     passwordPolicyRel);
638 
639             PasswordPolicyRel[] array = new PasswordPolicyRelImpl[3];
640 
641             array[0] = (PasswordPolicyRel)objArray[0];
642             array[1] = (PasswordPolicyRel)objArray[1];
643             array[2] = (PasswordPolicyRel)objArray[2];
644 
645             return array;
646         }
647         catch (Exception e) {
648             throw processException(e);
649         }
650         finally {
651             closeSession(session);
652         }
653     }
654 
655     public PasswordPolicyRel findByC_C(long classNameId, long classPK)
656         throws NoSuchPasswordPolicyRelException, SystemException {
657         PasswordPolicyRel passwordPolicyRel = fetchByC_C(classNameId, classPK);
658 
659         if (passwordPolicyRel == null) {
660             StringBundler msg = new StringBundler(6);
661 
662             msg.append(_NO_SUCH_ENTITY_WITH_KEY);
663 
664             msg.append("classNameId=");
665             msg.append(classNameId);
666 
667             msg.append(", classPK=");
668             msg.append(classPK);
669 
670             msg.append(StringPool.CLOSE_CURLY_BRACE);
671 
672             if (_log.isWarnEnabled()) {
673                 _log.warn(msg.toString());
674             }
675 
676             throw new NoSuchPasswordPolicyRelException(msg.toString());
677         }
678 
679         return passwordPolicyRel;
680     }
681 
682     public PasswordPolicyRel fetchByC_C(long classNameId, long classPK)
683         throws SystemException {
684         return fetchByC_C(classNameId, classPK, true);
685     }
686 
687     public PasswordPolicyRel fetchByC_C(long classNameId, long classPK,
688         boolean retrieveFromCache) throws SystemException {
689         Object[] finderArgs = new Object[] {
690                 new Long(classNameId), new Long(classPK)
691             };
692 
693         Object result = null;
694 
695         if (retrieveFromCache) {
696             result = FinderCacheUtil.getResult(FINDER_PATH_FETCH_BY_C_C,
697                     finderArgs, this);
698         }
699 
700         if (result == null) {
701             Session session = null;
702 
703             try {
704                 session = openSession();
705 
706                 StringBundler query = new StringBundler(3);
707 
708                 query.append(_SQL_SELECT_PASSWORDPOLICYREL_WHERE);
709 
710                 query.append(_FINDER_COLUMN_C_C_CLASSNAMEID_2);
711 
712                 query.append(_FINDER_COLUMN_C_C_CLASSPK_2);
713 
714                 String sql = query.toString();
715 
716                 Query q = session.createQuery(sql);
717 
718                 QueryPos qPos = QueryPos.getInstance(q);
719 
720                 qPos.add(classNameId);
721 
722                 qPos.add(classPK);
723 
724                 List<PasswordPolicyRel> list = q.list();
725 
726                 result = list;
727 
728                 PasswordPolicyRel passwordPolicyRel = null;
729 
730                 if (list.isEmpty()) {
731                     FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_C_C,
732                         finderArgs, list);
733                 }
734                 else {
735                     passwordPolicyRel = list.get(0);
736 
737                     cacheResult(passwordPolicyRel);
738 
739                     if ((passwordPolicyRel.getClassNameId() != classNameId) ||
740                             (passwordPolicyRel.getClassPK() != classPK)) {
741                         FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_C_C,
742                             finderArgs, passwordPolicyRel);
743                     }
744                 }
745 
746                 return passwordPolicyRel;
747             }
748             catch (Exception e) {
749                 throw processException(e);
750             }
751             finally {
752                 if (result == null) {
753                     FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_C_C,
754                         finderArgs, new ArrayList<PasswordPolicyRel>());
755                 }
756 
757                 closeSession(session);
758             }
759         }
760         else {
761             if (result instanceof List<?>) {
762                 return null;
763             }
764             else {
765                 return (PasswordPolicyRel)result;
766             }
767         }
768     }
769 
770     public PasswordPolicyRel findByP_C_C(long passwordPolicyId,
771         long classNameId, long classPK)
772         throws NoSuchPasswordPolicyRelException, SystemException {
773         PasswordPolicyRel passwordPolicyRel = fetchByP_C_C(passwordPolicyId,
774                 classNameId, classPK);
775 
776         if (passwordPolicyRel == null) {
777             StringBundler msg = new StringBundler(8);
778 
779             msg.append(_NO_SUCH_ENTITY_WITH_KEY);
780 
781             msg.append("passwordPolicyId=");
782             msg.append(passwordPolicyId);
783 
784             msg.append(", classNameId=");
785             msg.append(classNameId);
786 
787             msg.append(", classPK=");
788             msg.append(classPK);
789 
790             msg.append(StringPool.CLOSE_CURLY_BRACE);
791 
792             if (_log.isWarnEnabled()) {
793                 _log.warn(msg.toString());
794             }
795 
796             throw new NoSuchPasswordPolicyRelException(msg.toString());
797         }
798 
799         return passwordPolicyRel;
800     }
801 
802     public PasswordPolicyRel fetchByP_C_C(long passwordPolicyId,
803         long classNameId, long classPK) throws SystemException {
804         return fetchByP_C_C(passwordPolicyId, classNameId, classPK, true);
805     }
806 
807     public PasswordPolicyRel fetchByP_C_C(long passwordPolicyId,
808         long classNameId, long classPK, boolean retrieveFromCache)
809         throws SystemException {
810         Object[] finderArgs = new Object[] {
811                 new Long(passwordPolicyId), new Long(classNameId),
812                 new Long(classPK)
813             };
814 
815         Object result = null;
816 
817         if (retrieveFromCache) {
818             result = FinderCacheUtil.getResult(FINDER_PATH_FETCH_BY_P_C_C,
819                     finderArgs, this);
820         }
821 
822         if (result == null) {
823             Session session = null;
824 
825             try {
826                 session = openSession();
827 
828                 StringBundler query = new StringBundler(4);
829 
830                 query.append(_SQL_SELECT_PASSWORDPOLICYREL_WHERE);
831 
832                 query.append(_FINDER_COLUMN_P_C_C_PASSWORDPOLICYID_2);
833 
834                 query.append(_FINDER_COLUMN_P_C_C_CLASSNAMEID_2);
835 
836                 query.append(_FINDER_COLUMN_P_C_C_CLASSPK_2);
837 
838                 String sql = query.toString();
839 
840                 Query q = session.createQuery(sql);
841 
842                 QueryPos qPos = QueryPos.getInstance(q);
843 
844                 qPos.add(passwordPolicyId);
845 
846                 qPos.add(classNameId);
847 
848                 qPos.add(classPK);
849 
850                 List<PasswordPolicyRel> list = q.list();
851 
852                 result = list;
853 
854                 PasswordPolicyRel passwordPolicyRel = null;
855 
856                 if (list.isEmpty()) {
857                     FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_P_C_C,
858                         finderArgs, list);
859                 }
860                 else {
861                     passwordPolicyRel = list.get(0);
862 
863                     cacheResult(passwordPolicyRel);
864 
865                     if ((passwordPolicyRel.getPasswordPolicyId() != passwordPolicyId) ||
866                             (passwordPolicyRel.getClassNameId() != classNameId) ||
867                             (passwordPolicyRel.getClassPK() != classPK)) {
868                         FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_P_C_C,
869                             finderArgs, passwordPolicyRel);
870                     }
871                 }
872 
873                 return passwordPolicyRel;
874             }
875             catch (Exception e) {
876                 throw processException(e);
877             }
878             finally {
879                 if (result == null) {
880                     FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_P_C_C,
881                         finderArgs, new ArrayList<PasswordPolicyRel>());
882                 }
883 
884                 closeSession(session);
885             }
886         }
887         else {
888             if (result instanceof List<?>) {
889                 return null;
890             }
891             else {
892                 return (PasswordPolicyRel)result;
893             }
894         }
895     }
896 
897     public List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
898         throws SystemException {
899         Session session = null;
900 
901         try {
902             session = openSession();
903 
904             dynamicQuery.compile(session);
905 
906             return dynamicQuery.list();
907         }
908         catch (Exception e) {
909             throw processException(e);
910         }
911         finally {
912             closeSession(session);
913         }
914     }
915 
916     public List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery,
917         int start, int end) throws SystemException {
918         Session session = null;
919 
920         try {
921             session = openSession();
922 
923             dynamicQuery.setLimit(start, end);
924 
925             dynamicQuery.compile(session);
926 
927             return dynamicQuery.list();
928         }
929         catch (Exception e) {
930             throw processException(e);
931         }
932         finally {
933             closeSession(session);
934         }
935     }
936 
937     public List<PasswordPolicyRel> findAll() throws SystemException {
938         return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
939     }
940 
941     public List<PasswordPolicyRel> findAll(int start, int end)
942         throws SystemException {
943         return findAll(start, end, null);
944     }
945 
946     public List<PasswordPolicyRel> findAll(int start, int end,
947         OrderByComparator obc) throws SystemException {
948         Object[] finderArgs = new Object[] {
949                 String.valueOf(start), String.valueOf(end), String.valueOf(obc)
950             };
951 
952         List<PasswordPolicyRel> list = (List<PasswordPolicyRel>)FinderCacheUtil.getResult(FINDER_PATH_FIND_ALL,
953                 finderArgs, this);
954 
955         if (list == null) {
956             Session session = null;
957 
958             try {
959                 session = openSession();
960 
961                 StringBundler query = null;
962                 String sql = null;
963 
964                 if (obc != null) {
965                     query = new StringBundler(2 +
966                             (obc.getOrderByFields().length * 3));
967 
968                     query.append(_SQL_SELECT_PASSWORDPOLICYREL);
969 
970                     appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, obc);
971 
972                     sql = query.toString();
973                 }
974 
975                 sql = _SQL_SELECT_PASSWORDPOLICYREL;
976 
977                 Query q = session.createQuery(sql);
978 
979                 if (obc == null) {
980                     list = (List<PasswordPolicyRel>)QueryUtil.list(q,
981                             getDialect(), start, end, false);
982 
983                     Collections.sort(list);
984                 }
985                 else {
986                     list = (List<PasswordPolicyRel>)QueryUtil.list(q,
987                             getDialect(), start, end);
988                 }
989             }
990             catch (Exception e) {
991                 throw processException(e);
992             }
993             finally {
994                 if (list == null) {
995                     list = new ArrayList<PasswordPolicyRel>();
996                 }
997 
998                 cacheResult(list);
999 
1000                FinderCacheUtil.putResult(FINDER_PATH_FIND_ALL, finderArgs, list);
1001
1002                closeSession(session);
1003            }
1004        }
1005
1006        return list;
1007    }
1008
1009    public void removeByPasswordPolicyId(long passwordPolicyId)
1010        throws SystemException {
1011        for (PasswordPolicyRel passwordPolicyRel : findByPasswordPolicyId(
1012                passwordPolicyId)) {
1013            remove(passwordPolicyRel);
1014        }
1015    }
1016
1017    public void removeByC_C(long classNameId, long classPK)
1018        throws NoSuchPasswordPolicyRelException, SystemException {
1019        PasswordPolicyRel passwordPolicyRel = findByC_C(classNameId, classPK);
1020
1021        remove(passwordPolicyRel);
1022    }
1023
1024    public void removeByP_C_C(long passwordPolicyId, long classNameId,
1025        long classPK) throws NoSuchPasswordPolicyRelException, SystemException {
1026        PasswordPolicyRel passwordPolicyRel = findByP_C_C(passwordPolicyId,
1027                classNameId, classPK);
1028
1029        remove(passwordPolicyRel);
1030    }
1031
1032    public void removeAll() throws SystemException {
1033        for (PasswordPolicyRel passwordPolicyRel : findAll()) {
1034            remove(passwordPolicyRel);
1035        }
1036    }
1037
1038    public int countByPasswordPolicyId(long passwordPolicyId)
1039        throws SystemException {
1040        Object[] finderArgs = new Object[] { new Long(passwordPolicyId) };
1041
1042        Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_BY_PASSWORDPOLICYID,
1043                finderArgs, this);
1044
1045        if (count == null) {
1046            Session session = null;
1047
1048            try {
1049                session = openSession();
1050
1051                StringBundler query = new StringBundler(2);
1052
1053                query.append(_SQL_COUNT_PASSWORDPOLICYREL_WHERE);
1054
1055                query.append(_FINDER_COLUMN_PASSWORDPOLICYID_PASSWORDPOLICYID_2);
1056
1057                String sql = query.toString();
1058
1059                Query q = session.createQuery(sql);
1060
1061                QueryPos qPos = QueryPos.getInstance(q);
1062
1063                qPos.add(passwordPolicyId);
1064
1065                count = (Long)q.uniqueResult();
1066            }
1067            catch (Exception e) {
1068                throw processException(e);
1069            }
1070            finally {
1071                if (count == null) {
1072                    count = Long.valueOf(0);
1073                }
1074
1075                FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_PASSWORDPOLICYID,
1076                    finderArgs, count);
1077
1078                closeSession(session);
1079            }
1080        }
1081
1082        return count.intValue();
1083    }
1084
1085    public int countByC_C(long classNameId, long classPK)
1086        throws SystemException {
1087        Object[] finderArgs = new Object[] {
1088                new Long(classNameId), new Long(classPK)
1089            };
1090
1091        Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_BY_C_C,
1092                finderArgs, this);
1093
1094        if (count == null) {
1095            Session session = null;
1096
1097            try {
1098                session = openSession();
1099
1100                StringBundler query = new StringBundler(3);
1101
1102                query.append(_SQL_COUNT_PASSWORDPOLICYREL_WHERE);
1103
1104                query.append(_FINDER_COLUMN_C_C_CLASSNAMEID_2);
1105
1106                query.append(_FINDER_COLUMN_C_C_CLASSPK_2);
1107
1108                String sql = query.toString();
1109
1110                Query q = session.createQuery(sql);
1111
1112                QueryPos qPos = QueryPos.getInstance(q);
1113
1114                qPos.add(classNameId);
1115
1116                qPos.add(classPK);
1117
1118                count = (Long)q.uniqueResult();
1119            }
1120            catch (Exception e) {
1121                throw processException(e);
1122            }
1123            finally {
1124                if (count == null) {
1125                    count = Long.valueOf(0);
1126                }
1127
1128                FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_C_C, finderArgs,
1129                    count);
1130
1131                closeSession(session);
1132            }
1133        }
1134
1135        return count.intValue();
1136    }
1137
1138    public int countByP_C_C(long passwordPolicyId, long classNameId,
1139        long classPK) throws SystemException {
1140        Object[] finderArgs = new Object[] {
1141                new Long(passwordPolicyId), new Long(classNameId),
1142                new Long(classPK)
1143            };
1144
1145        Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_BY_P_C_C,
1146                finderArgs, this);
1147
1148        if (count == null) {
1149            Session session = null;
1150
1151            try {
1152                session = openSession();
1153
1154                StringBundler query = new StringBundler(4);
1155
1156                query.append(_SQL_COUNT_PASSWORDPOLICYREL_WHERE);
1157
1158                query.append(_FINDER_COLUMN_P_C_C_PASSWORDPOLICYID_2);
1159
1160                query.append(_FINDER_COLUMN_P_C_C_CLASSNAMEID_2);
1161
1162                query.append(_FINDER_COLUMN_P_C_C_CLASSPK_2);
1163
1164                String sql = query.toString();
1165
1166                Query q = session.createQuery(sql);
1167
1168                QueryPos qPos = QueryPos.getInstance(q);
1169
1170                qPos.add(passwordPolicyId);
1171
1172                qPos.add(classNameId);
1173
1174                qPos.add(classPK);
1175
1176                count = (Long)q.uniqueResult();
1177            }
1178            catch (Exception e) {
1179                throw processException(e);
1180            }
1181            finally {
1182                if (count == null) {
1183                    count = Long.valueOf(0);
1184                }
1185
1186                FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_P_C_C,
1187                    finderArgs, count);
1188
1189                closeSession(session);
1190            }
1191        }
1192
1193        return count.intValue();
1194    }
1195
1196    public int countAll() throws SystemException {
1197        Object[] finderArgs = new Object[0];
1198
1199        Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_ALL,
1200                finderArgs, this);
1201
1202        if (count == null) {
1203            Session session = null;
1204
1205            try {
1206                session = openSession();
1207
1208                Query q = session.createQuery(_SQL_COUNT_PASSWORDPOLICYREL);
1209
1210                count = (Long)q.uniqueResult();
1211            }
1212            catch (Exception e) {
1213                throw processException(e);
1214            }
1215            finally {
1216                if (count == null) {
1217                    count = Long.valueOf(0);
1218                }
1219
1220                FinderCacheUtil.putResult(FINDER_PATH_COUNT_ALL, finderArgs,
1221                    count);
1222
1223                closeSession(session);
1224            }
1225        }
1226
1227        return count.intValue();
1228    }
1229
1230    public void afterPropertiesSet() {
1231        String[] listenerClassNames = StringUtil.split(GetterUtil.getString(
1232                    com.liferay.portal.util.PropsUtil.get(
1233                        "value.object.listener.com.liferay.portal.model.PasswordPolicyRel")));
1234
1235        if (listenerClassNames.length > 0) {
1236            try {
1237                List<ModelListener<PasswordPolicyRel>> listenersList = new ArrayList<ModelListener<PasswordPolicyRel>>();
1238
1239                for (String listenerClassName : listenerClassNames) {
1240                    listenersList.add((ModelListener<PasswordPolicyRel>)Class.forName(
1241                            listenerClassName).newInstance());
1242                }
1243
1244                listeners = listenersList.toArray(new ModelListener[listenersList.size()]);
1245            }
1246            catch (Exception e) {
1247                _log.error(e);
1248            }
1249        }
1250    }
1251
1252    @BeanReference(name = "com.liferay.portal.service.persistence.AccountPersistence")
1253    protected com.liferay.portal.service.persistence.AccountPersistence accountPersistence;
1254    @BeanReference(name = "com.liferay.portal.service.persistence.AddressPersistence")
1255    protected com.liferay.portal.service.persistence.AddressPersistence addressPersistence;
1256    @BeanReference(name = "com.liferay.portal.service.persistence.BrowserTrackerPersistence")
1257    protected com.liferay.portal.service.persistence.BrowserTrackerPersistence browserTrackerPersistence;
1258    @BeanReference(name = "com.liferay.portal.service.persistence.ClassNamePersistence")
1259    protected com.liferay.portal.service.persistence.ClassNamePersistence classNamePersistence;
1260    @BeanReference(name = "com.liferay.portal.service.persistence.CompanyPersistence")
1261    protected com.liferay.portal.service.persistence.CompanyPersistence companyPersistence;
1262    @BeanReference(name = "com.liferay.portal.service.persistence.ContactPersistence")
1263    protected com.liferay.portal.service.persistence.ContactPersistence contactPersistence;
1264    @BeanReference(name = "com.liferay.portal.service.persistence.CountryPersistence")
1265    protected com.liferay.portal.service.persistence.CountryPersistence countryPersistence;
1266    @BeanReference(name = "com.liferay.portal.service.persistence.EmailAddressPersistence")
1267    protected com.liferay.portal.service.persistence.EmailAddressPersistence emailAddressPersistence;
1268    @BeanReference(name = "com.liferay.portal.service.persistence.GroupPersistence")
1269    protected com.liferay.portal.service.persistence.GroupPersistence groupPersistence;
1270    @BeanReference(name = "com.liferay.portal.service.persistence.ImagePersistence")
1271    protected com.liferay.portal.service.persistence.ImagePersistence imagePersistence;
1272    @BeanReference(name = "com.liferay.portal.service.persistence.LayoutPersistence")
1273    protected com.liferay.portal.service.persistence.LayoutPersistence layoutPersistence;
1274    @BeanReference(name = "com.liferay.portal.service.persistence.LayoutSetPersistence")
1275    protected com.liferay.portal.service.persistence.LayoutSetPersistence layoutSetPersistence;
1276    @BeanReference(name = "com.liferay.portal.service.persistence.ListTypePersistence")
1277    protected com.liferay.portal.service.persistence.ListTypePersistence listTypePersistence;
1278    @BeanReference(name = "com.liferay.portal.service.persistence.LockPersistence")
1279    protected com.liferay.portal.service.persistence.LockPersistence lockPersistence;
1280    @BeanReference(name = "com.liferay.portal.service.persistence.MembershipRequestPersistence")
1281    protected com.liferay.portal.service.persistence.MembershipRequestPersistence membershipRequestPersistence;
1282    @BeanReference(name = "com.liferay.portal.service.persistence.OrganizationPersistence")
1283    protected com.liferay.portal.service.persistence.OrganizationPersistence organizationPersistence;
1284    @BeanReference(name = "com.liferay.portal.service.persistence.OrgGroupPermissionPersistence")
1285    protected com.liferay.portal.service.persistence.OrgGroupPermissionPersistence orgGroupPermissionPersistence;
1286    @BeanReference(name = "com.liferay.portal.service.persistence.OrgGroupRolePersistence")
1287    protected com.liferay.portal.service.persistence.OrgGroupRolePersistence orgGroupRolePersistence;
1288    @BeanReference(name = "com.liferay.portal.service.persistence.OrgLaborPersistence")
1289    protected com.liferay.portal.service.persistence.OrgLaborPersistence orgLaborPersistence;
1290    @BeanReference(name = "com.liferay.portal.service.persistence.PasswordPolicyPersistence")
1291    protected com.liferay.portal.service.persistence.PasswordPolicyPersistence passwordPolicyPersistence;
1292    @BeanReference(name = "com.liferay.portal.service.persistence.PasswordPolicyRelPersistence")
1293    protected com.liferay.portal.service.persistence.PasswordPolicyRelPersistence passwordPolicyRelPersistence;
1294    @BeanReference(name = "com.liferay.portal.service.persistence.PasswordTrackerPersistence")
1295    protected com.liferay.portal.service.persistence.PasswordTrackerPersistence passwordTrackerPersistence;
1296    @BeanReference(name = "com.liferay.portal.service.persistence.PermissionPersistence")
1297    protected com.liferay.portal.service.persistence.PermissionPersistence permissionPersistence;
1298    @BeanReference(name = "com.liferay.portal.service.persistence.PhonePersistence")
1299    protected com.liferay.portal.service.persistence.PhonePersistence phonePersistence;
1300    @BeanReference(name = "com.liferay.portal.service.persistence.PluginSettingPersistence")
1301    protected com.liferay.portal.service.persistence.PluginSettingPersistence pluginSettingPersistence;
1302    @BeanReference(name = "com.liferay.portal.service.persistence.PortletPersistence")
1303    protected com.liferay.portal.service.persistence.PortletPersistence portletPersistence;
1304    @BeanReference(name = "com.liferay.portal.service.persistence.PortletItemPersistence")
1305    protected com.liferay.portal.service.persistence.PortletItemPersistence portletItemPersistence;
1306    @BeanReference(name = "com.liferay.portal.service.persistence.PortletPreferencesPersistence")
1307    protected com.liferay.portal.service.persistence.PortletPreferencesPersistence portletPreferencesPersistence;
1308    @BeanReference(name = "com.liferay.portal.service.persistence.RegionPersistence")
1309    protected com.liferay.portal.service.persistence.RegionPersistence regionPersistence;
1310    @BeanReference(name = "com.liferay.portal.service.persistence.ReleasePersistence")
1311    protected com.liferay.portal.service.persistence.ReleasePersistence releasePersistence;
1312    @BeanReference(name = "com.liferay.portal.service.persistence.ResourcePersistence")
1313    protected com.liferay.portal.service.persistence.ResourcePersistence resourcePersistence;
1314    @BeanReference(name = "com.liferay.portal.service.persistence.ResourceActionPersistence")
1315    protected com.liferay.portal.service.persistence.ResourceActionPersistence resourceActionPersistence;
1316    @BeanReference(name = "com.liferay.portal.service.persistence.ResourceCodePersistence")
1317    protected com.liferay.portal.service.persistence.ResourceCodePersistence resourceCodePersistence;
1318    @BeanReference(name = "com.liferay.portal.service.persistence.ResourcePermissionPersistence")
1319    protected com.liferay.portal.service.persistence.ResourcePermissionPersistence resourcePermissionPersistence;
1320    @BeanReference(name = "com.liferay.portal.service.persistence.RolePersistence")
1321    protected com.liferay.portal.service.persistence.RolePersistence rolePersistence;
1322    @BeanReference(name = "com.liferay.portal.service.persistence.ServiceComponentPersistence")
1323    protected com.liferay.portal.service.persistence.ServiceComponentPersistence serviceComponentPersistence;
1324    @BeanReference(name = "com.liferay.portal.service.persistence.ShardPersistence")
1325    protected com.liferay.portal.service.persistence.ShardPersistence shardPersistence;
1326    @BeanReference(name = "com.liferay.portal.service.persistence.SubscriptionPersistence")
1327    protected com.liferay.portal.service.persistence.SubscriptionPersistence subscriptionPersistence;
1328    @BeanReference(name = "com.liferay.portal.service.persistence.UserPersistence")
1329    protected com.liferay.portal.service.persistence.UserPersistence userPersistence;
1330    @BeanReference(name = "com.liferay.portal.service.persistence.UserGroupPersistence")
1331    protected com.liferay.portal.service.persistence.UserGroupPersistence userGroupPersistence;
1332    @BeanReference(name = "com.liferay.portal.service.persistence.UserGroupRolePersistence")
1333    protected com.liferay.portal.service.persistence.UserGroupRolePersistence userGroupRolePersistence;
1334    @BeanReference(name = "com.liferay.portal.service.persistence.UserIdMapperPersistence")
1335    protected com.liferay.portal.service.persistence.UserIdMapperPersistence userIdMapperPersistence;
1336    @BeanReference(name = "com.liferay.portal.service.persistence.UserTrackerPersistence")
1337    protected com.liferay.portal.service.persistence.UserTrackerPersistence userTrackerPersistence;
1338    @BeanReference(name = "com.liferay.portal.service.persistence.UserTrackerPathPersistence")
1339    protected com.liferay.portal.service.persistence.UserTrackerPathPersistence userTrackerPathPersistence;
1340    @BeanReference(name = "com.liferay.portal.service.persistence.WebDAVPropsPersistence")
1341    protected com.liferay.portal.service.persistence.WebDAVPropsPersistence webDAVPropsPersistence;
1342    @BeanReference(name = "com.liferay.portal.service.persistence.WebsitePersistence")
1343    protected com.liferay.portal.service.persistence.WebsitePersistence websitePersistence;
1344    private static final String _SQL_SELECT_PASSWORDPOLICYREL = "SELECT passwordPolicyRel FROM PasswordPolicyRel passwordPolicyRel";
1345    private static final String _SQL_SELECT_PASSWORDPOLICYREL_WHERE = "SELECT passwordPolicyRel FROM PasswordPolicyRel passwordPolicyRel WHERE ";
1346    private static final String _SQL_COUNT_PASSWORDPOLICYREL = "SELECT COUNT(passwordPolicyRel) FROM PasswordPolicyRel passwordPolicyRel";
1347    private static final String _SQL_COUNT_PASSWORDPOLICYREL_WHERE = "SELECT COUNT(passwordPolicyRel) FROM PasswordPolicyRel passwordPolicyRel WHERE ";
1348    private static final String _FINDER_COLUMN_PASSWORDPOLICYID_PASSWORDPOLICYID_2 =
1349        "passwordPolicyRel.passwordPolicyId = ?";
1350    private static final String _FINDER_COLUMN_C_C_CLASSNAMEID_2 = "passwordPolicyRel.classNameId = ? AND ";
1351    private static final String _FINDER_COLUMN_C_C_CLASSPK_2 = "passwordPolicyRel.classPK = ?";
1352    private static final String _FINDER_COLUMN_P_C_C_PASSWORDPOLICYID_2 = "passwordPolicyRel.passwordPolicyId = ? AND ";
1353    private static final String _FINDER_COLUMN_P_C_C_CLASSNAMEID_2 = "passwordPolicyRel.classNameId = ? AND ";
1354    private static final String _FINDER_COLUMN_P_C_C_CLASSPK_2 = "passwordPolicyRel.classPK = ?";
1355    private static final String _ORDER_BY_ENTITY_ALIAS = "passwordPolicyRel.";
1356    private static final String _NO_SUCH_ENTITY_WITH_PRIMARY_KEY = "No PasswordPolicyRel exists with the primary key ";
1357    private static final String _NO_SUCH_ENTITY_WITH_KEY = "No PasswordPolicyRel exists with the key {";
1358    private static Log _log = LogFactoryUtil.getLog(PasswordPolicyRelPersistenceImpl.class);
1359}