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.NoSuchClusterGroupException;
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.QueryUtil;
026    import com.liferay.portal.kernel.dao.orm.Session;
027    import com.liferay.portal.kernel.exception.SystemException;
028    import com.liferay.portal.kernel.log.Log;
029    import com.liferay.portal.kernel.log.LogFactoryUtil;
030    import com.liferay.portal.kernel.util.GetterUtil;
031    import com.liferay.portal.kernel.util.InstanceFactory;
032    import com.liferay.portal.kernel.util.OrderByComparator;
033    import com.liferay.portal.kernel.util.StringBundler;
034    import com.liferay.portal.kernel.util.StringUtil;
035    import com.liferay.portal.model.ClusterGroup;
036    import com.liferay.portal.model.ModelListener;
037    import com.liferay.portal.model.impl.ClusterGroupImpl;
038    import com.liferay.portal.model.impl.ClusterGroupModelImpl;
039    import com.liferay.portal.service.persistence.impl.BasePersistenceImpl;
040    
041    import java.io.Serializable;
042    
043    import java.util.ArrayList;
044    import java.util.Collections;
045    import java.util.List;
046    
047    /**
048     * The persistence implementation for the cluster group service.
049     *
050     * <p>
051     * Never modify or reference this class directly. Always use {@link ClusterGroupUtil} to access the cluster group persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class.
052     * </p>
053     *
054     * <p>
055     * Caching information and settings can be found in <code>portal.properties</code>
056     * </p>
057     *
058     * @author Brian Wing Shun Chan
059     * @see ClusterGroupPersistence
060     * @see ClusterGroupUtil
061     * @generated
062     */
063    public class ClusterGroupPersistenceImpl extends BasePersistenceImpl<ClusterGroup>
064            implements ClusterGroupPersistence {
065            public static final String FINDER_CLASS_NAME_ENTITY = ClusterGroupImpl.class.getName();
066            public static final String FINDER_CLASS_NAME_LIST = FINDER_CLASS_NAME_ENTITY +
067                    ".List";
068            public static final FinderPath FINDER_PATH_FIND_ALL = new FinderPath(ClusterGroupModelImpl.ENTITY_CACHE_ENABLED,
069                            ClusterGroupModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
070                            "findAll", new String[0]);
071            public static final FinderPath FINDER_PATH_COUNT_ALL = new FinderPath(ClusterGroupModelImpl.ENTITY_CACHE_ENABLED,
072                            ClusterGroupModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
073                            "countAll", new String[0]);
074    
075            /**
076             * Caches the cluster group in the entity cache if it is enabled.
077             *
078             * @param clusterGroup the cluster group to cache
079             */
080            public void cacheResult(ClusterGroup clusterGroup) {
081                    EntityCacheUtil.putResult(ClusterGroupModelImpl.ENTITY_CACHE_ENABLED,
082                            ClusterGroupImpl.class, clusterGroup.getPrimaryKey(), clusterGroup);
083            }
084    
085            /**
086             * Caches the cluster groups in the entity cache if it is enabled.
087             *
088             * @param clusterGroups the cluster groups to cache
089             */
090            public void cacheResult(List<ClusterGroup> clusterGroups) {
091                    for (ClusterGroup clusterGroup : clusterGroups) {
092                            if (EntityCacheUtil.getResult(
093                                                    ClusterGroupModelImpl.ENTITY_CACHE_ENABLED,
094                                                    ClusterGroupImpl.class, clusterGroup.getPrimaryKey(),
095                                                    this) == null) {
096                                    cacheResult(clusterGroup);
097                            }
098                    }
099            }
100    
101            /**
102             * Clears the cache for all cluster groups.
103             *
104             * <p>
105             * The {@link com.liferay.portal.kernel.dao.orm.EntityCache} and {@link com.liferay.portal.kernel.dao.orm.FinderCache} are both cleared by this method.
106             * </p>
107             */
108            public void clearCache() {
109                    CacheRegistryUtil.clear(ClusterGroupImpl.class.getName());
110                    EntityCacheUtil.clearCache(ClusterGroupImpl.class.getName());
111                    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_ENTITY);
112                    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST);
113            }
114    
115            /**
116             * Clears the cache for the cluster group.
117             *
118             * <p>
119             * The {@link com.liferay.portal.kernel.dao.orm.EntityCache} and {@link com.liferay.portal.kernel.dao.orm.FinderCache} are both cleared by this method.
120             * </p>
121             */
122            public void clearCache(ClusterGroup clusterGroup) {
123                    EntityCacheUtil.removeResult(ClusterGroupModelImpl.ENTITY_CACHE_ENABLED,
124                            ClusterGroupImpl.class, clusterGroup.getPrimaryKey());
125            }
126    
127            /**
128             * Creates a new cluster group with the primary key. Does not add the cluster group to the database.
129             *
130             * @param clusterGroupId the primary key for the new cluster group
131             * @return the new cluster group
132             */
133            public ClusterGroup create(long clusterGroupId) {
134                    ClusterGroup clusterGroup = new ClusterGroupImpl();
135    
136                    clusterGroup.setNew(true);
137                    clusterGroup.setPrimaryKey(clusterGroupId);
138    
139                    return clusterGroup;
140            }
141    
142            /**
143             * Removes the cluster group with the primary key from the database. Also notifies the appropriate model listeners.
144             *
145             * @param primaryKey the primary key of the cluster group to remove
146             * @return the cluster group that was removed
147             * @throws com.liferay.portal.NoSuchModelException if a cluster group with the primary key could not be found
148             * @throws SystemException if a system exception occurred
149             */
150            public ClusterGroup remove(Serializable primaryKey)
151                    throws NoSuchModelException, SystemException {
152                    return remove(((Long)primaryKey).longValue());
153            }
154    
155            /**
156             * Removes the cluster group with the primary key from the database. Also notifies the appropriate model listeners.
157             *
158             * @param clusterGroupId the primary key of the cluster group to remove
159             * @return the cluster group that was removed
160             * @throws com.liferay.portal.NoSuchClusterGroupException if a cluster group with the primary key could not be found
161             * @throws SystemException if a system exception occurred
162             */
163            public ClusterGroup remove(long clusterGroupId)
164                    throws NoSuchClusterGroupException, SystemException {
165                    Session session = null;
166    
167                    try {
168                            session = openSession();
169    
170                            ClusterGroup clusterGroup = (ClusterGroup)session.get(ClusterGroupImpl.class,
171                                            new Long(clusterGroupId));
172    
173                            if (clusterGroup == null) {
174                                    if (_log.isWarnEnabled()) {
175                                            _log.warn(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY +
176                                                    clusterGroupId);
177                                    }
178    
179                                    throw new NoSuchClusterGroupException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY +
180                                            clusterGroupId);
181                            }
182    
183                            return remove(clusterGroup);
184                    }
185                    catch (NoSuchClusterGroupException nsee) {
186                            throw nsee;
187                    }
188                    catch (Exception e) {
189                            throw processException(e);
190                    }
191                    finally {
192                            closeSession(session);
193                    }
194            }
195    
196            protected ClusterGroup removeImpl(ClusterGroup clusterGroup)
197                    throws SystemException {
198                    clusterGroup = toUnwrappedModel(clusterGroup);
199    
200                    Session session = null;
201    
202                    try {
203                            session = openSession();
204    
205                            if (clusterGroup.isCachedModel() || BatchSessionUtil.isEnabled()) {
206                                    Object staleObject = session.get(ClusterGroupImpl.class,
207                                                    clusterGroup.getPrimaryKeyObj());
208    
209                                    if (staleObject != null) {
210                                            session.evict(staleObject);
211                                    }
212                            }
213    
214                            session.delete(clusterGroup);
215    
216                            session.flush();
217                    }
218                    catch (Exception e) {
219                            throw processException(e);
220                    }
221                    finally {
222                            closeSession(session);
223                    }
224    
225                    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST);
226    
227                    EntityCacheUtil.removeResult(ClusterGroupModelImpl.ENTITY_CACHE_ENABLED,
228                            ClusterGroupImpl.class, clusterGroup.getPrimaryKey());
229    
230                    return clusterGroup;
231            }
232    
233            public ClusterGroup updateImpl(
234                    com.liferay.portal.model.ClusterGroup clusterGroup, boolean merge)
235                    throws SystemException {
236                    clusterGroup = toUnwrappedModel(clusterGroup);
237    
238                    Session session = null;
239    
240                    try {
241                            session = openSession();
242    
243                            BatchSessionUtil.update(session, clusterGroup, merge);
244    
245                            clusterGroup.setNew(false);
246                    }
247                    catch (Exception e) {
248                            throw processException(e);
249                    }
250                    finally {
251                            closeSession(session);
252                    }
253    
254                    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST);
255    
256                    EntityCacheUtil.putResult(ClusterGroupModelImpl.ENTITY_CACHE_ENABLED,
257                            ClusterGroupImpl.class, clusterGroup.getPrimaryKey(), clusterGroup);
258    
259                    return clusterGroup;
260            }
261    
262            protected ClusterGroup toUnwrappedModel(ClusterGroup clusterGroup) {
263                    if (clusterGroup instanceof ClusterGroupImpl) {
264                            return clusterGroup;
265                    }
266    
267                    ClusterGroupImpl clusterGroupImpl = new ClusterGroupImpl();
268    
269                    clusterGroupImpl.setNew(clusterGroup.isNew());
270                    clusterGroupImpl.setPrimaryKey(clusterGroup.getPrimaryKey());
271    
272                    clusterGroupImpl.setClusterGroupId(clusterGroup.getClusterGroupId());
273                    clusterGroupImpl.setName(clusterGroup.getName());
274                    clusterGroupImpl.setClusterNodeIds(clusterGroup.getClusterNodeIds());
275                    clusterGroupImpl.setWholeCluster(clusterGroup.isWholeCluster());
276    
277                    return clusterGroupImpl;
278            }
279    
280            /**
281             * Finds the cluster group with the primary key or throws a {@link com.liferay.portal.NoSuchModelException} if it could not be found.
282             *
283             * @param primaryKey the primary key of the cluster group to find
284             * @return the cluster group
285             * @throws com.liferay.portal.NoSuchModelException if a cluster group with the primary key could not be found
286             * @throws SystemException if a system exception occurred
287             */
288            public ClusterGroup findByPrimaryKey(Serializable primaryKey)
289                    throws NoSuchModelException, SystemException {
290                    return findByPrimaryKey(((Long)primaryKey).longValue());
291            }
292    
293            /**
294             * Finds the cluster group with the primary key or throws a {@link com.liferay.portal.NoSuchClusterGroupException} if it could not be found.
295             *
296             * @param clusterGroupId the primary key of the cluster group to find
297             * @return the cluster group
298             * @throws com.liferay.portal.NoSuchClusterGroupException if a cluster group with the primary key could not be found
299             * @throws SystemException if a system exception occurred
300             */
301            public ClusterGroup findByPrimaryKey(long clusterGroupId)
302                    throws NoSuchClusterGroupException, SystemException {
303                    ClusterGroup clusterGroup = fetchByPrimaryKey(clusterGroupId);
304    
305                    if (clusterGroup == null) {
306                            if (_log.isWarnEnabled()) {
307                                    _log.warn(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + clusterGroupId);
308                            }
309    
310                            throw new NoSuchClusterGroupException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY +
311                                    clusterGroupId);
312                    }
313    
314                    return clusterGroup;
315            }
316    
317            /**
318             * Finds the cluster group with the primary key or returns <code>null</code> if it could not be found.
319             *
320             * @param primaryKey the primary key of the cluster group to find
321             * @return the cluster group, or <code>null</code> if a cluster group with the primary key could not be found
322             * @throws SystemException if a system exception occurred
323             */
324            public ClusterGroup fetchByPrimaryKey(Serializable primaryKey)
325                    throws SystemException {
326                    return fetchByPrimaryKey(((Long)primaryKey).longValue());
327            }
328    
329            /**
330             * Finds the cluster group with the primary key or returns <code>null</code> if it could not be found.
331             *
332             * @param clusterGroupId the primary key of the cluster group to find
333             * @return the cluster group, or <code>null</code> if a cluster group with the primary key could not be found
334             * @throws SystemException if a system exception occurred
335             */
336            public ClusterGroup fetchByPrimaryKey(long clusterGroupId)
337                    throws SystemException {
338                    ClusterGroup clusterGroup = (ClusterGroup)EntityCacheUtil.getResult(ClusterGroupModelImpl.ENTITY_CACHE_ENABLED,
339                                    ClusterGroupImpl.class, clusterGroupId, this);
340    
341                    if (clusterGroup == null) {
342                            Session session = null;
343    
344                            try {
345                                    session = openSession();
346    
347                                    clusterGroup = (ClusterGroup)session.get(ClusterGroupImpl.class,
348                                                    new Long(clusterGroupId));
349                            }
350                            catch (Exception e) {
351                                    throw processException(e);
352                            }
353                            finally {
354                                    if (clusterGroup != null) {
355                                            cacheResult(clusterGroup);
356                                    }
357    
358                                    closeSession(session);
359                            }
360                    }
361    
362                    return clusterGroup;
363            }
364    
365            /**
366             * Finds all the cluster groups.
367             *
368             * @return the cluster groups
369             * @throws SystemException if a system exception occurred
370             */
371            public List<ClusterGroup> findAll() throws SystemException {
372                    return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
373            }
374    
375            /**
376             * Finds a range of all the cluster groups.
377             *
378             * <p>
379             * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
380             * </p>
381             *
382             * @param start the lower bound of the range of cluster groups to return
383             * @param end the upper bound of the range of cluster groups to return (not inclusive)
384             * @return the range of cluster groups
385             * @throws SystemException if a system exception occurred
386             */
387            public List<ClusterGroup> findAll(int start, int end)
388                    throws SystemException {
389                    return findAll(start, end, null);
390            }
391    
392            /**
393             * Finds an ordered range of all the cluster groups.
394             *
395             * <p>
396             * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
397             * </p>
398             *
399             * @param start the lower bound of the range of cluster groups to return
400             * @param end the upper bound of the range of cluster groups to return (not inclusive)
401             * @param orderByComparator the comparator to order the results by
402             * @return the ordered range of cluster groups
403             * @throws SystemException if a system exception occurred
404             */
405            public List<ClusterGroup> findAll(int start, int end,
406                    OrderByComparator orderByComparator) throws SystemException {
407                    Object[] finderArgs = new Object[] {
408                                    String.valueOf(start), String.valueOf(end),
409                                    String.valueOf(orderByComparator)
410                            };
411    
412                    List<ClusterGroup> list = (List<ClusterGroup>)FinderCacheUtil.getResult(FINDER_PATH_FIND_ALL,
413                                    finderArgs, this);
414    
415                    if (list == null) {
416                            Session session = null;
417    
418                            try {
419                                    session = openSession();
420    
421                                    StringBundler query = null;
422                                    String sql = null;
423    
424                                    if (orderByComparator != null) {
425                                            query = new StringBundler(2 +
426                                                            (orderByComparator.getOrderByFields().length * 3));
427    
428                                            query.append(_SQL_SELECT_CLUSTERGROUP);
429    
430                                            appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS,
431                                                    orderByComparator);
432    
433                                            sql = query.toString();
434                                    }
435                                    else {
436                                            sql = _SQL_SELECT_CLUSTERGROUP;
437                                    }
438    
439                                    Query q = session.createQuery(sql);
440    
441                                    if (orderByComparator == null) {
442                                            list = (List<ClusterGroup>)QueryUtil.list(q, getDialect(),
443                                                            start, end, false);
444    
445                                            Collections.sort(list);
446                                    }
447                                    else {
448                                            list = (List<ClusterGroup>)QueryUtil.list(q, getDialect(),
449                                                            start, end);
450                                    }
451                            }
452                            catch (Exception e) {
453                                    throw processException(e);
454                            }
455                            finally {
456                                    if (list == null) {
457                                            list = new ArrayList<ClusterGroup>();
458                                    }
459    
460                                    cacheResult(list);
461    
462                                    FinderCacheUtil.putResult(FINDER_PATH_FIND_ALL, finderArgs, list);
463    
464                                    closeSession(session);
465                            }
466                    }
467    
468                    return list;
469            }
470    
471            /**
472             * Removes all the cluster groups from the database.
473             *
474             * @throws SystemException if a system exception occurred
475             */
476            public void removeAll() throws SystemException {
477                    for (ClusterGroup clusterGroup : findAll()) {
478                            remove(clusterGroup);
479                    }
480            }
481    
482            /**
483             * Counts all the cluster groups.
484             *
485             * @return the number of cluster groups
486             * @throws SystemException if a system exception occurred
487             */
488            public int countAll() throws SystemException {
489                    Object[] finderArgs = new Object[0];
490    
491                    Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_ALL,
492                                    finderArgs, this);
493    
494                    if (count == null) {
495                            Session session = null;
496    
497                            try {
498                                    session = openSession();
499    
500                                    Query q = session.createQuery(_SQL_COUNT_CLUSTERGROUP);
501    
502                                    count = (Long)q.uniqueResult();
503                            }
504                            catch (Exception e) {
505                                    throw processException(e);
506                            }
507                            finally {
508                                    if (count == null) {
509                                            count = Long.valueOf(0);
510                                    }
511    
512                                    FinderCacheUtil.putResult(FINDER_PATH_COUNT_ALL, finderArgs,
513                                            count);
514    
515                                    closeSession(session);
516                            }
517                    }
518    
519                    return count.intValue();
520            }
521    
522            /**
523             * Initializes the cluster group persistence.
524             */
525            public void afterPropertiesSet() {
526                    String[] listenerClassNames = StringUtil.split(GetterUtil.getString(
527                                            com.liferay.portal.util.PropsUtil.get(
528                                                    "value.object.listener.com.liferay.portal.model.ClusterGroup")));
529    
530                    if (listenerClassNames.length > 0) {
531                            try {
532                                    List<ModelListener<ClusterGroup>> listenersList = new ArrayList<ModelListener<ClusterGroup>>();
533    
534                                    for (String listenerClassName : listenerClassNames) {
535                                            listenersList.add((ModelListener<ClusterGroup>)InstanceFactory.newInstance(
536                                                            listenerClassName));
537                                    }
538    
539                                    listeners = listenersList.toArray(new ModelListener[listenersList.size()]);
540                            }
541                            catch (Exception e) {
542                                    _log.error(e);
543                            }
544                    }
545            }
546    
547            @BeanReference(type = AccountPersistence.class)
548            protected AccountPersistence accountPersistence;
549            @BeanReference(type = AddressPersistence.class)
550            protected AddressPersistence addressPersistence;
551            @BeanReference(type = BrowserTrackerPersistence.class)
552            protected BrowserTrackerPersistence browserTrackerPersistence;
553            @BeanReference(type = ClassNamePersistence.class)
554            protected ClassNamePersistence classNamePersistence;
555            @BeanReference(type = ClusterGroupPersistence.class)
556            protected ClusterGroupPersistence clusterGroupPersistence;
557            @BeanReference(type = CompanyPersistence.class)
558            protected CompanyPersistence companyPersistence;
559            @BeanReference(type = ContactPersistence.class)
560            protected ContactPersistence contactPersistence;
561            @BeanReference(type = CountryPersistence.class)
562            protected CountryPersistence countryPersistence;
563            @BeanReference(type = EmailAddressPersistence.class)
564            protected EmailAddressPersistence emailAddressPersistence;
565            @BeanReference(type = GroupPersistence.class)
566            protected GroupPersistence groupPersistence;
567            @BeanReference(type = ImagePersistence.class)
568            protected ImagePersistence imagePersistence;
569            @BeanReference(type = LayoutPersistence.class)
570            protected LayoutPersistence layoutPersistence;
571            @BeanReference(type = LayoutPrototypePersistence.class)
572            protected LayoutPrototypePersistence layoutPrototypePersistence;
573            @BeanReference(type = LayoutSetPersistence.class)
574            protected LayoutSetPersistence layoutSetPersistence;
575            @BeanReference(type = LayoutSetPrototypePersistence.class)
576            protected LayoutSetPrototypePersistence layoutSetPrototypePersistence;
577            @BeanReference(type = ListTypePersistence.class)
578            protected ListTypePersistence listTypePersistence;
579            @BeanReference(type = LockPersistence.class)
580            protected LockPersistence lockPersistence;
581            @BeanReference(type = MembershipRequestPersistence.class)
582            protected MembershipRequestPersistence membershipRequestPersistence;
583            @BeanReference(type = OrganizationPersistence.class)
584            protected OrganizationPersistence organizationPersistence;
585            @BeanReference(type = OrgGroupPermissionPersistence.class)
586            protected OrgGroupPermissionPersistence orgGroupPermissionPersistence;
587            @BeanReference(type = OrgGroupRolePersistence.class)
588            protected OrgGroupRolePersistence orgGroupRolePersistence;
589            @BeanReference(type = OrgLaborPersistence.class)
590            protected OrgLaborPersistence orgLaborPersistence;
591            @BeanReference(type = PasswordPolicyPersistence.class)
592            protected PasswordPolicyPersistence passwordPolicyPersistence;
593            @BeanReference(type = PasswordPolicyRelPersistence.class)
594            protected PasswordPolicyRelPersistence passwordPolicyRelPersistence;
595            @BeanReference(type = PasswordTrackerPersistence.class)
596            protected PasswordTrackerPersistence passwordTrackerPersistence;
597            @BeanReference(type = PermissionPersistence.class)
598            protected PermissionPersistence permissionPersistence;
599            @BeanReference(type = PhonePersistence.class)
600            protected PhonePersistence phonePersistence;
601            @BeanReference(type = PluginSettingPersistence.class)
602            protected PluginSettingPersistence pluginSettingPersistence;
603            @BeanReference(type = PortletPersistence.class)
604            protected PortletPersistence portletPersistence;
605            @BeanReference(type = PortletItemPersistence.class)
606            protected PortletItemPersistence portletItemPersistence;
607            @BeanReference(type = PortletPreferencesPersistence.class)
608            protected PortletPreferencesPersistence portletPreferencesPersistence;
609            @BeanReference(type = RegionPersistence.class)
610            protected RegionPersistence regionPersistence;
611            @BeanReference(type = ReleasePersistence.class)
612            protected ReleasePersistence releasePersistence;
613            @BeanReference(type = ResourcePersistence.class)
614            protected ResourcePersistence resourcePersistence;
615            @BeanReference(type = ResourceActionPersistence.class)
616            protected ResourceActionPersistence resourceActionPersistence;
617            @BeanReference(type = ResourceCodePersistence.class)
618            protected ResourceCodePersistence resourceCodePersistence;
619            @BeanReference(type = ResourcePermissionPersistence.class)
620            protected ResourcePermissionPersistence resourcePermissionPersistence;
621            @BeanReference(type = RolePersistence.class)
622            protected RolePersistence rolePersistence;
623            @BeanReference(type = ServiceComponentPersistence.class)
624            protected ServiceComponentPersistence serviceComponentPersistence;
625            @BeanReference(type = ShardPersistence.class)
626            protected ShardPersistence shardPersistence;
627            @BeanReference(type = SubscriptionPersistence.class)
628            protected SubscriptionPersistence subscriptionPersistence;
629            @BeanReference(type = TicketPersistence.class)
630            protected TicketPersistence ticketPersistence;
631            @BeanReference(type = TeamPersistence.class)
632            protected TeamPersistence teamPersistence;
633            @BeanReference(type = UserPersistence.class)
634            protected UserPersistence userPersistence;
635            @BeanReference(type = UserGroupPersistence.class)
636            protected UserGroupPersistence userGroupPersistence;
637            @BeanReference(type = UserGroupGroupRolePersistence.class)
638            protected UserGroupGroupRolePersistence userGroupGroupRolePersistence;
639            @BeanReference(type = UserGroupRolePersistence.class)
640            protected UserGroupRolePersistence userGroupRolePersistence;
641            @BeanReference(type = UserIdMapperPersistence.class)
642            protected UserIdMapperPersistence userIdMapperPersistence;
643            @BeanReference(type = UserTrackerPersistence.class)
644            protected UserTrackerPersistence userTrackerPersistence;
645            @BeanReference(type = UserTrackerPathPersistence.class)
646            protected UserTrackerPathPersistence userTrackerPathPersistence;
647            @BeanReference(type = WebDAVPropsPersistence.class)
648            protected WebDAVPropsPersistence webDAVPropsPersistence;
649            @BeanReference(type = WebsitePersistence.class)
650            protected WebsitePersistence websitePersistence;
651            @BeanReference(type = WorkflowDefinitionLinkPersistence.class)
652            protected WorkflowDefinitionLinkPersistence workflowDefinitionLinkPersistence;
653            @BeanReference(type = WorkflowInstanceLinkPersistence.class)
654            protected WorkflowInstanceLinkPersistence workflowInstanceLinkPersistence;
655            private static final String _SQL_SELECT_CLUSTERGROUP = "SELECT clusterGroup FROM ClusterGroup clusterGroup";
656            private static final String _SQL_COUNT_CLUSTERGROUP = "SELECT COUNT(clusterGroup) FROM ClusterGroup clusterGroup";
657            private static final String _ORDER_BY_ENTITY_ALIAS = "clusterGroup.";
658            private static final String _NO_SUCH_ENTITY_WITH_PRIMARY_KEY = "No ClusterGroup exists with the primary key ";
659            private static Log _log = LogFactoryUtil.getLog(ClusterGroupPersistenceImpl.class);
660    }