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