001
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.bean.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.CacheModel;
036 import com.liferay.portal.model.ClusterGroup;
037 import com.liferay.portal.model.ModelListener;
038 import com.liferay.portal.model.impl.ClusterGroupImpl;
039 import com.liferay.portal.model.impl.ClusterGroupModelImpl;
040 import com.liferay.portal.service.persistence.impl.BasePersistenceImpl;
041
042 import java.io.Serializable;
043
044 import java.util.ArrayList;
045 import java.util.Collections;
046 import java.util.List;
047
048
060 public class ClusterGroupPersistenceImpl extends BasePersistenceImpl<ClusterGroup>
061 implements ClusterGroupPersistence {
062
067 public static final String FINDER_CLASS_NAME_ENTITY = ClusterGroupImpl.class.getName();
068 public static final String FINDER_CLASS_NAME_LIST_WITH_PAGINATION = FINDER_CLASS_NAME_ENTITY +
069 ".List1";
070 public static final String FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION = FINDER_CLASS_NAME_ENTITY +
071 ".List2";
072 public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_ALL = new FinderPath(ClusterGroupModelImpl.ENTITY_CACHE_ENABLED,
073 ClusterGroupModelImpl.FINDER_CACHE_ENABLED, ClusterGroupImpl.class,
074 FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findAll", new String[0]);
075 public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_ALL = new FinderPath(ClusterGroupModelImpl.ENTITY_CACHE_ENABLED,
076 ClusterGroupModelImpl.FINDER_CACHE_ENABLED, ClusterGroupImpl.class,
077 FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findAll", new String[0]);
078 public static final FinderPath FINDER_PATH_COUNT_ALL = new FinderPath(ClusterGroupModelImpl.ENTITY_CACHE_ENABLED,
079 ClusterGroupModelImpl.FINDER_CACHE_ENABLED, Long.class,
080 FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countAll", new String[0]);
081
082
087 public void cacheResult(ClusterGroup clusterGroup) {
088 EntityCacheUtil.putResult(ClusterGroupModelImpl.ENTITY_CACHE_ENABLED,
089 ClusterGroupImpl.class, clusterGroup.getPrimaryKey(), clusterGroup);
090
091 clusterGroup.resetOriginalValues();
092 }
093
094
099 public void cacheResult(List<ClusterGroup> clusterGroups) {
100 for (ClusterGroup clusterGroup : clusterGroups) {
101 if (EntityCacheUtil.getResult(
102 ClusterGroupModelImpl.ENTITY_CACHE_ENABLED,
103 ClusterGroupImpl.class, clusterGroup.getPrimaryKey()) == null) {
104 cacheResult(clusterGroup);
105 }
106 else {
107 clusterGroup.resetOriginalValues();
108 }
109 }
110 }
111
112
119 @Override
120 public void clearCache() {
121 if (_HIBERNATE_CACHE_USE_SECOND_LEVEL_CACHE) {
122 CacheRegistryUtil.clear(ClusterGroupImpl.class.getName());
123 }
124
125 EntityCacheUtil.clearCache(ClusterGroupImpl.class.getName());
126
127 FinderCacheUtil.clearCache(FINDER_CLASS_NAME_ENTITY);
128 FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
129 FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
130 }
131
132
139 @Override
140 public void clearCache(ClusterGroup clusterGroup) {
141 EntityCacheUtil.removeResult(ClusterGroupModelImpl.ENTITY_CACHE_ENABLED,
142 ClusterGroupImpl.class, clusterGroup.getPrimaryKey());
143
144 FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
145 FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
146 }
147
148 @Override
149 public void clearCache(List<ClusterGroup> clusterGroups) {
150 FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
151 FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
152
153 for (ClusterGroup clusterGroup : clusterGroups) {
154 EntityCacheUtil.removeResult(ClusterGroupModelImpl.ENTITY_CACHE_ENABLED,
155 ClusterGroupImpl.class, clusterGroup.getPrimaryKey());
156 }
157 }
158
159
165 public ClusterGroup create(long clusterGroupId) {
166 ClusterGroup clusterGroup = new ClusterGroupImpl();
167
168 clusterGroup.setNew(true);
169 clusterGroup.setPrimaryKey(clusterGroupId);
170
171 return clusterGroup;
172 }
173
174
182 public ClusterGroup remove(long clusterGroupId)
183 throws NoSuchClusterGroupException, SystemException {
184 return remove(Long.valueOf(clusterGroupId));
185 }
186
187
195 @Override
196 public ClusterGroup remove(Serializable primaryKey)
197 throws NoSuchClusterGroupException, SystemException {
198 Session session = null;
199
200 try {
201 session = openSession();
202
203 ClusterGroup clusterGroup = (ClusterGroup)session.get(ClusterGroupImpl.class,
204 primaryKey);
205
206 if (clusterGroup == null) {
207 if (_log.isWarnEnabled()) {
208 _log.warn(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey);
209 }
210
211 throw new NoSuchClusterGroupException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY +
212 primaryKey);
213 }
214
215 return remove(clusterGroup);
216 }
217 catch (NoSuchClusterGroupException nsee) {
218 throw nsee;
219 }
220 catch (Exception e) {
221 throw processException(e);
222 }
223 finally {
224 closeSession(session);
225 }
226 }
227
228 @Override
229 protected ClusterGroup removeImpl(ClusterGroup clusterGroup)
230 throws SystemException {
231 clusterGroup = toUnwrappedModel(clusterGroup);
232
233 Session session = null;
234
235 try {
236 session = openSession();
237
238 BatchSessionUtil.delete(session, clusterGroup);
239 }
240 catch (Exception e) {
241 throw processException(e);
242 }
243 finally {
244 closeSession(session);
245 }
246
247 clearCache(clusterGroup);
248
249 return clusterGroup;
250 }
251
252 @Override
253 public ClusterGroup updateImpl(
254 com.liferay.portal.model.ClusterGroup clusterGroup, boolean merge)
255 throws SystemException {
256 clusterGroup = toUnwrappedModel(clusterGroup);
257
258 boolean isNew = clusterGroup.isNew();
259
260 Session session = null;
261
262 try {
263 session = openSession();
264
265 BatchSessionUtil.update(session, clusterGroup, merge);
266
267 clusterGroup.setNew(false);
268 }
269 catch (Exception e) {
270 throw processException(e);
271 }
272 finally {
273 closeSession(session);
274 }
275
276 FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
277
278 if (isNew) {
279 FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
280 }
281
282 EntityCacheUtil.putResult(ClusterGroupModelImpl.ENTITY_CACHE_ENABLED,
283 ClusterGroupImpl.class, clusterGroup.getPrimaryKey(), clusterGroup);
284
285 return clusterGroup;
286 }
287
288 protected ClusterGroup toUnwrappedModel(ClusterGroup clusterGroup) {
289 if (clusterGroup instanceof ClusterGroupImpl) {
290 return clusterGroup;
291 }
292
293 ClusterGroupImpl clusterGroupImpl = new ClusterGroupImpl();
294
295 clusterGroupImpl.setNew(clusterGroup.isNew());
296 clusterGroupImpl.setPrimaryKey(clusterGroup.getPrimaryKey());
297
298 clusterGroupImpl.setClusterGroupId(clusterGroup.getClusterGroupId());
299 clusterGroupImpl.setName(clusterGroup.getName());
300 clusterGroupImpl.setClusterNodeIds(clusterGroup.getClusterNodeIds());
301 clusterGroupImpl.setWholeCluster(clusterGroup.isWholeCluster());
302
303 return clusterGroupImpl;
304 }
305
306
314 @Override
315 public ClusterGroup findByPrimaryKey(Serializable primaryKey)
316 throws NoSuchModelException, SystemException {
317 return findByPrimaryKey(((Long)primaryKey).longValue());
318 }
319
320
328 public ClusterGroup findByPrimaryKey(long clusterGroupId)
329 throws NoSuchClusterGroupException, SystemException {
330 ClusterGroup clusterGroup = fetchByPrimaryKey(clusterGroupId);
331
332 if (clusterGroup == null) {
333 if (_log.isWarnEnabled()) {
334 _log.warn(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + clusterGroupId);
335 }
336
337 throw new NoSuchClusterGroupException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY +
338 clusterGroupId);
339 }
340
341 return clusterGroup;
342 }
343
344
351 @Override
352 public ClusterGroup fetchByPrimaryKey(Serializable primaryKey)
353 throws SystemException {
354 return fetchByPrimaryKey(((Long)primaryKey).longValue());
355 }
356
357
364 public ClusterGroup fetchByPrimaryKey(long clusterGroupId)
365 throws SystemException {
366 ClusterGroup clusterGroup = (ClusterGroup)EntityCacheUtil.getResult(ClusterGroupModelImpl.ENTITY_CACHE_ENABLED,
367 ClusterGroupImpl.class, clusterGroupId);
368
369 if (clusterGroup == _nullClusterGroup) {
370 return null;
371 }
372
373 if (clusterGroup == null) {
374 Session session = null;
375
376 boolean hasException = false;
377
378 try {
379 session = openSession();
380
381 clusterGroup = (ClusterGroup)session.get(ClusterGroupImpl.class,
382 Long.valueOf(clusterGroupId));
383 }
384 catch (Exception e) {
385 hasException = true;
386
387 throw processException(e);
388 }
389 finally {
390 if (clusterGroup != null) {
391 cacheResult(clusterGroup);
392 }
393 else if (!hasException) {
394 EntityCacheUtil.putResult(ClusterGroupModelImpl.ENTITY_CACHE_ENABLED,
395 ClusterGroupImpl.class, clusterGroupId,
396 _nullClusterGroup);
397 }
398
399 closeSession(session);
400 }
401 }
402
403 return clusterGroup;
404 }
405
406
412 public List<ClusterGroup> findAll() throws SystemException {
413 return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
414 }
415
416
428 public List<ClusterGroup> findAll(int start, int end)
429 throws SystemException {
430 return findAll(start, end, null);
431 }
432
433
446 public List<ClusterGroup> findAll(int start, int end,
447 OrderByComparator orderByComparator) throws SystemException {
448 FinderPath finderPath = null;
449 Object[] finderArgs = new Object[] { start, end, orderByComparator };
450
451 if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) &&
452 (orderByComparator == null)) {
453 finderPath = FINDER_PATH_WITHOUT_PAGINATION_FIND_ALL;
454 finderArgs = FINDER_ARGS_EMPTY;
455 }
456 else {
457 finderPath = FINDER_PATH_WITH_PAGINATION_FIND_ALL;
458 finderArgs = new Object[] { start, end, orderByComparator };
459 }
460
461 List<ClusterGroup> list = (List<ClusterGroup>)FinderCacheUtil.getResult(finderPath,
462 finderArgs, this);
463
464 if (list == null) {
465 StringBundler query = null;
466 String sql = null;
467
468 if (orderByComparator != null) {
469 query = new StringBundler(2 +
470 (orderByComparator.getOrderByFields().length * 3));
471
472 query.append(_SQL_SELECT_CLUSTERGROUP);
473
474 appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS,
475 orderByComparator);
476
477 sql = query.toString();
478 }
479 else {
480 sql = _SQL_SELECT_CLUSTERGROUP;
481 }
482
483 Session session = null;
484
485 try {
486 session = openSession();
487
488 Query q = session.createQuery(sql);
489
490 if (orderByComparator == null) {
491 list = (List<ClusterGroup>)QueryUtil.list(q, getDialect(),
492 start, end, false);
493
494 Collections.sort(list);
495 }
496 else {
497 list = (List<ClusterGroup>)QueryUtil.list(q, getDialect(),
498 start, end);
499 }
500 }
501 catch (Exception e) {
502 throw processException(e);
503 }
504 finally {
505 if (list == null) {
506 FinderCacheUtil.removeResult(finderPath, finderArgs);
507 }
508 else {
509 cacheResult(list);
510
511 FinderCacheUtil.putResult(finderPath, finderArgs, list);
512 }
513
514 closeSession(session);
515 }
516 }
517
518 return list;
519 }
520
521
526 public void removeAll() throws SystemException {
527 for (ClusterGroup clusterGroup : findAll()) {
528 remove(clusterGroup);
529 }
530 }
531
532
538 public int countAll() throws SystemException {
539 Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_ALL,
540 FINDER_ARGS_EMPTY, this);
541
542 if (count == null) {
543 Session session = null;
544
545 try {
546 session = openSession();
547
548 Query q = session.createQuery(_SQL_COUNT_CLUSTERGROUP);
549
550 count = (Long)q.uniqueResult();
551 }
552 catch (Exception e) {
553 throw processException(e);
554 }
555 finally {
556 if (count == null) {
557 count = Long.valueOf(0);
558 }
559
560 FinderCacheUtil.putResult(FINDER_PATH_COUNT_ALL,
561 FINDER_ARGS_EMPTY, count);
562
563 closeSession(session);
564 }
565 }
566
567 return count.intValue();
568 }
569
570
573 public void afterPropertiesSet() {
574 String[] listenerClassNames = StringUtil.split(GetterUtil.getString(
575 com.liferay.portal.util.PropsUtil.get(
576 "value.object.listener.com.liferay.portal.model.ClusterGroup")));
577
578 if (listenerClassNames.length > 0) {
579 try {
580 List<ModelListener<ClusterGroup>> listenersList = new ArrayList<ModelListener<ClusterGroup>>();
581
582 for (String listenerClassName : listenerClassNames) {
583 Class<?> clazz = getClass();
584
585 listenersList.add((ModelListener<ClusterGroup>)InstanceFactory.newInstance(
586 clazz.getClassLoader(), listenerClassName));
587 }
588
589 listeners = listenersList.toArray(new ModelListener[listenersList.size()]);
590 }
591 catch (Exception e) {
592 _log.error(e);
593 }
594 }
595 }
596
597 public void destroy() {
598 EntityCacheUtil.removeCache(ClusterGroupImpl.class.getName());
599 FinderCacheUtil.removeCache(FINDER_CLASS_NAME_ENTITY);
600 FinderCacheUtil.removeCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
601 }
602
603 @BeanReference(type = AccountPersistence.class)
604 protected AccountPersistence accountPersistence;
605 @BeanReference(type = AddressPersistence.class)
606 protected AddressPersistence addressPersistence;
607 @BeanReference(type = BrowserTrackerPersistence.class)
608 protected BrowserTrackerPersistence browserTrackerPersistence;
609 @BeanReference(type = ClassNamePersistence.class)
610 protected ClassNamePersistence classNamePersistence;
611 @BeanReference(type = ClusterGroupPersistence.class)
612 protected ClusterGroupPersistence clusterGroupPersistence;
613 @BeanReference(type = CompanyPersistence.class)
614 protected CompanyPersistence companyPersistence;
615 @BeanReference(type = ContactPersistence.class)
616 protected ContactPersistence contactPersistence;
617 @BeanReference(type = CountryPersistence.class)
618 protected CountryPersistence countryPersistence;
619 @BeanReference(type = EmailAddressPersistence.class)
620 protected EmailAddressPersistence emailAddressPersistence;
621 @BeanReference(type = GroupPersistence.class)
622 protected GroupPersistence groupPersistence;
623 @BeanReference(type = ImagePersistence.class)
624 protected ImagePersistence imagePersistence;
625 @BeanReference(type = LayoutPersistence.class)
626 protected LayoutPersistence layoutPersistence;
627 @BeanReference(type = LayoutBranchPersistence.class)
628 protected LayoutBranchPersistence layoutBranchPersistence;
629 @BeanReference(type = LayoutPrototypePersistence.class)
630 protected LayoutPrototypePersistence layoutPrototypePersistence;
631 @BeanReference(type = LayoutRevisionPersistence.class)
632 protected LayoutRevisionPersistence layoutRevisionPersistence;
633 @BeanReference(type = LayoutSetPersistence.class)
634 protected LayoutSetPersistence layoutSetPersistence;
635 @BeanReference(type = LayoutSetBranchPersistence.class)
636 protected LayoutSetBranchPersistence layoutSetBranchPersistence;
637 @BeanReference(type = LayoutSetPrototypePersistence.class)
638 protected LayoutSetPrototypePersistence layoutSetPrototypePersistence;
639 @BeanReference(type = ListTypePersistence.class)
640 protected ListTypePersistence listTypePersistence;
641 @BeanReference(type = LockPersistence.class)
642 protected LockPersistence lockPersistence;
643 @BeanReference(type = MembershipRequestPersistence.class)
644 protected MembershipRequestPersistence membershipRequestPersistence;
645 @BeanReference(type = OrganizationPersistence.class)
646 protected OrganizationPersistence organizationPersistence;
647 @BeanReference(type = OrgGroupPermissionPersistence.class)
648 protected OrgGroupPermissionPersistence orgGroupPermissionPersistence;
649 @BeanReference(type = OrgGroupRolePersistence.class)
650 protected OrgGroupRolePersistence orgGroupRolePersistence;
651 @BeanReference(type = OrgLaborPersistence.class)
652 protected OrgLaborPersistence orgLaborPersistence;
653 @BeanReference(type = PasswordPolicyPersistence.class)
654 protected PasswordPolicyPersistence passwordPolicyPersistence;
655 @BeanReference(type = PasswordPolicyRelPersistence.class)
656 protected PasswordPolicyRelPersistence passwordPolicyRelPersistence;
657 @BeanReference(type = PasswordTrackerPersistence.class)
658 protected PasswordTrackerPersistence passwordTrackerPersistence;
659 @BeanReference(type = PermissionPersistence.class)
660 protected PermissionPersistence permissionPersistence;
661 @BeanReference(type = PhonePersistence.class)
662 protected PhonePersistence phonePersistence;
663 @BeanReference(type = PluginSettingPersistence.class)
664 protected PluginSettingPersistence pluginSettingPersistence;
665 @BeanReference(type = PortalPreferencesPersistence.class)
666 protected PortalPreferencesPersistence portalPreferencesPersistence;
667 @BeanReference(type = PortletPersistence.class)
668 protected PortletPersistence portletPersistence;
669 @BeanReference(type = PortletItemPersistence.class)
670 protected PortletItemPersistence portletItemPersistence;
671 @BeanReference(type = PortletPreferencesPersistence.class)
672 protected PortletPreferencesPersistence portletPreferencesPersistence;
673 @BeanReference(type = RegionPersistence.class)
674 protected RegionPersistence regionPersistence;
675 @BeanReference(type = ReleasePersistence.class)
676 protected ReleasePersistence releasePersistence;
677 @BeanReference(type = RepositoryPersistence.class)
678 protected RepositoryPersistence repositoryPersistence;
679 @BeanReference(type = RepositoryEntryPersistence.class)
680 protected RepositoryEntryPersistence repositoryEntryPersistence;
681 @BeanReference(type = ResourcePersistence.class)
682 protected ResourcePersistence resourcePersistence;
683 @BeanReference(type = ResourceActionPersistence.class)
684 protected ResourceActionPersistence resourceActionPersistence;
685 @BeanReference(type = ResourceBlockPersistence.class)
686 protected ResourceBlockPersistence resourceBlockPersistence;
687 @BeanReference(type = ResourceBlockPermissionPersistence.class)
688 protected ResourceBlockPermissionPersistence resourceBlockPermissionPersistence;
689 @BeanReference(type = ResourceCodePersistence.class)
690 protected ResourceCodePersistence resourceCodePersistence;
691 @BeanReference(type = ResourcePermissionPersistence.class)
692 protected ResourcePermissionPersistence resourcePermissionPersistence;
693 @BeanReference(type = ResourceTypePermissionPersistence.class)
694 protected ResourceTypePermissionPersistence resourceTypePermissionPersistence;
695 @BeanReference(type = RolePersistence.class)
696 protected RolePersistence rolePersistence;
697 @BeanReference(type = ServiceComponentPersistence.class)
698 protected ServiceComponentPersistence serviceComponentPersistence;
699 @BeanReference(type = ShardPersistence.class)
700 protected ShardPersistence shardPersistence;
701 @BeanReference(type = SubscriptionPersistence.class)
702 protected SubscriptionPersistence subscriptionPersistence;
703 @BeanReference(type = TeamPersistence.class)
704 protected TeamPersistence teamPersistence;
705 @BeanReference(type = TicketPersistence.class)
706 protected TicketPersistence ticketPersistence;
707 @BeanReference(type = UserPersistence.class)
708 protected UserPersistence userPersistence;
709 @BeanReference(type = UserGroupPersistence.class)
710 protected UserGroupPersistence userGroupPersistence;
711 @BeanReference(type = UserGroupGroupRolePersistence.class)
712 protected UserGroupGroupRolePersistence userGroupGroupRolePersistence;
713 @BeanReference(type = UserGroupRolePersistence.class)
714 protected UserGroupRolePersistence userGroupRolePersistence;
715 @BeanReference(type = UserIdMapperPersistence.class)
716 protected UserIdMapperPersistence userIdMapperPersistence;
717 @BeanReference(type = UserNotificationEventPersistence.class)
718 protected UserNotificationEventPersistence userNotificationEventPersistence;
719 @BeanReference(type = UserTrackerPersistence.class)
720 protected UserTrackerPersistence userTrackerPersistence;
721 @BeanReference(type = UserTrackerPathPersistence.class)
722 protected UserTrackerPathPersistence userTrackerPathPersistence;
723 @BeanReference(type = VirtualHostPersistence.class)
724 protected VirtualHostPersistence virtualHostPersistence;
725 @BeanReference(type = WebDAVPropsPersistence.class)
726 protected WebDAVPropsPersistence webDAVPropsPersistence;
727 @BeanReference(type = WebsitePersistence.class)
728 protected WebsitePersistence websitePersistence;
729 @BeanReference(type = WorkflowDefinitionLinkPersistence.class)
730 protected WorkflowDefinitionLinkPersistence workflowDefinitionLinkPersistence;
731 @BeanReference(type = WorkflowInstanceLinkPersistence.class)
732 protected WorkflowInstanceLinkPersistence workflowInstanceLinkPersistence;
733 private static final String _SQL_SELECT_CLUSTERGROUP = "SELECT clusterGroup FROM ClusterGroup clusterGroup";
734 private static final String _SQL_COUNT_CLUSTERGROUP = "SELECT COUNT(clusterGroup) FROM ClusterGroup clusterGroup";
735 private static final String _ORDER_BY_ENTITY_ALIAS = "clusterGroup.";
736 private static final String _NO_SUCH_ENTITY_WITH_PRIMARY_KEY = "No ClusterGroup exists with the primary key ";
737 private static final boolean _HIBERNATE_CACHE_USE_SECOND_LEVEL_CACHE = com.liferay.portal.util.PropsValues.HIBERNATE_CACHE_USE_SECOND_LEVEL_CACHE;
738 private static Log _log = LogFactoryUtil.getLog(ClusterGroupPersistenceImpl.class);
739 private static ClusterGroup _nullClusterGroup = new ClusterGroupImpl() {
740 @Override
741 public Object clone() {
742 return this;
743 }
744
745 @Override
746 public CacheModel<ClusterGroup> toCacheModel() {
747 return _nullClusterGroupCacheModel;
748 }
749 };
750
751 private static CacheModel<ClusterGroup> _nullClusterGroupCacheModel = new CacheModel<ClusterGroup>() {
752 public ClusterGroup toEntityModel() {
753 return _nullClusterGroup;
754 }
755 };
756 }