001    /**
002     * Copyright (c) 2000-2011 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                            BatchSessionUtil.delete(session, clusterGroup);
206                    }
207                    catch (Exception e) {
208                            throw processException(e);
209                    }
210                    finally {
211                            closeSession(session);
212                    }
213    
214                    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST);
215    
216                    EntityCacheUtil.removeResult(ClusterGroupModelImpl.ENTITY_CACHE_ENABLED,
217                            ClusterGroupImpl.class, clusterGroup.getPrimaryKey());
218    
219                    return clusterGroup;
220            }
221    
222            public ClusterGroup updateImpl(
223                    com.liferay.portal.model.ClusterGroup clusterGroup, boolean merge)
224                    throws SystemException {
225                    clusterGroup = toUnwrappedModel(clusterGroup);
226    
227                    Session session = null;
228    
229                    try {
230                            session = openSession();
231    
232                            BatchSessionUtil.update(session, clusterGroup, merge);
233    
234                            clusterGroup.setNew(false);
235                    }
236                    catch (Exception e) {
237                            throw processException(e);
238                    }
239                    finally {
240                            closeSession(session);
241                    }
242    
243                    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST);
244    
245                    EntityCacheUtil.putResult(ClusterGroupModelImpl.ENTITY_CACHE_ENABLED,
246                            ClusterGroupImpl.class, clusterGroup.getPrimaryKey(), clusterGroup);
247    
248                    return clusterGroup;
249            }
250    
251            protected ClusterGroup toUnwrappedModel(ClusterGroup clusterGroup) {
252                    if (clusterGroup instanceof ClusterGroupImpl) {
253                            return clusterGroup;
254                    }
255    
256                    ClusterGroupImpl clusterGroupImpl = new ClusterGroupImpl();
257    
258                    clusterGroupImpl.setNew(clusterGroup.isNew());
259                    clusterGroupImpl.setPrimaryKey(clusterGroup.getPrimaryKey());
260    
261                    clusterGroupImpl.setClusterGroupId(clusterGroup.getClusterGroupId());
262                    clusterGroupImpl.setName(clusterGroup.getName());
263                    clusterGroupImpl.setClusterNodeIds(clusterGroup.getClusterNodeIds());
264                    clusterGroupImpl.setWholeCluster(clusterGroup.isWholeCluster());
265    
266                    return clusterGroupImpl;
267            }
268    
269            /**
270             * Finds the cluster group with the primary key or throws a {@link com.liferay.portal.NoSuchModelException} if it could not be found.
271             *
272             * @param primaryKey the primary key of the cluster group to find
273             * @return the cluster group
274             * @throws com.liferay.portal.NoSuchModelException if a cluster group with the primary key could not be found
275             * @throws SystemException if a system exception occurred
276             */
277            public ClusterGroup findByPrimaryKey(Serializable primaryKey)
278                    throws NoSuchModelException, SystemException {
279                    return findByPrimaryKey(((Long)primaryKey).longValue());
280            }
281    
282            /**
283             * Finds the cluster group with the primary key or throws a {@link com.liferay.portal.NoSuchClusterGroupException} if it could not be found.
284             *
285             * @param clusterGroupId the primary key of the cluster group to find
286             * @return the cluster group
287             * @throws com.liferay.portal.NoSuchClusterGroupException if a cluster group with the primary key could not be found
288             * @throws SystemException if a system exception occurred
289             */
290            public ClusterGroup findByPrimaryKey(long clusterGroupId)
291                    throws NoSuchClusterGroupException, SystemException {
292                    ClusterGroup clusterGroup = fetchByPrimaryKey(clusterGroupId);
293    
294                    if (clusterGroup == null) {
295                            if (_log.isWarnEnabled()) {
296                                    _log.warn(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + clusterGroupId);
297                            }
298    
299                            throw new NoSuchClusterGroupException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY +
300                                    clusterGroupId);
301                    }
302    
303                    return clusterGroup;
304            }
305    
306            /**
307             * Finds the cluster group with the primary key or returns <code>null</code> if it could not be found.
308             *
309             * @param primaryKey the primary key of the cluster group to find
310             * @return the cluster group, or <code>null</code> if a cluster group with the primary key could not be found
311             * @throws SystemException if a system exception occurred
312             */
313            public ClusterGroup fetchByPrimaryKey(Serializable primaryKey)
314                    throws SystemException {
315                    return fetchByPrimaryKey(((Long)primaryKey).longValue());
316            }
317    
318            /**
319             * Finds the cluster group with the primary key or returns <code>null</code> if it could not be found.
320             *
321             * @param clusterGroupId the primary key of the cluster group to find
322             * @return the cluster group, or <code>null</code> if a cluster group with the primary key could not be found
323             * @throws SystemException if a system exception occurred
324             */
325            public ClusterGroup fetchByPrimaryKey(long clusterGroupId)
326                    throws SystemException {
327                    ClusterGroup clusterGroup = (ClusterGroup)EntityCacheUtil.getResult(ClusterGroupModelImpl.ENTITY_CACHE_ENABLED,
328                                    ClusterGroupImpl.class, clusterGroupId, this);
329    
330                    if (clusterGroup == null) {
331                            Session session = null;
332    
333                            try {
334                                    session = openSession();
335    
336                                    clusterGroup = (ClusterGroup)session.get(ClusterGroupImpl.class,
337                                                    new Long(clusterGroupId));
338                            }
339                            catch (Exception e) {
340                                    throw processException(e);
341                            }
342                            finally {
343                                    if (clusterGroup != null) {
344                                            cacheResult(clusterGroup);
345                                    }
346    
347                                    closeSession(session);
348                            }
349                    }
350    
351                    return clusterGroup;
352            }
353    
354            /**
355             * Finds all the cluster groups.
356             *
357             * @return the cluster groups
358             * @throws SystemException if a system exception occurred
359             */
360            public List<ClusterGroup> findAll() throws SystemException {
361                    return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
362            }
363    
364            /**
365             * Finds a range of all the cluster groups.
366             *
367             * <p>
368             * 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.
369             * </p>
370             *
371             * @param start the lower bound of the range of cluster groups to return
372             * @param end the upper bound of the range of cluster groups to return (not inclusive)
373             * @return the range of cluster groups
374             * @throws SystemException if a system exception occurred
375             */
376            public List<ClusterGroup> findAll(int start, int end)
377                    throws SystemException {
378                    return findAll(start, end, null);
379            }
380    
381            /**
382             * Finds an ordered range of all the cluster groups.
383             *
384             * <p>
385             * 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.
386             * </p>
387             *
388             * @param start the lower bound of the range of cluster groups to return
389             * @param end the upper bound of the range of cluster groups to return (not inclusive)
390             * @param orderByComparator the comparator to order the results by
391             * @return the ordered range of cluster groups
392             * @throws SystemException if a system exception occurred
393             */
394            public List<ClusterGroup> findAll(int start, int end,
395                    OrderByComparator orderByComparator) throws SystemException {
396                    Object[] finderArgs = new Object[] {
397                                    String.valueOf(start), String.valueOf(end),
398                                    String.valueOf(orderByComparator)
399                            };
400    
401                    List<ClusterGroup> list = (List<ClusterGroup>)FinderCacheUtil.getResult(FINDER_PATH_FIND_ALL,
402                                    finderArgs, this);
403    
404                    if (list == null) {
405                            StringBundler query = null;
406                            String sql = null;
407    
408                            if (orderByComparator != null) {
409                                    query = new StringBundler(2 +
410                                                    (orderByComparator.getOrderByFields().length * 3));
411    
412                                    query.append(_SQL_SELECT_CLUSTERGROUP);
413    
414                                    appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS,
415                                            orderByComparator);
416    
417                                    sql = query.toString();
418                            }
419                            else {
420                                    sql = _SQL_SELECT_CLUSTERGROUP;
421                            }
422    
423                            Session session = null;
424    
425                            try {
426                                    session = openSession();
427    
428                                    Query q = session.createQuery(sql);
429    
430                                    if (orderByComparator == null) {
431                                            list = (List<ClusterGroup>)QueryUtil.list(q, getDialect(),
432                                                            start, end, false);
433    
434                                            Collections.sort(list);
435                                    }
436                                    else {
437                                            list = (List<ClusterGroup>)QueryUtil.list(q, getDialect(),
438                                                            start, end);
439                                    }
440                            }
441                            catch (Exception e) {
442                                    throw processException(e);
443                            }
444                            finally {
445                                    if (list == null) {
446                                            FinderCacheUtil.removeResult(FINDER_PATH_FIND_ALL,
447                                                    finderArgs);
448                                    }
449                                    else {
450                                            cacheResult(list);
451    
452                                            FinderCacheUtil.putResult(FINDER_PATH_FIND_ALL, finderArgs,
453                                                    list);
454                                    }
455    
456                                    closeSession(session);
457                            }
458                    }
459    
460                    return list;
461            }
462    
463            /**
464             * Removes all the cluster groups from the database.
465             *
466             * @throws SystemException if a system exception occurred
467             */
468            public void removeAll() throws SystemException {
469                    for (ClusterGroup clusterGroup : findAll()) {
470                            remove(clusterGroup);
471                    }
472            }
473    
474            /**
475             * Counts all the cluster groups.
476             *
477             * @return the number of cluster groups
478             * @throws SystemException if a system exception occurred
479             */
480            public int countAll() throws SystemException {
481                    Object[] finderArgs = new Object[0];
482    
483                    Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_ALL,
484                                    finderArgs, this);
485    
486                    if (count == null) {
487                            Session session = null;
488    
489                            try {
490                                    session = openSession();
491    
492                                    Query q = session.createQuery(_SQL_COUNT_CLUSTERGROUP);
493    
494                                    count = (Long)q.uniqueResult();
495                            }
496                            catch (Exception e) {
497                                    throw processException(e);
498                            }
499                            finally {
500                                    if (count == null) {
501                                            count = Long.valueOf(0);
502                                    }
503    
504                                    FinderCacheUtil.putResult(FINDER_PATH_COUNT_ALL, finderArgs,
505                                            count);
506    
507                                    closeSession(session);
508                            }
509                    }
510    
511                    return count.intValue();
512            }
513    
514            /**
515             * Initializes the cluster group persistence.
516             */
517            public void afterPropertiesSet() {
518                    String[] listenerClassNames = StringUtil.split(GetterUtil.getString(
519                                            com.liferay.portal.util.PropsUtil.get(
520                                                    "value.object.listener.com.liferay.portal.model.ClusterGroup")));
521    
522                    if (listenerClassNames.length > 0) {
523                            try {
524                                    List<ModelListener<ClusterGroup>> listenersList = new ArrayList<ModelListener<ClusterGroup>>();
525    
526                                    for (String listenerClassName : listenerClassNames) {
527                                            listenersList.add((ModelListener<ClusterGroup>)InstanceFactory.newInstance(
528                                                            listenerClassName));
529                                    }
530    
531                                    listeners = listenersList.toArray(new ModelListener[listenersList.size()]);
532                            }
533                            catch (Exception e) {
534                                    _log.error(e);
535                            }
536                    }
537            }
538    
539            public void destroy() {
540                    EntityCacheUtil.removeCache(ClusterGroupImpl.class.getName());
541                    FinderCacheUtil.removeCache(FINDER_CLASS_NAME_ENTITY);
542                    FinderCacheUtil.removeCache(FINDER_CLASS_NAME_LIST);
543            }
544    
545            @BeanReference(type = AccountPersistence.class)
546            protected AccountPersistence accountPersistence;
547            @BeanReference(type = AddressPersistence.class)
548            protected AddressPersistence addressPersistence;
549            @BeanReference(type = BrowserTrackerPersistence.class)
550            protected BrowserTrackerPersistence browserTrackerPersistence;
551            @BeanReference(type = ClassNamePersistence.class)
552            protected ClassNamePersistence classNamePersistence;
553            @BeanReference(type = ClusterGroupPersistence.class)
554            protected ClusterGroupPersistence clusterGroupPersistence;
555            @BeanReference(type = CompanyPersistence.class)
556            protected CompanyPersistence companyPersistence;
557            @BeanReference(type = ContactPersistence.class)
558            protected ContactPersistence contactPersistence;
559            @BeanReference(type = CountryPersistence.class)
560            protected CountryPersistence countryPersistence;
561            @BeanReference(type = EmailAddressPersistence.class)
562            protected EmailAddressPersistence emailAddressPersistence;
563            @BeanReference(type = GroupPersistence.class)
564            protected GroupPersistence groupPersistence;
565            @BeanReference(type = ImagePersistence.class)
566            protected ImagePersistence imagePersistence;
567            @BeanReference(type = LayoutPersistence.class)
568            protected LayoutPersistence layoutPersistence;
569            @BeanReference(type = LayoutPrototypePersistence.class)
570            protected LayoutPrototypePersistence layoutPrototypePersistence;
571            @BeanReference(type = LayoutSetPersistence.class)
572            protected LayoutSetPersistence layoutSetPersistence;
573            @BeanReference(type = LayoutSetPrototypePersistence.class)
574            protected LayoutSetPrototypePersistence layoutSetPrototypePersistence;
575            @BeanReference(type = ListTypePersistence.class)
576            protected ListTypePersistence listTypePersistence;
577            @BeanReference(type = LockPersistence.class)
578            protected LockPersistence lockPersistence;
579            @BeanReference(type = MembershipRequestPersistence.class)
580            protected MembershipRequestPersistence membershipRequestPersistence;
581            @BeanReference(type = OrganizationPersistence.class)
582            protected OrganizationPersistence organizationPersistence;
583            @BeanReference(type = OrgGroupPermissionPersistence.class)
584            protected OrgGroupPermissionPersistence orgGroupPermissionPersistence;
585            @BeanReference(type = OrgGroupRolePersistence.class)
586            protected OrgGroupRolePersistence orgGroupRolePersistence;
587            @BeanReference(type = OrgLaborPersistence.class)
588            protected OrgLaborPersistence orgLaborPersistence;
589            @BeanReference(type = PasswordPolicyPersistence.class)
590            protected PasswordPolicyPersistence passwordPolicyPersistence;
591            @BeanReference(type = PasswordPolicyRelPersistence.class)
592            protected PasswordPolicyRelPersistence passwordPolicyRelPersistence;
593            @BeanReference(type = PasswordTrackerPersistence.class)
594            protected PasswordTrackerPersistence passwordTrackerPersistence;
595            @BeanReference(type = PermissionPersistence.class)
596            protected PermissionPersistence permissionPersistence;
597            @BeanReference(type = PhonePersistence.class)
598            protected PhonePersistence phonePersistence;
599            @BeanReference(type = PluginSettingPersistence.class)
600            protected PluginSettingPersistence pluginSettingPersistence;
601            @BeanReference(type = PortletPersistence.class)
602            protected PortletPersistence portletPersistence;
603            @BeanReference(type = PortletItemPersistence.class)
604            protected PortletItemPersistence portletItemPersistence;
605            @BeanReference(type = PortletPreferencesPersistence.class)
606            protected PortletPreferencesPersistence portletPreferencesPersistence;
607            @BeanReference(type = RegionPersistence.class)
608            protected RegionPersistence regionPersistence;
609            @BeanReference(type = ReleasePersistence.class)
610            protected ReleasePersistence releasePersistence;
611            @BeanReference(type = ResourcePersistence.class)
612            protected ResourcePersistence resourcePersistence;
613            @BeanReference(type = ResourceActionPersistence.class)
614            protected ResourceActionPersistence resourceActionPersistence;
615            @BeanReference(type = ResourceCodePersistence.class)
616            protected ResourceCodePersistence resourceCodePersistence;
617            @BeanReference(type = ResourcePermissionPersistence.class)
618            protected ResourcePermissionPersistence resourcePermissionPersistence;
619            @BeanReference(type = RolePersistence.class)
620            protected RolePersistence rolePersistence;
621            @BeanReference(type = ServiceComponentPersistence.class)
622            protected ServiceComponentPersistence serviceComponentPersistence;
623            @BeanReference(type = ShardPersistence.class)
624            protected ShardPersistence shardPersistence;
625            @BeanReference(type = SubscriptionPersistence.class)
626            protected SubscriptionPersistence subscriptionPersistence;
627            @BeanReference(type = TicketPersistence.class)
628            protected TicketPersistence ticketPersistence;
629            @BeanReference(type = TeamPersistence.class)
630            protected TeamPersistence teamPersistence;
631            @BeanReference(type = UserPersistence.class)
632            protected UserPersistence userPersistence;
633            @BeanReference(type = UserGroupPersistence.class)
634            protected UserGroupPersistence userGroupPersistence;
635            @BeanReference(type = UserGroupGroupRolePersistence.class)
636            protected UserGroupGroupRolePersistence userGroupGroupRolePersistence;
637            @BeanReference(type = UserGroupRolePersistence.class)
638            protected UserGroupRolePersistence userGroupRolePersistence;
639            @BeanReference(type = UserIdMapperPersistence.class)
640            protected UserIdMapperPersistence userIdMapperPersistence;
641            @BeanReference(type = UserTrackerPersistence.class)
642            protected UserTrackerPersistence userTrackerPersistence;
643            @BeanReference(type = UserTrackerPathPersistence.class)
644            protected UserTrackerPathPersistence userTrackerPathPersistence;
645            @BeanReference(type = WebDAVPropsPersistence.class)
646            protected WebDAVPropsPersistence webDAVPropsPersistence;
647            @BeanReference(type = WebsitePersistence.class)
648            protected WebsitePersistence websitePersistence;
649            @BeanReference(type = WorkflowDefinitionLinkPersistence.class)
650            protected WorkflowDefinitionLinkPersistence workflowDefinitionLinkPersistence;
651            @BeanReference(type = WorkflowInstanceLinkPersistence.class)
652            protected WorkflowInstanceLinkPersistence workflowInstanceLinkPersistence;
653            private static final String _SQL_SELECT_CLUSTERGROUP = "SELECT clusterGroup FROM ClusterGroup clusterGroup";
654            private static final String _SQL_COUNT_CLUSTERGROUP = "SELECT COUNT(clusterGroup) FROM ClusterGroup clusterGroup";
655            private static final String _ORDER_BY_ENTITY_ALIAS = "clusterGroup.";
656            private static final String _NO_SUCH_ENTITY_WITH_PRIMARY_KEY = "No ClusterGroup exists with the primary key ";
657            private static Log _log = LogFactoryUtil.getLog(ClusterGroupPersistenceImpl.class);
658    }