1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portal.service.persistence;
16  
17  import com.liferay.portal.NoSuchModelException;
18  import com.liferay.portal.NoSuchReleaseException;
19  import com.liferay.portal.kernel.annotation.BeanReference;
20  import com.liferay.portal.kernel.cache.CacheRegistry;
21  import com.liferay.portal.kernel.dao.orm.EntityCacheUtil;
22  import com.liferay.portal.kernel.dao.orm.FinderCacheUtil;
23  import com.liferay.portal.kernel.dao.orm.FinderPath;
24  import com.liferay.portal.kernel.dao.orm.Query;
25  import com.liferay.portal.kernel.dao.orm.QueryPos;
26  import com.liferay.portal.kernel.dao.orm.QueryUtil;
27  import com.liferay.portal.kernel.dao.orm.Session;
28  import com.liferay.portal.kernel.exception.SystemException;
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.kernel.util.Validator;
38  import com.liferay.portal.model.ModelListener;
39  import com.liferay.portal.model.Release;
40  import com.liferay.portal.model.impl.ReleaseImpl;
41  import com.liferay.portal.model.impl.ReleaseModelImpl;
42  import com.liferay.portal.service.persistence.impl.BasePersistenceImpl;
43  
44  import java.io.Serializable;
45  
46  import java.util.ArrayList;
47  import java.util.Collections;
48  import java.util.List;
49  
50  /**
51   * <a href="ReleasePersistenceImpl.java.html"><b><i>View Source</i></b></a>
52   *
53   * <p>
54   * ServiceBuilder generated this class. Modifications in this class will be
55   * overwritten the next time is generated.
56   * </p>
57   *
58   * @author    Brian Wing Shun Chan
59   * @see       ReleasePersistence
60   * @see       ReleaseUtil
61   * @generated
62   */
63  public class ReleasePersistenceImpl extends BasePersistenceImpl<Release>
64      implements ReleasePersistence {
65      public static final String FINDER_CLASS_NAME_ENTITY = ReleaseImpl.class.getName();
66      public static final String FINDER_CLASS_NAME_LIST = FINDER_CLASS_NAME_ENTITY +
67          ".List";
68      public static final FinderPath FINDER_PATH_FETCH_BY_SERVLETCONTEXTNAME = new FinderPath(ReleaseModelImpl.ENTITY_CACHE_ENABLED,
69              ReleaseModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_ENTITY,
70              "fetchByServletContextName", new String[] { String.class.getName() });
71      public static final FinderPath FINDER_PATH_COUNT_BY_SERVLETCONTEXTNAME = new FinderPath(ReleaseModelImpl.ENTITY_CACHE_ENABLED,
72              ReleaseModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
73              "countByServletContextName", new String[] { String.class.getName() });
74      public static final FinderPath FINDER_PATH_FIND_ALL = new FinderPath(ReleaseModelImpl.ENTITY_CACHE_ENABLED,
75              ReleaseModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
76              "findAll", new String[0]);
77      public static final FinderPath FINDER_PATH_COUNT_ALL = new FinderPath(ReleaseModelImpl.ENTITY_CACHE_ENABLED,
78              ReleaseModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
79              "countAll", new String[0]);
80  
81      public void cacheResult(Release release) {
82          EntityCacheUtil.putResult(ReleaseModelImpl.ENTITY_CACHE_ENABLED,
83              ReleaseImpl.class, release.getPrimaryKey(), release);
84  
85          FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_SERVLETCONTEXTNAME,
86              new Object[] { release.getServletContextName() }, release);
87      }
88  
89      public void cacheResult(List<Release> releases) {
90          for (Release release : releases) {
91              if (EntityCacheUtil.getResult(
92                          ReleaseModelImpl.ENTITY_CACHE_ENABLED,
93                          ReleaseImpl.class, release.getPrimaryKey(), this) == null) {
94                  cacheResult(release);
95              }
96          }
97      }
98  
99      public void clearCache() {
100         CacheRegistry.clear(ReleaseImpl.class.getName());
101         EntityCacheUtil.clearCache(ReleaseImpl.class.getName());
102         FinderCacheUtil.clearCache(FINDER_CLASS_NAME_ENTITY);
103         FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST);
104     }
105 
106     public void clearCache(Release release) {
107         EntityCacheUtil.removeResult(ReleaseModelImpl.ENTITY_CACHE_ENABLED,
108             ReleaseImpl.class, release.getPrimaryKey());
109 
110         FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_SERVLETCONTEXTNAME,
111             new Object[] { release.getServletContextName() });
112     }
113 
114     public Release create(long releaseId) {
115         Release release = new ReleaseImpl();
116 
117         release.setNew(true);
118         release.setPrimaryKey(releaseId);
119 
120         return release;
121     }
122 
123     public Release remove(Serializable primaryKey)
124         throws NoSuchModelException, SystemException {
125         return remove(((Long)primaryKey).longValue());
126     }
127 
128     public Release remove(long releaseId)
129         throws NoSuchReleaseException, SystemException {
130         Session session = null;
131 
132         try {
133             session = openSession();
134 
135             Release release = (Release)session.get(ReleaseImpl.class,
136                     new Long(releaseId));
137 
138             if (release == null) {
139                 if (_log.isWarnEnabled()) {
140                     _log.warn(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + releaseId);
141                 }
142 
143                 throw new NoSuchReleaseException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY +
144                     releaseId);
145             }
146 
147             return remove(release);
148         }
149         catch (NoSuchReleaseException nsee) {
150             throw nsee;
151         }
152         catch (Exception e) {
153             throw processException(e);
154         }
155         finally {
156             closeSession(session);
157         }
158     }
159 
160     public Release remove(Release release) throws SystemException {
161         for (ModelListener<Release> listener : listeners) {
162             listener.onBeforeRemove(release);
163         }
164 
165         release = removeImpl(release);
166 
167         for (ModelListener<Release> listener : listeners) {
168             listener.onAfterRemove(release);
169         }
170 
171         return release;
172     }
173 
174     protected Release removeImpl(Release release) throws SystemException {
175         release = toUnwrappedModel(release);
176 
177         Session session = null;
178 
179         try {
180             session = openSession();
181 
182             if (release.isCachedModel() || BatchSessionUtil.isEnabled()) {
183                 Object staleObject = session.get(ReleaseImpl.class,
184                         release.getPrimaryKeyObj());
185 
186                 if (staleObject != null) {
187                     session.evict(staleObject);
188                 }
189             }
190 
191             session.delete(release);
192 
193             session.flush();
194         }
195         catch (Exception e) {
196             throw processException(e);
197         }
198         finally {
199             closeSession(session);
200         }
201 
202         FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST);
203 
204         ReleaseModelImpl releaseModelImpl = (ReleaseModelImpl)release;
205 
206         FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_SERVLETCONTEXTNAME,
207             new Object[] { releaseModelImpl.getOriginalServletContextName() });
208 
209         EntityCacheUtil.removeResult(ReleaseModelImpl.ENTITY_CACHE_ENABLED,
210             ReleaseImpl.class, release.getPrimaryKey());
211 
212         return release;
213     }
214 
215     public Release updateImpl(com.liferay.portal.model.Release release,
216         boolean merge) throws SystemException {
217         release = toUnwrappedModel(release);
218 
219         boolean isNew = release.isNew();
220 
221         ReleaseModelImpl releaseModelImpl = (ReleaseModelImpl)release;
222 
223         Session session = null;
224 
225         try {
226             session = openSession();
227 
228             BatchSessionUtil.update(session, release, merge);
229 
230             release.setNew(false);
231         }
232         catch (Exception e) {
233             throw processException(e);
234         }
235         finally {
236             closeSession(session);
237         }
238 
239         FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST);
240 
241         EntityCacheUtil.putResult(ReleaseModelImpl.ENTITY_CACHE_ENABLED,
242             ReleaseImpl.class, release.getPrimaryKey(), release);
243 
244         if (!isNew &&
245                 (!Validator.equals(release.getServletContextName(),
246                     releaseModelImpl.getOriginalServletContextName()))) {
247             FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_SERVLETCONTEXTNAME,
248                 new Object[] { releaseModelImpl.getOriginalServletContextName() });
249         }
250 
251         if (isNew ||
252                 (!Validator.equals(release.getServletContextName(),
253                     releaseModelImpl.getOriginalServletContextName()))) {
254             FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_SERVLETCONTEXTNAME,
255                 new Object[] { release.getServletContextName() }, release);
256         }
257 
258         return release;
259     }
260 
261     protected Release toUnwrappedModel(Release release) {
262         if (release instanceof ReleaseImpl) {
263             return release;
264         }
265 
266         ReleaseImpl releaseImpl = new ReleaseImpl();
267 
268         releaseImpl.setNew(release.isNew());
269         releaseImpl.setPrimaryKey(release.getPrimaryKey());
270 
271         releaseImpl.setReleaseId(release.getReleaseId());
272         releaseImpl.setCreateDate(release.getCreateDate());
273         releaseImpl.setModifiedDate(release.getModifiedDate());
274         releaseImpl.setServletContextName(release.getServletContextName());
275         releaseImpl.setBuildNumber(release.getBuildNumber());
276         releaseImpl.setBuildDate(release.getBuildDate());
277         releaseImpl.setVerified(release.isVerified());
278         releaseImpl.setTestString(release.getTestString());
279 
280         return releaseImpl;
281     }
282 
283     public Release findByPrimaryKey(Serializable primaryKey)
284         throws NoSuchModelException, SystemException {
285         return findByPrimaryKey(((Long)primaryKey).longValue());
286     }
287 
288     public Release findByPrimaryKey(long releaseId)
289         throws NoSuchReleaseException, SystemException {
290         Release release = fetchByPrimaryKey(releaseId);
291 
292         if (release == null) {
293             if (_log.isWarnEnabled()) {
294                 _log.warn(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + releaseId);
295             }
296 
297             throw new NoSuchReleaseException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY +
298                 releaseId);
299         }
300 
301         return release;
302     }
303 
304     public Release fetchByPrimaryKey(Serializable primaryKey)
305         throws SystemException {
306         return fetchByPrimaryKey(((Long)primaryKey).longValue());
307     }
308 
309     public Release fetchByPrimaryKey(long releaseId) throws SystemException {
310         Release release = (Release)EntityCacheUtil.getResult(ReleaseModelImpl.ENTITY_CACHE_ENABLED,
311                 ReleaseImpl.class, releaseId, this);
312 
313         if (release == null) {
314             Session session = null;
315 
316             try {
317                 session = openSession();
318 
319                 release = (Release)session.get(ReleaseImpl.class,
320                         new Long(releaseId));
321             }
322             catch (Exception e) {
323                 throw processException(e);
324             }
325             finally {
326                 if (release != null) {
327                     cacheResult(release);
328                 }
329 
330                 closeSession(session);
331             }
332         }
333 
334         return release;
335     }
336 
337     public Release findByServletContextName(String servletContextName)
338         throws NoSuchReleaseException, SystemException {
339         Release release = fetchByServletContextName(servletContextName);
340 
341         if (release == null) {
342             StringBundler msg = new StringBundler(4);
343 
344             msg.append(_NO_SUCH_ENTITY_WITH_KEY);
345 
346             msg.append("servletContextName=");
347             msg.append(servletContextName);
348 
349             msg.append(StringPool.CLOSE_CURLY_BRACE);
350 
351             if (_log.isWarnEnabled()) {
352                 _log.warn(msg.toString());
353             }
354 
355             throw new NoSuchReleaseException(msg.toString());
356         }
357 
358         return release;
359     }
360 
361     public Release fetchByServletContextName(String servletContextName)
362         throws SystemException {
363         return fetchByServletContextName(servletContextName, true);
364     }
365 
366     public Release fetchByServletContextName(String servletContextName,
367         boolean retrieveFromCache) throws SystemException {
368         Object[] finderArgs = new Object[] { servletContextName };
369 
370         Object result = null;
371 
372         if (retrieveFromCache) {
373             result = FinderCacheUtil.getResult(FINDER_PATH_FETCH_BY_SERVLETCONTEXTNAME,
374                     finderArgs, this);
375         }
376 
377         if (result == null) {
378             Session session = null;
379 
380             try {
381                 session = openSession();
382 
383                 StringBundler query = new StringBundler(2);
384 
385                 query.append(_SQL_SELECT_RELEASE_WHERE);
386 
387                 if (servletContextName == null) {
388                     query.append(_FINDER_COLUMN_SERVLETCONTEXTNAME_SERVLETCONTEXTNAME_1);
389                 }
390                 else {
391                     if (servletContextName.equals(StringPool.BLANK)) {
392                         query.append(_FINDER_COLUMN_SERVLETCONTEXTNAME_SERVLETCONTEXTNAME_3);
393                     }
394                     else {
395                         query.append(_FINDER_COLUMN_SERVLETCONTEXTNAME_SERVLETCONTEXTNAME_2);
396                     }
397                 }
398 
399                 String sql = query.toString();
400 
401                 Query q = session.createQuery(sql);
402 
403                 QueryPos qPos = QueryPos.getInstance(q);
404 
405                 if (servletContextName != null) {
406                     qPos.add(servletContextName);
407                 }
408 
409                 List<Release> list = q.list();
410 
411                 result = list;
412 
413                 Release release = null;
414 
415                 if (list.isEmpty()) {
416                     FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_SERVLETCONTEXTNAME,
417                         finderArgs, list);
418                 }
419                 else {
420                     release = list.get(0);
421 
422                     cacheResult(release);
423 
424                     if ((release.getServletContextName() == null) ||
425                             !release.getServletContextName()
426                                         .equals(servletContextName)) {
427                         FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_SERVLETCONTEXTNAME,
428                             finderArgs, release);
429                     }
430                 }
431 
432                 return release;
433             }
434             catch (Exception e) {
435                 throw processException(e);
436             }
437             finally {
438                 if (result == null) {
439                     FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_SERVLETCONTEXTNAME,
440                         finderArgs, new ArrayList<Release>());
441                 }
442 
443                 closeSession(session);
444             }
445         }
446         else {
447             if (result instanceof List<?>) {
448                 return null;
449             }
450             else {
451                 return (Release)result;
452             }
453         }
454     }
455 
456     public List<Release> findAll() throws SystemException {
457         return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
458     }
459 
460     public List<Release> findAll(int start, int end) throws SystemException {
461         return findAll(start, end, null);
462     }
463 
464     public List<Release> findAll(int start, int end,
465         OrderByComparator orderByComparator) throws SystemException {
466         Object[] finderArgs = new Object[] {
467                 String.valueOf(start), String.valueOf(end),
468                 String.valueOf(orderByComparator)
469             };
470 
471         List<Release> list = (List<Release>)FinderCacheUtil.getResult(FINDER_PATH_FIND_ALL,
472                 finderArgs, this);
473 
474         if (list == null) {
475             Session session = null;
476 
477             try {
478                 session = openSession();
479 
480                 StringBundler query = null;
481                 String sql = null;
482 
483                 if (orderByComparator != null) {
484                     query = new StringBundler(2 +
485                             (orderByComparator.getOrderByFields().length * 3));
486 
487                     query.append(_SQL_SELECT_RELEASE);
488 
489                     appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS,
490                         orderByComparator);
491 
492                     sql = query.toString();
493                 }
494 
495                 sql = _SQL_SELECT_RELEASE;
496 
497                 Query q = session.createQuery(sql);
498 
499                 if (orderByComparator == null) {
500                     list = (List<Release>)QueryUtil.list(q, getDialect(),
501                             start, end, false);
502 
503                     Collections.sort(list);
504                 }
505                 else {
506                     list = (List<Release>)QueryUtil.list(q, getDialect(),
507                             start, end);
508                 }
509             }
510             catch (Exception e) {
511                 throw processException(e);
512             }
513             finally {
514                 if (list == null) {
515                     list = new ArrayList<Release>();
516                 }
517 
518                 cacheResult(list);
519 
520                 FinderCacheUtil.putResult(FINDER_PATH_FIND_ALL, finderArgs, list);
521 
522                 closeSession(session);
523             }
524         }
525 
526         return list;
527     }
528 
529     public void removeByServletContextName(String servletContextName)
530         throws NoSuchReleaseException, SystemException {
531         Release release = findByServletContextName(servletContextName);
532 
533         remove(release);
534     }
535 
536     public void removeAll() throws SystemException {
537         for (Release release : findAll()) {
538             remove(release);
539         }
540     }
541 
542     public int countByServletContextName(String servletContextName)
543         throws SystemException {
544         Object[] finderArgs = new Object[] { servletContextName };
545 
546         Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_BY_SERVLETCONTEXTNAME,
547                 finderArgs, this);
548 
549         if (count == null) {
550             Session session = null;
551 
552             try {
553                 session = openSession();
554 
555                 StringBundler query = new StringBundler(2);
556 
557                 query.append(_SQL_COUNT_RELEASE_WHERE);
558 
559                 if (servletContextName == null) {
560                     query.append(_FINDER_COLUMN_SERVLETCONTEXTNAME_SERVLETCONTEXTNAME_1);
561                 }
562                 else {
563                     if (servletContextName.equals(StringPool.BLANK)) {
564                         query.append(_FINDER_COLUMN_SERVLETCONTEXTNAME_SERVLETCONTEXTNAME_3);
565                     }
566                     else {
567                         query.append(_FINDER_COLUMN_SERVLETCONTEXTNAME_SERVLETCONTEXTNAME_2);
568                     }
569                 }
570 
571                 String sql = query.toString();
572 
573                 Query q = session.createQuery(sql);
574 
575                 QueryPos qPos = QueryPos.getInstance(q);
576 
577                 if (servletContextName != null) {
578                     qPos.add(servletContextName);
579                 }
580 
581                 count = (Long)q.uniqueResult();
582             }
583             catch (Exception e) {
584                 throw processException(e);
585             }
586             finally {
587                 if (count == null) {
588                     count = Long.valueOf(0);
589                 }
590 
591                 FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_SERVLETCONTEXTNAME,
592                     finderArgs, count);
593 
594                 closeSession(session);
595             }
596         }
597 
598         return count.intValue();
599     }
600 
601     public int countAll() throws SystemException {
602         Object[] finderArgs = new Object[0];
603 
604         Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_ALL,
605                 finderArgs, this);
606 
607         if (count == null) {
608             Session session = null;
609 
610             try {
611                 session = openSession();
612 
613                 Query q = session.createQuery(_SQL_COUNT_RELEASE);
614 
615                 count = (Long)q.uniqueResult();
616             }
617             catch (Exception e) {
618                 throw processException(e);
619             }
620             finally {
621                 if (count == null) {
622                     count = Long.valueOf(0);
623                 }
624 
625                 FinderCacheUtil.putResult(FINDER_PATH_COUNT_ALL, finderArgs,
626                     count);
627 
628                 closeSession(session);
629             }
630         }
631 
632         return count.intValue();
633     }
634 
635     public void afterPropertiesSet() {
636         String[] listenerClassNames = StringUtil.split(GetterUtil.getString(
637                     com.liferay.portal.util.PropsUtil.get(
638                         "value.object.listener.com.liferay.portal.model.Release")));
639 
640         if (listenerClassNames.length > 0) {
641             try {
642                 List<ModelListener<Release>> listenersList = new ArrayList<ModelListener<Release>>();
643 
644                 for (String listenerClassName : listenerClassNames) {
645                     listenersList.add((ModelListener<Release>)InstanceFactory.newInstance(
646                             listenerClassName));
647                 }
648 
649                 listeners = listenersList.toArray(new ModelListener[listenersList.size()]);
650             }
651             catch (Exception e) {
652                 _log.error(e);
653             }
654         }
655     }
656 
657     @BeanReference(type = AccountPersistence.class)
658     protected AccountPersistence accountPersistence;
659     @BeanReference(type = AddressPersistence.class)
660     protected AddressPersistence addressPersistence;
661     @BeanReference(type = BrowserTrackerPersistence.class)
662     protected BrowserTrackerPersistence browserTrackerPersistence;
663     @BeanReference(type = ClassNamePersistence.class)
664     protected ClassNamePersistence classNamePersistence;
665     @BeanReference(type = CompanyPersistence.class)
666     protected CompanyPersistence companyPersistence;
667     @BeanReference(type = ContactPersistence.class)
668     protected ContactPersistence contactPersistence;
669     @BeanReference(type = CountryPersistence.class)
670     protected CountryPersistence countryPersistence;
671     @BeanReference(type = EmailAddressPersistence.class)
672     protected EmailAddressPersistence emailAddressPersistence;
673     @BeanReference(type = GroupPersistence.class)
674     protected GroupPersistence groupPersistence;
675     @BeanReference(type = ImagePersistence.class)
676     protected ImagePersistence imagePersistence;
677     @BeanReference(type = LayoutPersistence.class)
678     protected LayoutPersistence layoutPersistence;
679     @BeanReference(type = LayoutPrototypePersistence.class)
680     protected LayoutPrototypePersistence layoutPrototypePersistence;
681     @BeanReference(type = LayoutSetPersistence.class)
682     protected LayoutSetPersistence layoutSetPersistence;
683     @BeanReference(type = LayoutSetPrototypePersistence.class)
684     protected LayoutSetPrototypePersistence layoutSetPrototypePersistence;
685     @BeanReference(type = ListTypePersistence.class)
686     protected ListTypePersistence listTypePersistence;
687     @BeanReference(type = LockPersistence.class)
688     protected LockPersistence lockPersistence;
689     @BeanReference(type = MembershipRequestPersistence.class)
690     protected MembershipRequestPersistence membershipRequestPersistence;
691     @BeanReference(type = OrganizationPersistence.class)
692     protected OrganizationPersistence organizationPersistence;
693     @BeanReference(type = OrgGroupPermissionPersistence.class)
694     protected OrgGroupPermissionPersistence orgGroupPermissionPersistence;
695     @BeanReference(type = OrgGroupRolePersistence.class)
696     protected OrgGroupRolePersistence orgGroupRolePersistence;
697     @BeanReference(type = OrgLaborPersistence.class)
698     protected OrgLaborPersistence orgLaborPersistence;
699     @BeanReference(type = PasswordPolicyPersistence.class)
700     protected PasswordPolicyPersistence passwordPolicyPersistence;
701     @BeanReference(type = PasswordPolicyRelPersistence.class)
702     protected PasswordPolicyRelPersistence passwordPolicyRelPersistence;
703     @BeanReference(type = PasswordTrackerPersistence.class)
704     protected PasswordTrackerPersistence passwordTrackerPersistence;
705     @BeanReference(type = PermissionPersistence.class)
706     protected PermissionPersistence permissionPersistence;
707     @BeanReference(type = PhonePersistence.class)
708     protected PhonePersistence phonePersistence;
709     @BeanReference(type = PluginSettingPersistence.class)
710     protected PluginSettingPersistence pluginSettingPersistence;
711     @BeanReference(type = PortletPersistence.class)
712     protected PortletPersistence portletPersistence;
713     @BeanReference(type = PortletItemPersistence.class)
714     protected PortletItemPersistence portletItemPersistence;
715     @BeanReference(type = PortletPreferencesPersistence.class)
716     protected PortletPreferencesPersistence portletPreferencesPersistence;
717     @BeanReference(type = RegionPersistence.class)
718     protected RegionPersistence regionPersistence;
719     @BeanReference(type = ReleasePersistence.class)
720     protected ReleasePersistence releasePersistence;
721     @BeanReference(type = ResourcePersistence.class)
722     protected ResourcePersistence resourcePersistence;
723     @BeanReference(type = ResourceActionPersistence.class)
724     protected ResourceActionPersistence resourceActionPersistence;
725     @BeanReference(type = ResourceCodePersistence.class)
726     protected ResourceCodePersistence resourceCodePersistence;
727     @BeanReference(type = ResourcePermissionPersistence.class)
728     protected ResourcePermissionPersistence resourcePermissionPersistence;
729     @BeanReference(type = RolePersistence.class)
730     protected RolePersistence rolePersistence;
731     @BeanReference(type = ServiceComponentPersistence.class)
732     protected ServiceComponentPersistence serviceComponentPersistence;
733     @BeanReference(type = ShardPersistence.class)
734     protected ShardPersistence shardPersistence;
735     @BeanReference(type = SubscriptionPersistence.class)
736     protected SubscriptionPersistence subscriptionPersistence;
737     @BeanReference(type = TicketPersistence.class)
738     protected TicketPersistence ticketPersistence;
739     @BeanReference(type = TeamPersistence.class)
740     protected TeamPersistence teamPersistence;
741     @BeanReference(type = UserPersistence.class)
742     protected UserPersistence userPersistence;
743     @BeanReference(type = UserGroupPersistence.class)
744     protected UserGroupPersistence userGroupPersistence;
745     @BeanReference(type = UserGroupGroupRolePersistence.class)
746     protected UserGroupGroupRolePersistence userGroupGroupRolePersistence;
747     @BeanReference(type = UserGroupRolePersistence.class)
748     protected UserGroupRolePersistence userGroupRolePersistence;
749     @BeanReference(type = UserIdMapperPersistence.class)
750     protected UserIdMapperPersistence userIdMapperPersistence;
751     @BeanReference(type = UserTrackerPersistence.class)
752     protected UserTrackerPersistence userTrackerPersistence;
753     @BeanReference(type = UserTrackerPathPersistence.class)
754     protected UserTrackerPathPersistence userTrackerPathPersistence;
755     @BeanReference(type = WebDAVPropsPersistence.class)
756     protected WebDAVPropsPersistence webDAVPropsPersistence;
757     @BeanReference(type = WebsitePersistence.class)
758     protected WebsitePersistence websitePersistence;
759     @BeanReference(type = WorkflowDefinitionLinkPersistence.class)
760     protected WorkflowDefinitionLinkPersistence workflowDefinitionLinkPersistence;
761     @BeanReference(type = WorkflowInstanceLinkPersistence.class)
762     protected WorkflowInstanceLinkPersistence workflowInstanceLinkPersistence;
763     private static final String _SQL_SELECT_RELEASE = "SELECT release FROM Release release";
764     private static final String _SQL_SELECT_RELEASE_WHERE = "SELECT release FROM Release release WHERE ";
765     private static final String _SQL_COUNT_RELEASE = "SELECT COUNT(release) FROM Release release";
766     private static final String _SQL_COUNT_RELEASE_WHERE = "SELECT COUNT(release) FROM Release release WHERE ";
767     private static final String _FINDER_COLUMN_SERVLETCONTEXTNAME_SERVLETCONTEXTNAME_1 =
768         "release.servletContextName IS NULL";
769     private static final String _FINDER_COLUMN_SERVLETCONTEXTNAME_SERVLETCONTEXTNAME_2 =
770         "release.servletContextName = ?";
771     private static final String _FINDER_COLUMN_SERVLETCONTEXTNAME_SERVLETCONTEXTNAME_3 =
772         "(release.servletContextName IS NULL OR release.servletContextName = ?)";
773     private static final String _ORDER_BY_ENTITY_ALIAS = "release.";
774     private static final String _NO_SUCH_ENTITY_WITH_PRIMARY_KEY = "No Release exists with the primary key ";
775     private static final String _NO_SUCH_ENTITY_WITH_KEY = "No Release exists with the key {";
776     private static Log _log = LogFactoryUtil.getLog(ReleasePersistenceImpl.class);
777 }