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