001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.service.persistence;
016    
017    import com.liferay.portal.NoSuchClassNameException;
018    import com.liferay.portal.NoSuchModelException;
019    import com.liferay.portal.kernel.annotation.BeanReference;
020    import com.liferay.portal.kernel.cache.CacheRegistryUtil;
021    import com.liferay.portal.kernel.dao.orm.EntityCacheUtil;
022    import com.liferay.portal.kernel.dao.orm.FinderCacheUtil;
023    import com.liferay.portal.kernel.dao.orm.FinderPath;
024    import com.liferay.portal.kernel.dao.orm.Query;
025    import com.liferay.portal.kernel.dao.orm.QueryPos;
026    import com.liferay.portal.kernel.dao.orm.QueryUtil;
027    import com.liferay.portal.kernel.dao.orm.Session;
028    import com.liferay.portal.kernel.exception.SystemException;
029    import com.liferay.portal.kernel.log.Log;
030    import com.liferay.portal.kernel.log.LogFactoryUtil;
031    import com.liferay.portal.kernel.util.GetterUtil;
032    import com.liferay.portal.kernel.util.InstanceFactory;
033    import com.liferay.portal.kernel.util.OrderByComparator;
034    import com.liferay.portal.kernel.util.StringBundler;
035    import com.liferay.portal.kernel.util.StringPool;
036    import com.liferay.portal.kernel.util.StringUtil;
037    import com.liferay.portal.kernel.util.Validator;
038    import com.liferay.portal.model.ClassName;
039    import com.liferay.portal.model.ModelListener;
040    import com.liferay.portal.model.impl.ClassNameImpl;
041    import com.liferay.portal.model.impl.ClassNameModelImpl;
042    import com.liferay.portal.service.persistence.impl.BasePersistenceImpl;
043    
044    import java.io.Serializable;
045    
046    import java.util.ArrayList;
047    import java.util.Collections;
048    import java.util.List;
049    
050    /**
051     * @author    Brian Wing Shun Chan
052     * @see       ClassNamePersistence
053     * @see       ClassNameUtil
054     * @generated
055     */
056    public class ClassNamePersistenceImpl extends BasePersistenceImpl<ClassName>
057            implements ClassNamePersistence {
058            public static final String FINDER_CLASS_NAME_ENTITY = ClassNameImpl.class.getName();
059            public static final String FINDER_CLASS_NAME_LIST = FINDER_CLASS_NAME_ENTITY +
060                    ".List";
061            public static final FinderPath FINDER_PATH_FETCH_BY_VALUE = new FinderPath(ClassNameModelImpl.ENTITY_CACHE_ENABLED,
062                            ClassNameModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_ENTITY,
063                            "fetchByValue", new String[] { String.class.getName() });
064            public static final FinderPath FINDER_PATH_COUNT_BY_VALUE = new FinderPath(ClassNameModelImpl.ENTITY_CACHE_ENABLED,
065                            ClassNameModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
066                            "countByValue", new String[] { String.class.getName() });
067            public static final FinderPath FINDER_PATH_FIND_ALL = new FinderPath(ClassNameModelImpl.ENTITY_CACHE_ENABLED,
068                            ClassNameModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
069                            "findAll", new String[0]);
070            public static final FinderPath FINDER_PATH_COUNT_ALL = new FinderPath(ClassNameModelImpl.ENTITY_CACHE_ENABLED,
071                            ClassNameModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
072                            "countAll", new String[0]);
073    
074            public void cacheResult(ClassName className) {
075                    EntityCacheUtil.putResult(ClassNameModelImpl.ENTITY_CACHE_ENABLED,
076                            ClassNameImpl.class, className.getPrimaryKey(), className);
077    
078                    FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_VALUE,
079                            new Object[] { className.getValue() }, className);
080            }
081    
082            public void cacheResult(List<ClassName> classNames) {
083                    for (ClassName className : classNames) {
084                            if (EntityCacheUtil.getResult(
085                                                    ClassNameModelImpl.ENTITY_CACHE_ENABLED,
086                                                    ClassNameImpl.class, className.getPrimaryKey(), this) == null) {
087                                    cacheResult(className);
088                            }
089                    }
090            }
091    
092            public void clearCache() {
093                    CacheRegistryUtil.clear(ClassNameImpl.class.getName());
094                    EntityCacheUtil.clearCache(ClassNameImpl.class.getName());
095                    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_ENTITY);
096                    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST);
097            }
098    
099            public void clearCache(ClassName className) {
100                    EntityCacheUtil.removeResult(ClassNameModelImpl.ENTITY_CACHE_ENABLED,
101                            ClassNameImpl.class, className.getPrimaryKey());
102    
103                    FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_VALUE,
104                            new Object[] { className.getValue() });
105            }
106    
107            public ClassName create(long classNameId) {
108                    ClassName className = new ClassNameImpl();
109    
110                    className.setNew(true);
111                    className.setPrimaryKey(classNameId);
112    
113                    return className;
114            }
115    
116            public ClassName remove(Serializable primaryKey)
117                    throws NoSuchModelException, SystemException {
118                    return remove(((Long)primaryKey).longValue());
119            }
120    
121            public ClassName remove(long classNameId)
122                    throws NoSuchClassNameException, SystemException {
123                    Session session = null;
124    
125                    try {
126                            session = openSession();
127    
128                            ClassName className = (ClassName)session.get(ClassNameImpl.class,
129                                            new Long(classNameId));
130    
131                            if (className == null) {
132                                    if (_log.isWarnEnabled()) {
133                                            _log.warn(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + classNameId);
134                                    }
135    
136                                    throw new NoSuchClassNameException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY +
137                                            classNameId);
138                            }
139    
140                            return remove(className);
141                    }
142                    catch (NoSuchClassNameException nsee) {
143                            throw nsee;
144                    }
145                    catch (Exception e) {
146                            throw processException(e);
147                    }
148                    finally {
149                            closeSession(session);
150                    }
151            }
152    
153            protected ClassName removeImpl(ClassName className)
154                    throws SystemException {
155                    className = toUnwrappedModel(className);
156    
157                    Session session = null;
158    
159                    try {
160                            session = openSession();
161    
162                            if (className.isCachedModel() || BatchSessionUtil.isEnabled()) {
163                                    Object staleObject = session.get(ClassNameImpl.class,
164                                                    className.getPrimaryKeyObj());
165    
166                                    if (staleObject != null) {
167                                            session.evict(staleObject);
168                                    }
169                            }
170    
171                            session.delete(className);
172    
173                            session.flush();
174                    }
175                    catch (Exception e) {
176                            throw processException(e);
177                    }
178                    finally {
179                            closeSession(session);
180                    }
181    
182                    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST);
183    
184                    ClassNameModelImpl classNameModelImpl = (ClassNameModelImpl)className;
185    
186                    FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_VALUE,
187                            new Object[] { classNameModelImpl.getOriginalValue() });
188    
189                    EntityCacheUtil.removeResult(ClassNameModelImpl.ENTITY_CACHE_ENABLED,
190                            ClassNameImpl.class, className.getPrimaryKey());
191    
192                    return className;
193            }
194    
195            public ClassName updateImpl(com.liferay.portal.model.ClassName className,
196                    boolean merge) throws SystemException {
197                    className = toUnwrappedModel(className);
198    
199                    boolean isNew = className.isNew();
200    
201                    ClassNameModelImpl classNameModelImpl = (ClassNameModelImpl)className;
202    
203                    Session session = null;
204    
205                    try {
206                            session = openSession();
207    
208                            BatchSessionUtil.update(session, className, merge);
209    
210                            className.setNew(false);
211                    }
212                    catch (Exception e) {
213                            throw processException(e);
214                    }
215                    finally {
216                            closeSession(session);
217                    }
218    
219                    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST);
220    
221                    EntityCacheUtil.putResult(ClassNameModelImpl.ENTITY_CACHE_ENABLED,
222                            ClassNameImpl.class, className.getPrimaryKey(), className);
223    
224                    if (!isNew &&
225                                    (!Validator.equals(className.getValue(),
226                                            classNameModelImpl.getOriginalValue()))) {
227                            FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_VALUE,
228                                    new Object[] { classNameModelImpl.getOriginalValue() });
229                    }
230    
231                    if (isNew ||
232                                    (!Validator.equals(className.getValue(),
233                                            classNameModelImpl.getOriginalValue()))) {
234                            FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_VALUE,
235                                    new Object[] { className.getValue() }, className);
236                    }
237    
238                    return className;
239            }
240    
241            protected ClassName toUnwrappedModel(ClassName className) {
242                    if (className instanceof ClassNameImpl) {
243                            return className;
244                    }
245    
246                    ClassNameImpl classNameImpl = new ClassNameImpl();
247    
248                    classNameImpl.setNew(className.isNew());
249                    classNameImpl.setPrimaryKey(className.getPrimaryKey());
250    
251                    classNameImpl.setClassNameId(className.getClassNameId());
252                    classNameImpl.setValue(className.getValue());
253    
254                    return classNameImpl;
255            }
256    
257            public ClassName findByPrimaryKey(Serializable primaryKey)
258                    throws NoSuchModelException, SystemException {
259                    return findByPrimaryKey(((Long)primaryKey).longValue());
260            }
261    
262            public ClassName findByPrimaryKey(long classNameId)
263                    throws NoSuchClassNameException, SystemException {
264                    ClassName className = fetchByPrimaryKey(classNameId);
265    
266                    if (className == null) {
267                            if (_log.isWarnEnabled()) {
268                                    _log.warn(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + classNameId);
269                            }
270    
271                            throw new NoSuchClassNameException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY +
272                                    classNameId);
273                    }
274    
275                    return className;
276            }
277    
278            public ClassName fetchByPrimaryKey(Serializable primaryKey)
279                    throws SystemException {
280                    return fetchByPrimaryKey(((Long)primaryKey).longValue());
281            }
282    
283            public ClassName fetchByPrimaryKey(long classNameId)
284                    throws SystemException {
285                    ClassName className = (ClassName)EntityCacheUtil.getResult(ClassNameModelImpl.ENTITY_CACHE_ENABLED,
286                                    ClassNameImpl.class, classNameId, this);
287    
288                    if (className == null) {
289                            Session session = null;
290    
291                            try {
292                                    session = openSession();
293    
294                                    className = (ClassName)session.get(ClassNameImpl.class,
295                                                    new Long(classNameId));
296                            }
297                            catch (Exception e) {
298                                    throw processException(e);
299                            }
300                            finally {
301                                    if (className != null) {
302                                            cacheResult(className);
303                                    }
304    
305                                    closeSession(session);
306                            }
307                    }
308    
309                    return className;
310            }
311    
312            public ClassName findByValue(String value)
313                    throws NoSuchClassNameException, SystemException {
314                    ClassName className = fetchByValue(value);
315    
316                    if (className == null) {
317                            StringBundler msg = new StringBundler(4);
318    
319                            msg.append(_NO_SUCH_ENTITY_WITH_KEY);
320    
321                            msg.append("value=");
322                            msg.append(value);
323    
324                            msg.append(StringPool.CLOSE_CURLY_BRACE);
325    
326                            if (_log.isWarnEnabled()) {
327                                    _log.warn(msg.toString());
328                            }
329    
330                            throw new NoSuchClassNameException(msg.toString());
331                    }
332    
333                    return className;
334            }
335    
336            public ClassName fetchByValue(String value) throws SystemException {
337                    return fetchByValue(value, true);
338            }
339    
340            public ClassName fetchByValue(String value, boolean retrieveFromCache)
341                    throws SystemException {
342                    Object[] finderArgs = new Object[] { value };
343    
344                    Object result = null;
345    
346                    if (retrieveFromCache) {
347                            result = FinderCacheUtil.getResult(FINDER_PATH_FETCH_BY_VALUE,
348                                            finderArgs, this);
349                    }
350    
351                    if (result == null) {
352                            Session session = null;
353    
354                            try {
355                                    session = openSession();
356    
357                                    StringBundler query = new StringBundler(2);
358    
359                                    query.append(_SQL_SELECT_CLASSNAME_WHERE);
360    
361                                    if (value == null) {
362                                            query.append(_FINDER_COLUMN_VALUE_VALUE_1);
363                                    }
364                                    else {
365                                            if (value.equals(StringPool.BLANK)) {
366                                                    query.append(_FINDER_COLUMN_VALUE_VALUE_3);
367                                            }
368                                            else {
369                                                    query.append(_FINDER_COLUMN_VALUE_VALUE_2);
370                                            }
371                                    }
372    
373                                    String sql = query.toString();
374    
375                                    Query q = session.createQuery(sql);
376    
377                                    QueryPos qPos = QueryPos.getInstance(q);
378    
379                                    if (value != null) {
380                                            qPos.add(value);
381                                    }
382    
383                                    List<ClassName> list = q.list();
384    
385                                    result = list;
386    
387                                    ClassName className = null;
388    
389                                    if (list.isEmpty()) {
390                                            FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_VALUE,
391                                                    finderArgs, list);
392                                    }
393                                    else {
394                                            className = list.get(0);
395    
396                                            cacheResult(className);
397    
398                                            if ((className.getValue() == null) ||
399                                                            !className.getValue().equals(value)) {
400                                                    FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_VALUE,
401                                                            finderArgs, className);
402                                            }
403                                    }
404    
405                                    return className;
406                            }
407                            catch (Exception e) {
408                                    throw processException(e);
409                            }
410                            finally {
411                                    if (result == null) {
412                                            FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_VALUE,
413                                                    finderArgs, new ArrayList<ClassName>());
414                                    }
415    
416                                    closeSession(session);
417                            }
418                    }
419                    else {
420                            if (result instanceof List<?>) {
421                                    return null;
422                            }
423                            else {
424                                    return (ClassName)result;
425                            }
426                    }
427            }
428    
429            public List<ClassName> findAll() throws SystemException {
430                    return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
431            }
432    
433            public List<ClassName> findAll(int start, int end)
434                    throws SystemException {
435                    return findAll(start, end, null);
436            }
437    
438            public List<ClassName> findAll(int start, int end,
439                    OrderByComparator orderByComparator) throws SystemException {
440                    Object[] finderArgs = new Object[] {
441                                    String.valueOf(start), String.valueOf(end),
442                                    String.valueOf(orderByComparator)
443                            };
444    
445                    List<ClassName> list = (List<ClassName>)FinderCacheUtil.getResult(FINDER_PATH_FIND_ALL,
446                                    finderArgs, this);
447    
448                    if (list == null) {
449                            Session session = null;
450    
451                            try {
452                                    session = openSession();
453    
454                                    StringBundler query = null;
455                                    String sql = null;
456    
457                                    if (orderByComparator != null) {
458                                            query = new StringBundler(2 +
459                                                            (orderByComparator.getOrderByFields().length * 3));
460    
461                                            query.append(_SQL_SELECT_CLASSNAME);
462    
463                                            appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS,
464                                                    orderByComparator);
465    
466                                            sql = query.toString();
467                                    }
468                                    else {
469                                            sql = _SQL_SELECT_CLASSNAME;
470                                    }
471    
472                                    Query q = session.createQuery(sql);
473    
474                                    if (orderByComparator == null) {
475                                            list = (List<ClassName>)QueryUtil.list(q, getDialect(),
476                                                            start, end, false);
477    
478                                            Collections.sort(list);
479                                    }
480                                    else {
481                                            list = (List<ClassName>)QueryUtil.list(q, getDialect(),
482                                                            start, end);
483                                    }
484                            }
485                            catch (Exception e) {
486                                    throw processException(e);
487                            }
488                            finally {
489                                    if (list == null) {
490                                            list = new ArrayList<ClassName>();
491                                    }
492    
493                                    cacheResult(list);
494    
495                                    FinderCacheUtil.putResult(FINDER_PATH_FIND_ALL, finderArgs, list);
496    
497                                    closeSession(session);
498                            }
499                    }
500    
501                    return list;
502            }
503    
504            public void removeByValue(String value)
505                    throws NoSuchClassNameException, SystemException {
506                    ClassName className = findByValue(value);
507    
508                    remove(className);
509            }
510    
511            public void removeAll() throws SystemException {
512                    for (ClassName className : findAll()) {
513                            remove(className);
514                    }
515            }
516    
517            public int countByValue(String value) throws SystemException {
518                    Object[] finderArgs = new Object[] { value };
519    
520                    Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_BY_VALUE,
521                                    finderArgs, this);
522    
523                    if (count == null) {
524                            Session session = null;
525    
526                            try {
527                                    session = openSession();
528    
529                                    StringBundler query = new StringBundler(2);
530    
531                                    query.append(_SQL_COUNT_CLASSNAME_WHERE);
532    
533                                    if (value == null) {
534                                            query.append(_FINDER_COLUMN_VALUE_VALUE_1);
535                                    }
536                                    else {
537                                            if (value.equals(StringPool.BLANK)) {
538                                                    query.append(_FINDER_COLUMN_VALUE_VALUE_3);
539                                            }
540                                            else {
541                                                    query.append(_FINDER_COLUMN_VALUE_VALUE_2);
542                                            }
543                                    }
544    
545                                    String sql = query.toString();
546    
547                                    Query q = session.createQuery(sql);
548    
549                                    QueryPos qPos = QueryPos.getInstance(q);
550    
551                                    if (value != null) {
552                                            qPos.add(value);
553                                    }
554    
555                                    count = (Long)q.uniqueResult();
556                            }
557                            catch (Exception e) {
558                                    throw processException(e);
559                            }
560                            finally {
561                                    if (count == null) {
562                                            count = Long.valueOf(0);
563                                    }
564    
565                                    FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_VALUE,
566                                            finderArgs, count);
567    
568                                    closeSession(session);
569                            }
570                    }
571    
572                    return count.intValue();
573            }
574    
575            public int countAll() throws SystemException {
576                    Object[] finderArgs = new Object[0];
577    
578                    Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_ALL,
579                                    finderArgs, this);
580    
581                    if (count == null) {
582                            Session session = null;
583    
584                            try {
585                                    session = openSession();
586    
587                                    Query q = session.createQuery(_SQL_COUNT_CLASSNAME);
588    
589                                    count = (Long)q.uniqueResult();
590                            }
591                            catch (Exception e) {
592                                    throw processException(e);
593                            }
594                            finally {
595                                    if (count == null) {
596                                            count = Long.valueOf(0);
597                                    }
598    
599                                    FinderCacheUtil.putResult(FINDER_PATH_COUNT_ALL, finderArgs,
600                                            count);
601    
602                                    closeSession(session);
603                            }
604                    }
605    
606                    return count.intValue();
607            }
608    
609            public void afterPropertiesSet() {
610                    String[] listenerClassNames = StringUtil.split(GetterUtil.getString(
611                                            com.liferay.portal.util.PropsUtil.get(
612                                                    "value.object.listener.com.liferay.portal.model.ClassName")));
613    
614                    if (listenerClassNames.length > 0) {
615                            try {
616                                    List<ModelListener<ClassName>> listenersList = new ArrayList<ModelListener<ClassName>>();
617    
618                                    for (String listenerClassName : listenerClassNames) {
619                                            listenersList.add((ModelListener<ClassName>)InstanceFactory.newInstance(
620                                                            listenerClassName));
621                                    }
622    
623                                    listeners = listenersList.toArray(new ModelListener[listenersList.size()]);
624                            }
625                            catch (Exception e) {
626                                    _log.error(e);
627                            }
628                    }
629            }
630    
631            @BeanReference(type = AccountPersistence.class)
632            protected AccountPersistence accountPersistence;
633            @BeanReference(type = AddressPersistence.class)
634            protected AddressPersistence addressPersistence;
635            @BeanReference(type = BrowserTrackerPersistence.class)
636            protected BrowserTrackerPersistence browserTrackerPersistence;
637            @BeanReference(type = ClassNamePersistence.class)
638            protected ClassNamePersistence classNamePersistence;
639            @BeanReference(type = CompanyPersistence.class)
640            protected CompanyPersistence companyPersistence;
641            @BeanReference(type = ContactPersistence.class)
642            protected ContactPersistence contactPersistence;
643            @BeanReference(type = CountryPersistence.class)
644            protected CountryPersistence countryPersistence;
645            @BeanReference(type = EmailAddressPersistence.class)
646            protected EmailAddressPersistence emailAddressPersistence;
647            @BeanReference(type = GroupPersistence.class)
648            protected GroupPersistence groupPersistence;
649            @BeanReference(type = ImagePersistence.class)
650            protected ImagePersistence imagePersistence;
651            @BeanReference(type = LayoutPersistence.class)
652            protected LayoutPersistence layoutPersistence;
653            @BeanReference(type = LayoutPrototypePersistence.class)
654            protected LayoutPrototypePersistence layoutPrototypePersistence;
655            @BeanReference(type = LayoutSetPersistence.class)
656            protected LayoutSetPersistence layoutSetPersistence;
657            @BeanReference(type = LayoutSetPrototypePersistence.class)
658            protected LayoutSetPrototypePersistence layoutSetPrototypePersistence;
659            @BeanReference(type = ListTypePersistence.class)
660            protected ListTypePersistence listTypePersistence;
661            @BeanReference(type = LockPersistence.class)
662            protected LockPersistence lockPersistence;
663            @BeanReference(type = MembershipRequestPersistence.class)
664            protected MembershipRequestPersistence membershipRequestPersistence;
665            @BeanReference(type = OrganizationPersistence.class)
666            protected OrganizationPersistence organizationPersistence;
667            @BeanReference(type = OrgGroupPermissionPersistence.class)
668            protected OrgGroupPermissionPersistence orgGroupPermissionPersistence;
669            @BeanReference(type = OrgGroupRolePersistence.class)
670            protected OrgGroupRolePersistence orgGroupRolePersistence;
671            @BeanReference(type = OrgLaborPersistence.class)
672            protected OrgLaborPersistence orgLaborPersistence;
673            @BeanReference(type = PasswordPolicyPersistence.class)
674            protected PasswordPolicyPersistence passwordPolicyPersistence;
675            @BeanReference(type = PasswordPolicyRelPersistence.class)
676            protected PasswordPolicyRelPersistence passwordPolicyRelPersistence;
677            @BeanReference(type = PasswordTrackerPersistence.class)
678            protected PasswordTrackerPersistence passwordTrackerPersistence;
679            @BeanReference(type = PermissionPersistence.class)
680            protected PermissionPersistence permissionPersistence;
681            @BeanReference(type = PhonePersistence.class)
682            protected PhonePersistence phonePersistence;
683            @BeanReference(type = PluginSettingPersistence.class)
684            protected PluginSettingPersistence pluginSettingPersistence;
685            @BeanReference(type = PortletPersistence.class)
686            protected PortletPersistence portletPersistence;
687            @BeanReference(type = PortletItemPersistence.class)
688            protected PortletItemPersistence portletItemPersistence;
689            @BeanReference(type = PortletPreferencesPersistence.class)
690            protected PortletPreferencesPersistence portletPreferencesPersistence;
691            @BeanReference(type = RegionPersistence.class)
692            protected RegionPersistence regionPersistence;
693            @BeanReference(type = ReleasePersistence.class)
694            protected ReleasePersistence releasePersistence;
695            @BeanReference(type = ResourcePersistence.class)
696            protected ResourcePersistence resourcePersistence;
697            @BeanReference(type = ResourceActionPersistence.class)
698            protected ResourceActionPersistence resourceActionPersistence;
699            @BeanReference(type = ResourceCodePersistence.class)
700            protected ResourceCodePersistence resourceCodePersistence;
701            @BeanReference(type = ResourcePermissionPersistence.class)
702            protected ResourcePermissionPersistence resourcePermissionPersistence;
703            @BeanReference(type = RolePersistence.class)
704            protected RolePersistence rolePersistence;
705            @BeanReference(type = ServiceComponentPersistence.class)
706            protected ServiceComponentPersistence serviceComponentPersistence;
707            @BeanReference(type = ShardPersistence.class)
708            protected ShardPersistence shardPersistence;
709            @BeanReference(type = SubscriptionPersistence.class)
710            protected SubscriptionPersistence subscriptionPersistence;
711            @BeanReference(type = TicketPersistence.class)
712            protected TicketPersistence ticketPersistence;
713            @BeanReference(type = TeamPersistence.class)
714            protected TeamPersistence teamPersistence;
715            @BeanReference(type = UserPersistence.class)
716            protected UserPersistence userPersistence;
717            @BeanReference(type = UserGroupPersistence.class)
718            protected UserGroupPersistence userGroupPersistence;
719            @BeanReference(type = UserGroupGroupRolePersistence.class)
720            protected UserGroupGroupRolePersistence userGroupGroupRolePersistence;
721            @BeanReference(type = UserGroupRolePersistence.class)
722            protected UserGroupRolePersistence userGroupRolePersistence;
723            @BeanReference(type = UserIdMapperPersistence.class)
724            protected UserIdMapperPersistence userIdMapperPersistence;
725            @BeanReference(type = UserTrackerPersistence.class)
726            protected UserTrackerPersistence userTrackerPersistence;
727            @BeanReference(type = UserTrackerPathPersistence.class)
728            protected UserTrackerPathPersistence userTrackerPathPersistence;
729            @BeanReference(type = WebDAVPropsPersistence.class)
730            protected WebDAVPropsPersistence webDAVPropsPersistence;
731            @BeanReference(type = WebsitePersistence.class)
732            protected WebsitePersistence websitePersistence;
733            @BeanReference(type = WorkflowDefinitionLinkPersistence.class)
734            protected WorkflowDefinitionLinkPersistence workflowDefinitionLinkPersistence;
735            @BeanReference(type = WorkflowInstanceLinkPersistence.class)
736            protected WorkflowInstanceLinkPersistence workflowInstanceLinkPersistence;
737            private static final String _SQL_SELECT_CLASSNAME = "SELECT className FROM ClassName className";
738            private static final String _SQL_SELECT_CLASSNAME_WHERE = "SELECT className FROM ClassName className WHERE ";
739            private static final String _SQL_COUNT_CLASSNAME = "SELECT COUNT(className) FROM ClassName className";
740            private static final String _SQL_COUNT_CLASSNAME_WHERE = "SELECT COUNT(className) FROM ClassName className WHERE ";
741            private static final String _FINDER_COLUMN_VALUE_VALUE_1 = "className.value IS NULL";
742            private static final String _FINDER_COLUMN_VALUE_VALUE_2 = "className.value = ?";
743            private static final String _FINDER_COLUMN_VALUE_VALUE_3 = "(className.value IS NULL OR className.value = ?)";
744            private static final String _ORDER_BY_ENTITY_ALIAS = "className.";
745            private static final String _NO_SUCH_ENTITY_WITH_PRIMARY_KEY = "No ClassName exists with the primary key ";
746            private static final String _NO_SUCH_ENTITY_WITH_KEY = "No ClassName exists with the key {";
747            private static Log _log = LogFactoryUtil.getLog(ClassNamePersistenceImpl.class);
748    }