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