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