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_WITHOUT_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_WITH_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 Session session = null;
259
260 try {
261 session = openSession();
262
263 BatchSessionUtil.update(session, clusterGroup, merge);
264
265 clusterGroup.setNew(false);
266 }
267 catch (Exception e) {
268 throw processException(e);
269 }
270 finally {
271 closeSession(session);
272 }
273
274 FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
275
276 EntityCacheUtil.putResult(ClusterGroupModelImpl.ENTITY_CACHE_ENABLED,
277 ClusterGroupImpl.class, clusterGroup.getPrimaryKey(), clusterGroup);
278
279 return clusterGroup;
280 }
281
282 protected ClusterGroup toUnwrappedModel(ClusterGroup clusterGroup) {
283 if (clusterGroup instanceof ClusterGroupImpl) {
284 return clusterGroup;
285 }
286
287 ClusterGroupImpl clusterGroupImpl = new ClusterGroupImpl();
288
289 clusterGroupImpl.setNew(clusterGroup.isNew());
290 clusterGroupImpl.setPrimaryKey(clusterGroup.getPrimaryKey());
291
292 clusterGroupImpl.setClusterGroupId(clusterGroup.getClusterGroupId());
293 clusterGroupImpl.setName(clusterGroup.getName());
294 clusterGroupImpl.setClusterNodeIds(clusterGroup.getClusterNodeIds());
295 clusterGroupImpl.setWholeCluster(clusterGroup.isWholeCluster());
296
297 return clusterGroupImpl;
298 }
299
300
308 @Override
309 public ClusterGroup findByPrimaryKey(Serializable primaryKey)
310 throws NoSuchModelException, SystemException {
311 return findByPrimaryKey(((Long)primaryKey).longValue());
312 }
313
314
322 public ClusterGroup findByPrimaryKey(long clusterGroupId)
323 throws NoSuchClusterGroupException, SystemException {
324 ClusterGroup clusterGroup = fetchByPrimaryKey(clusterGroupId);
325
326 if (clusterGroup == null) {
327 if (_log.isWarnEnabled()) {
328 _log.warn(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + clusterGroupId);
329 }
330
331 throw new NoSuchClusterGroupException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY +
332 clusterGroupId);
333 }
334
335 return clusterGroup;
336 }
337
338
345 @Override
346 public ClusterGroup fetchByPrimaryKey(Serializable primaryKey)
347 throws SystemException {
348 return fetchByPrimaryKey(((Long)primaryKey).longValue());
349 }
350
351
358 public ClusterGroup fetchByPrimaryKey(long clusterGroupId)
359 throws SystemException {
360 ClusterGroup clusterGroup = (ClusterGroup)EntityCacheUtil.getResult(ClusterGroupModelImpl.ENTITY_CACHE_ENABLED,
361 ClusterGroupImpl.class, clusterGroupId);
362
363 if (clusterGroup == _nullClusterGroup) {
364 return null;
365 }
366
367 if (clusterGroup == null) {
368 Session session = null;
369
370 boolean hasException = false;
371
372 try {
373 session = openSession();
374
375 clusterGroup = (ClusterGroup)session.get(ClusterGroupImpl.class,
376 Long.valueOf(clusterGroupId));
377 }
378 catch (Exception e) {
379 hasException = true;
380
381 throw processException(e);
382 }
383 finally {
384 if (clusterGroup != null) {
385 cacheResult(clusterGroup);
386 }
387 else if (!hasException) {
388 EntityCacheUtil.putResult(ClusterGroupModelImpl.ENTITY_CACHE_ENABLED,
389 ClusterGroupImpl.class, clusterGroupId,
390 _nullClusterGroup);
391 }
392
393 closeSession(session);
394 }
395 }
396
397 return clusterGroup;
398 }
399
400
406 public List<ClusterGroup> findAll() throws SystemException {
407 return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
408 }
409
410
422 public List<ClusterGroup> findAll(int start, int end)
423 throws SystemException {
424 return findAll(start, end, null);
425 }
426
427
440 public List<ClusterGroup> findAll(int start, int end,
441 OrderByComparator orderByComparator) throws SystemException {
442 FinderPath finderPath = null;
443 Object[] finderArgs = new Object[] { start, end, orderByComparator };
444
445 if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) &&
446 (orderByComparator == null)) {
447 finderPath = FINDER_PATH_WITH_PAGINATION_FIND_ALL;
448 finderArgs = FINDER_ARGS_EMPTY;
449 }
450 else {
451 finderPath = FINDER_PATH_WITHOUT_PAGINATION_FIND_ALL;
452 finderArgs = new Object[] { start, end, orderByComparator };
453 }
454
455 List<ClusterGroup> list = (List<ClusterGroup>)FinderCacheUtil.getResult(finderPath,
456 finderArgs, this);
457
458 if (list == null) {
459 StringBundler query = null;
460 String sql = null;
461
462 if (orderByComparator != null) {
463 query = new StringBundler(2 +
464 (orderByComparator.getOrderByFields().length * 3));
465
466 query.append(_SQL_SELECT_CLUSTERGROUP);
467
468 appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS,
469 orderByComparator);
470
471 sql = query.toString();
472 }
473 else {
474 sql = _SQL_SELECT_CLUSTERGROUP;
475 }
476
477 Session session = null;
478
479 try {
480 session = openSession();
481
482 Query q = session.createQuery(sql);
483
484 if (orderByComparator == null) {
485 list = (List<ClusterGroup>)QueryUtil.list(q, getDialect(),
486 start, end, false);
487
488 Collections.sort(list);
489 }
490 else {
491 list = (List<ClusterGroup>)QueryUtil.list(q, getDialect(),
492 start, end);
493 }
494 }
495 catch (Exception e) {
496 throw processException(e);
497 }
498 finally {
499 if (list == null) {
500 FinderCacheUtil.removeResult(finderPath, finderArgs);
501 }
502 else {
503 cacheResult(list);
504
505 FinderCacheUtil.putResult(finderPath, finderArgs, list);
506 }
507
508 closeSession(session);
509 }
510 }
511
512 return list;
513 }
514
515
520 public void removeAll() throws SystemException {
521 for (ClusterGroup clusterGroup : findAll()) {
522 remove(clusterGroup);
523 }
524 }
525
526
532 public int countAll() throws SystemException {
533 Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_ALL,
534 FINDER_ARGS_EMPTY, this);
535
536 if (count == null) {
537 Session session = null;
538
539 try {
540 session = openSession();
541
542 Query q = session.createQuery(_SQL_COUNT_CLUSTERGROUP);
543
544 count = (Long)q.uniqueResult();
545 }
546 catch (Exception e) {
547 throw processException(e);
548 }
549 finally {
550 if (count == null) {
551 count = Long.valueOf(0);
552 }
553
554 FinderCacheUtil.putResult(FINDER_PATH_COUNT_ALL,
555 FINDER_ARGS_EMPTY, count);
556
557 closeSession(session);
558 }
559 }
560
561 return count.intValue();
562 }
563
564
567 public void afterPropertiesSet() {
568 String[] listenerClassNames = StringUtil.split(GetterUtil.getString(
569 com.liferay.portal.util.PropsUtil.get(
570 "value.object.listener.com.liferay.portal.model.ClusterGroup")));
571
572 if (listenerClassNames.length > 0) {
573 try {
574 List<ModelListener<ClusterGroup>> listenersList = new ArrayList<ModelListener<ClusterGroup>>();
575
576 for (String listenerClassName : listenerClassNames) {
577 listenersList.add((ModelListener<ClusterGroup>)InstanceFactory.newInstance(
578 listenerClassName));
579 }
580
581 listeners = listenersList.toArray(new ModelListener[listenersList.size()]);
582 }
583 catch (Exception e) {
584 _log.error(e);
585 }
586 }
587 }
588
589 public void destroy() {
590 EntityCacheUtil.removeCache(ClusterGroupImpl.class.getName());
591 FinderCacheUtil.removeCache(FINDER_CLASS_NAME_ENTITY);
592 FinderCacheUtil.removeCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
593 }
594
595 @BeanReference(type = AccountPersistence.class)
596 protected AccountPersistence accountPersistence;
597 @BeanReference(type = AddressPersistence.class)
598 protected AddressPersistence addressPersistence;
599 @BeanReference(type = BrowserTrackerPersistence.class)
600 protected BrowserTrackerPersistence browserTrackerPersistence;
601 @BeanReference(type = ClassNamePersistence.class)
602 protected ClassNamePersistence classNamePersistence;
603 @BeanReference(type = ClusterGroupPersistence.class)
604 protected ClusterGroupPersistence clusterGroupPersistence;
605 @BeanReference(type = CompanyPersistence.class)
606 protected CompanyPersistence companyPersistence;
607 @BeanReference(type = ContactPersistence.class)
608 protected ContactPersistence contactPersistence;
609 @BeanReference(type = CountryPersistence.class)
610 protected CountryPersistence countryPersistence;
611 @BeanReference(type = EmailAddressPersistence.class)
612 protected EmailAddressPersistence emailAddressPersistence;
613 @BeanReference(type = GroupPersistence.class)
614 protected GroupPersistence groupPersistence;
615 @BeanReference(type = ImagePersistence.class)
616 protected ImagePersistence imagePersistence;
617 @BeanReference(type = LayoutPersistence.class)
618 protected LayoutPersistence layoutPersistence;
619 @BeanReference(type = LayoutBranchPersistence.class)
620 protected LayoutBranchPersistence layoutBranchPersistence;
621 @BeanReference(type = LayoutPrototypePersistence.class)
622 protected LayoutPrototypePersistence layoutPrototypePersistence;
623 @BeanReference(type = LayoutRevisionPersistence.class)
624 protected LayoutRevisionPersistence layoutRevisionPersistence;
625 @BeanReference(type = LayoutSetPersistence.class)
626 protected LayoutSetPersistence layoutSetPersistence;
627 @BeanReference(type = LayoutSetBranchPersistence.class)
628 protected LayoutSetBranchPersistence layoutSetBranchPersistence;
629 @BeanReference(type = LayoutSetPrototypePersistence.class)
630 protected LayoutSetPrototypePersistence layoutSetPrototypePersistence;
631 @BeanReference(type = ListTypePersistence.class)
632 protected ListTypePersistence listTypePersistence;
633 @BeanReference(type = LockPersistence.class)
634 protected LockPersistence lockPersistence;
635 @BeanReference(type = MembershipRequestPersistence.class)
636 protected MembershipRequestPersistence membershipRequestPersistence;
637 @BeanReference(type = OrganizationPersistence.class)
638 protected OrganizationPersistence organizationPersistence;
639 @BeanReference(type = OrgGroupPermissionPersistence.class)
640 protected OrgGroupPermissionPersistence orgGroupPermissionPersistence;
641 @BeanReference(type = OrgGroupRolePersistence.class)
642 protected OrgGroupRolePersistence orgGroupRolePersistence;
643 @BeanReference(type = OrgLaborPersistence.class)
644 protected OrgLaborPersistence orgLaborPersistence;
645 @BeanReference(type = PasswordPolicyPersistence.class)
646 protected PasswordPolicyPersistence passwordPolicyPersistence;
647 @BeanReference(type = PasswordPolicyRelPersistence.class)
648 protected PasswordPolicyRelPersistence passwordPolicyRelPersistence;
649 @BeanReference(type = PasswordTrackerPersistence.class)
650 protected PasswordTrackerPersistence passwordTrackerPersistence;
651 @BeanReference(type = PermissionPersistence.class)
652 protected PermissionPersistence permissionPersistence;
653 @BeanReference(type = PhonePersistence.class)
654 protected PhonePersistence phonePersistence;
655 @BeanReference(type = PluginSettingPersistence.class)
656 protected PluginSettingPersistence pluginSettingPersistence;
657 @BeanReference(type = PortalPreferencesPersistence.class)
658 protected PortalPreferencesPersistence portalPreferencesPersistence;
659 @BeanReference(type = PortletPersistence.class)
660 protected PortletPersistence portletPersistence;
661 @BeanReference(type = PortletItemPersistence.class)
662 protected PortletItemPersistence portletItemPersistence;
663 @BeanReference(type = PortletPreferencesPersistence.class)
664 protected PortletPreferencesPersistence portletPreferencesPersistence;
665 @BeanReference(type = RegionPersistence.class)
666 protected RegionPersistence regionPersistence;
667 @BeanReference(type = ReleasePersistence.class)
668 protected ReleasePersistence releasePersistence;
669 @BeanReference(type = RepositoryPersistence.class)
670 protected RepositoryPersistence repositoryPersistence;
671 @BeanReference(type = RepositoryEntryPersistence.class)
672 protected RepositoryEntryPersistence repositoryEntryPersistence;
673 @BeanReference(type = ResourcePersistence.class)
674 protected ResourcePersistence resourcePersistence;
675 @BeanReference(type = ResourceActionPersistence.class)
676 protected ResourceActionPersistence resourceActionPersistence;
677 @BeanReference(type = ResourceBlockPersistence.class)
678 protected ResourceBlockPersistence resourceBlockPersistence;
679 @BeanReference(type = ResourceBlockPermissionPersistence.class)
680 protected ResourceBlockPermissionPersistence resourceBlockPermissionPersistence;
681 @BeanReference(type = ResourceCodePersistence.class)
682 protected ResourceCodePersistence resourceCodePersistence;
683 @BeanReference(type = ResourcePermissionPersistence.class)
684 protected ResourcePermissionPersistence resourcePermissionPersistence;
685 @BeanReference(type = ResourceTypePermissionPersistence.class)
686 protected ResourceTypePermissionPersistence resourceTypePermissionPersistence;
687 @BeanReference(type = RolePersistence.class)
688 protected RolePersistence rolePersistence;
689 @BeanReference(type = ServiceComponentPersistence.class)
690 protected ServiceComponentPersistence serviceComponentPersistence;
691 @BeanReference(type = ShardPersistence.class)
692 protected ShardPersistence shardPersistence;
693 @BeanReference(type = SubscriptionPersistence.class)
694 protected SubscriptionPersistence subscriptionPersistence;
695 @BeanReference(type = TeamPersistence.class)
696 protected TeamPersistence teamPersistence;
697 @BeanReference(type = TicketPersistence.class)
698 protected TicketPersistence ticketPersistence;
699 @BeanReference(type = UserPersistence.class)
700 protected UserPersistence userPersistence;
701 @BeanReference(type = UserGroupPersistence.class)
702 protected UserGroupPersistence userGroupPersistence;
703 @BeanReference(type = UserGroupGroupRolePersistence.class)
704 protected UserGroupGroupRolePersistence userGroupGroupRolePersistence;
705 @BeanReference(type = UserGroupRolePersistence.class)
706 protected UserGroupRolePersistence userGroupRolePersistence;
707 @BeanReference(type = UserIdMapperPersistence.class)
708 protected UserIdMapperPersistence userIdMapperPersistence;
709 @BeanReference(type = UserNotificationEventPersistence.class)
710 protected UserNotificationEventPersistence userNotificationEventPersistence;
711 @BeanReference(type = UserTrackerPersistence.class)
712 protected UserTrackerPersistence userTrackerPersistence;
713 @BeanReference(type = UserTrackerPathPersistence.class)
714 protected UserTrackerPathPersistence userTrackerPathPersistence;
715 @BeanReference(type = VirtualHostPersistence.class)
716 protected VirtualHostPersistence virtualHostPersistence;
717 @BeanReference(type = WebDAVPropsPersistence.class)
718 protected WebDAVPropsPersistence webDAVPropsPersistence;
719 @BeanReference(type = WebsitePersistence.class)
720 protected WebsitePersistence websitePersistence;
721 @BeanReference(type = WorkflowDefinitionLinkPersistence.class)
722 protected WorkflowDefinitionLinkPersistence workflowDefinitionLinkPersistence;
723 @BeanReference(type = WorkflowInstanceLinkPersistence.class)
724 protected WorkflowInstanceLinkPersistence workflowInstanceLinkPersistence;
725 private static final String _SQL_SELECT_CLUSTERGROUP = "SELECT clusterGroup FROM ClusterGroup clusterGroup";
726 private static final String _SQL_COUNT_CLUSTERGROUP = "SELECT COUNT(clusterGroup) FROM ClusterGroup clusterGroup";
727 private static final String _ORDER_BY_ENTITY_ALIAS = "clusterGroup.";
728 private static final String _NO_SUCH_ENTITY_WITH_PRIMARY_KEY = "No ClusterGroup exists with the primary key ";
729 private static final boolean _HIBERNATE_CACHE_USE_SECOND_LEVEL_CACHE = com.liferay.portal.util.PropsValues.HIBERNATE_CACHE_USE_SECOND_LEVEL_CACHE;
730 private static Log _log = LogFactoryUtil.getLog(ClusterGroupPersistenceImpl.class);
731 private static ClusterGroup _nullClusterGroup = new ClusterGroupImpl() {
732 @Override
733 public Object clone() {
734 return this;
735 }
736
737 @Override
738 public CacheModel<ClusterGroup> toCacheModel() {
739 return _nullClusterGroupCacheModel;
740 }
741 };
742
743 private static CacheModel<ClusterGroup> _nullClusterGroupCacheModel = new CacheModel<ClusterGroup>() {
744 public ClusterGroup toEntityModel() {
745 return _nullClusterGroup;
746 }
747 };
748 }