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