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