1
22
23 package com.liferay.portal.service.persistence;
24
25 import com.liferay.portal.NoSuchLayoutSetException;
26 import com.liferay.portal.NoSuchModelException;
27 import com.liferay.portal.SystemException;
28 import com.liferay.portal.kernel.annotation.BeanReference;
29 import com.liferay.portal.kernel.cache.CacheRegistry;
30 import com.liferay.portal.kernel.dao.orm.DynamicQuery;
31 import com.liferay.portal.kernel.dao.orm.EntityCacheUtil;
32 import com.liferay.portal.kernel.dao.orm.FinderCacheUtil;
33 import com.liferay.portal.kernel.dao.orm.FinderPath;
34 import com.liferay.portal.kernel.dao.orm.Query;
35 import com.liferay.portal.kernel.dao.orm.QueryPos;
36 import com.liferay.portal.kernel.dao.orm.QueryUtil;
37 import com.liferay.portal.kernel.dao.orm.Session;
38 import com.liferay.portal.kernel.log.Log;
39 import com.liferay.portal.kernel.log.LogFactoryUtil;
40 import com.liferay.portal.kernel.util.GetterUtil;
41 import com.liferay.portal.kernel.util.OrderByComparator;
42 import com.liferay.portal.kernel.util.StringBundler;
43 import com.liferay.portal.kernel.util.StringPool;
44 import com.liferay.portal.kernel.util.StringUtil;
45 import com.liferay.portal.kernel.util.Validator;
46 import com.liferay.portal.model.LayoutSet;
47 import com.liferay.portal.model.ModelListener;
48 import com.liferay.portal.model.impl.LayoutSetImpl;
49 import com.liferay.portal.model.impl.LayoutSetModelImpl;
50 import com.liferay.portal.service.persistence.impl.BasePersistenceImpl;
51
52 import java.io.Serializable;
53
54 import java.util.ArrayList;
55 import java.util.Collections;
56 import java.util.List;
57
58
71 public class LayoutSetPersistenceImpl extends BasePersistenceImpl<LayoutSet>
72 implements LayoutSetPersistence {
73 public static final String FINDER_CLASS_NAME_ENTITY = LayoutSetImpl.class.getName();
74 public static final String FINDER_CLASS_NAME_LIST = FINDER_CLASS_NAME_ENTITY +
75 ".List";
76 public static final FinderPath FINDER_PATH_FIND_BY_GROUPID = new FinderPath(LayoutSetModelImpl.ENTITY_CACHE_ENABLED,
77 LayoutSetModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
78 "findByGroupId", new String[] { Long.class.getName() });
79 public static final FinderPath FINDER_PATH_FIND_BY_OBC_GROUPID = new FinderPath(LayoutSetModelImpl.ENTITY_CACHE_ENABLED,
80 LayoutSetModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
81 "findByGroupId",
82 new String[] {
83 Long.class.getName(),
84
85 "java.lang.Integer", "java.lang.Integer",
86 "com.liferay.portal.kernel.util.OrderByComparator"
87 });
88 public static final FinderPath FINDER_PATH_COUNT_BY_GROUPID = new FinderPath(LayoutSetModelImpl.ENTITY_CACHE_ENABLED,
89 LayoutSetModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
90 "countByGroupId", new String[] { Long.class.getName() });
91 public static final FinderPath FINDER_PATH_FETCH_BY_VIRTUALHOST = new FinderPath(LayoutSetModelImpl.ENTITY_CACHE_ENABLED,
92 LayoutSetModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_ENTITY,
93 "fetchByVirtualHost", new String[] { String.class.getName() });
94 public static final FinderPath FINDER_PATH_COUNT_BY_VIRTUALHOST = new FinderPath(LayoutSetModelImpl.ENTITY_CACHE_ENABLED,
95 LayoutSetModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
96 "countByVirtualHost", new String[] { String.class.getName() });
97 public static final FinderPath FINDER_PATH_FETCH_BY_G_P = new FinderPath(LayoutSetModelImpl.ENTITY_CACHE_ENABLED,
98 LayoutSetModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_ENTITY,
99 "fetchByG_P",
100 new String[] { Long.class.getName(), Boolean.class.getName() });
101 public static final FinderPath FINDER_PATH_COUNT_BY_G_P = new FinderPath(LayoutSetModelImpl.ENTITY_CACHE_ENABLED,
102 LayoutSetModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
103 "countByG_P",
104 new String[] { Long.class.getName(), Boolean.class.getName() });
105 public static final FinderPath FINDER_PATH_FIND_ALL = new FinderPath(LayoutSetModelImpl.ENTITY_CACHE_ENABLED,
106 LayoutSetModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
107 "findAll", new String[0]);
108 public static final FinderPath FINDER_PATH_COUNT_ALL = new FinderPath(LayoutSetModelImpl.ENTITY_CACHE_ENABLED,
109 LayoutSetModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
110 "countAll", new String[0]);
111
112 public void cacheResult(LayoutSet layoutSet) {
113 EntityCacheUtil.putResult(LayoutSetModelImpl.ENTITY_CACHE_ENABLED,
114 LayoutSetImpl.class, layoutSet.getPrimaryKey(), layoutSet);
115
116 FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_VIRTUALHOST,
117 new Object[] { layoutSet.getVirtualHost() }, layoutSet);
118
119 FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_G_P,
120 new Object[] {
121 new Long(layoutSet.getGroupId()),
122 Boolean.valueOf(layoutSet.getPrivateLayout())
123 }, layoutSet);
124 }
125
126 public void cacheResult(List<LayoutSet> layoutSets) {
127 for (LayoutSet layoutSet : layoutSets) {
128 if (EntityCacheUtil.getResult(
129 LayoutSetModelImpl.ENTITY_CACHE_ENABLED,
130 LayoutSetImpl.class, layoutSet.getPrimaryKey(), this) == null) {
131 cacheResult(layoutSet);
132 }
133 }
134 }
135
136 public void clearCache() {
137 CacheRegistry.clear(LayoutSetImpl.class.getName());
138 EntityCacheUtil.clearCache(LayoutSetImpl.class.getName());
139 FinderCacheUtil.clearCache(FINDER_CLASS_NAME_ENTITY);
140 FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST);
141 }
142
143 public LayoutSet create(long layoutSetId) {
144 LayoutSet layoutSet = new LayoutSetImpl();
145
146 layoutSet.setNew(true);
147 layoutSet.setPrimaryKey(layoutSetId);
148
149 return layoutSet;
150 }
151
152 public LayoutSet remove(Serializable primaryKey)
153 throws NoSuchModelException, SystemException {
154 return remove(((Long)primaryKey).longValue());
155 }
156
157 public LayoutSet remove(long layoutSetId)
158 throws NoSuchLayoutSetException, SystemException {
159 Session session = null;
160
161 try {
162 session = openSession();
163
164 LayoutSet layoutSet = (LayoutSet)session.get(LayoutSetImpl.class,
165 new Long(layoutSetId));
166
167 if (layoutSet == null) {
168 if (_log.isWarnEnabled()) {
169 _log.warn(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + layoutSetId);
170 }
171
172 throw new NoSuchLayoutSetException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY +
173 layoutSetId);
174 }
175
176 return remove(layoutSet);
177 }
178 catch (NoSuchLayoutSetException nsee) {
179 throw nsee;
180 }
181 catch (Exception e) {
182 throw processException(e);
183 }
184 finally {
185 closeSession(session);
186 }
187 }
188
189 public LayoutSet remove(LayoutSet layoutSet) throws SystemException {
190 for (ModelListener<LayoutSet> listener : listeners) {
191 listener.onBeforeRemove(layoutSet);
192 }
193
194 layoutSet = removeImpl(layoutSet);
195
196 for (ModelListener<LayoutSet> listener : listeners) {
197 listener.onAfterRemove(layoutSet);
198 }
199
200 return layoutSet;
201 }
202
203 protected LayoutSet removeImpl(LayoutSet layoutSet)
204 throws SystemException {
205 layoutSet = toUnwrappedModel(layoutSet);
206
207 Session session = null;
208
209 try {
210 session = openSession();
211
212 if (layoutSet.isCachedModel() || BatchSessionUtil.isEnabled()) {
213 Object staleObject = session.get(LayoutSetImpl.class,
214 layoutSet.getPrimaryKeyObj());
215
216 if (staleObject != null) {
217 session.evict(staleObject);
218 }
219 }
220
221 session.delete(layoutSet);
222
223 session.flush();
224 }
225 catch (Exception e) {
226 throw processException(e);
227 }
228 finally {
229 closeSession(session);
230 }
231
232 FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST);
233
234 LayoutSetModelImpl layoutSetModelImpl = (LayoutSetModelImpl)layoutSet;
235
236 FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_VIRTUALHOST,
237 new Object[] { layoutSetModelImpl.getOriginalVirtualHost() });
238
239 FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_G_P,
240 new Object[] {
241 new Long(layoutSetModelImpl.getOriginalGroupId()),
242 Boolean.valueOf(layoutSetModelImpl.getOriginalPrivateLayout())
243 });
244
245 EntityCacheUtil.removeResult(LayoutSetModelImpl.ENTITY_CACHE_ENABLED,
246 LayoutSetImpl.class, layoutSet.getPrimaryKey());
247
248 return layoutSet;
249 }
250
251
254 public LayoutSet update(LayoutSet layoutSet) throws SystemException {
255 if (_log.isWarnEnabled()) {
256 _log.warn(
257 "Using the deprecated update(LayoutSet layoutSet) method. Use update(LayoutSet layoutSet, boolean merge) instead.");
258 }
259
260 return update(layoutSet, false);
261 }
262
263 public LayoutSet updateImpl(com.liferay.portal.model.LayoutSet layoutSet,
264 boolean merge) throws SystemException {
265 layoutSet = toUnwrappedModel(layoutSet);
266
267 boolean isNew = layoutSet.isNew();
268
269 LayoutSetModelImpl layoutSetModelImpl = (LayoutSetModelImpl)layoutSet;
270
271 Session session = null;
272
273 try {
274 session = openSession();
275
276 BatchSessionUtil.update(session, layoutSet, merge);
277
278 layoutSet.setNew(false);
279 }
280 catch (Exception e) {
281 throw processException(e);
282 }
283 finally {
284 closeSession(session);
285 }
286
287 FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST);
288
289 EntityCacheUtil.putResult(LayoutSetModelImpl.ENTITY_CACHE_ENABLED,
290 LayoutSetImpl.class, layoutSet.getPrimaryKey(), layoutSet);
291
292 if (!isNew &&
293 (!Validator.equals(layoutSet.getVirtualHost(),
294 layoutSetModelImpl.getOriginalVirtualHost()))) {
295 FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_VIRTUALHOST,
296 new Object[] { layoutSetModelImpl.getOriginalVirtualHost() });
297 }
298
299 if (isNew ||
300 (!Validator.equals(layoutSet.getVirtualHost(),
301 layoutSetModelImpl.getOriginalVirtualHost()))) {
302 FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_VIRTUALHOST,
303 new Object[] { layoutSet.getVirtualHost() }, layoutSet);
304 }
305
306 if (!isNew &&
307 ((layoutSet.getGroupId() != layoutSetModelImpl.getOriginalGroupId()) ||
308 (layoutSet.getPrivateLayout() != layoutSetModelImpl.getOriginalPrivateLayout()))) {
309 FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_G_P,
310 new Object[] {
311 new Long(layoutSetModelImpl.getOriginalGroupId()),
312 Boolean.valueOf(
313 layoutSetModelImpl.getOriginalPrivateLayout())
314 });
315 }
316
317 if (isNew ||
318 ((layoutSet.getGroupId() != layoutSetModelImpl.getOriginalGroupId()) ||
319 (layoutSet.getPrivateLayout() != layoutSetModelImpl.getOriginalPrivateLayout()))) {
320 FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_G_P,
321 new Object[] {
322 new Long(layoutSet.getGroupId()),
323 Boolean.valueOf(layoutSet.getPrivateLayout())
324 }, layoutSet);
325 }
326
327 return layoutSet;
328 }
329
330 protected LayoutSet toUnwrappedModel(LayoutSet layoutSet) {
331 if (layoutSet instanceof LayoutSetImpl) {
332 return layoutSet;
333 }
334
335 LayoutSetImpl layoutSetImpl = new LayoutSetImpl();
336
337 layoutSetImpl.setNew(layoutSet.isNew());
338 layoutSetImpl.setPrimaryKey(layoutSet.getPrimaryKey());
339
340 layoutSetImpl.setLayoutSetId(layoutSet.getLayoutSetId());
341 layoutSetImpl.setGroupId(layoutSet.getGroupId());
342 layoutSetImpl.setCompanyId(layoutSet.getCompanyId());
343 layoutSetImpl.setPrivateLayout(layoutSet.isPrivateLayout());
344 layoutSetImpl.setLogo(layoutSet.isLogo());
345 layoutSetImpl.setLogoId(layoutSet.getLogoId());
346 layoutSetImpl.setThemeId(layoutSet.getThemeId());
347 layoutSetImpl.setColorSchemeId(layoutSet.getColorSchemeId());
348 layoutSetImpl.setWapThemeId(layoutSet.getWapThemeId());
349 layoutSetImpl.setWapColorSchemeId(layoutSet.getWapColorSchemeId());
350 layoutSetImpl.setCss(layoutSet.getCss());
351 layoutSetImpl.setPageCount(layoutSet.getPageCount());
352 layoutSetImpl.setVirtualHost(layoutSet.getVirtualHost());
353
354 return layoutSetImpl;
355 }
356
357 public LayoutSet findByPrimaryKey(Serializable primaryKey)
358 throws NoSuchModelException, SystemException {
359 return findByPrimaryKey(((Long)primaryKey).longValue());
360 }
361
362 public LayoutSet findByPrimaryKey(long layoutSetId)
363 throws NoSuchLayoutSetException, SystemException {
364 LayoutSet layoutSet = fetchByPrimaryKey(layoutSetId);
365
366 if (layoutSet == null) {
367 if (_log.isWarnEnabled()) {
368 _log.warn(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + layoutSetId);
369 }
370
371 throw new NoSuchLayoutSetException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY +
372 layoutSetId);
373 }
374
375 return layoutSet;
376 }
377
378 public LayoutSet fetchByPrimaryKey(Serializable primaryKey)
379 throws SystemException {
380 return fetchByPrimaryKey(((Long)primaryKey).longValue());
381 }
382
383 public LayoutSet fetchByPrimaryKey(long layoutSetId)
384 throws SystemException {
385 LayoutSet layoutSet = (LayoutSet)EntityCacheUtil.getResult(LayoutSetModelImpl.ENTITY_CACHE_ENABLED,
386 LayoutSetImpl.class, layoutSetId, this);
387
388 if (layoutSet == null) {
389 Session session = null;
390
391 try {
392 session = openSession();
393
394 layoutSet = (LayoutSet)session.get(LayoutSetImpl.class,
395 new Long(layoutSetId));
396 }
397 catch (Exception e) {
398 throw processException(e);
399 }
400 finally {
401 if (layoutSet != null) {
402 cacheResult(layoutSet);
403 }
404
405 closeSession(session);
406 }
407 }
408
409 return layoutSet;
410 }
411
412 public List<LayoutSet> findByGroupId(long groupId)
413 throws SystemException {
414 Object[] finderArgs = new Object[] { new Long(groupId) };
415
416 List<LayoutSet> list = (List<LayoutSet>)FinderCacheUtil.getResult(FINDER_PATH_FIND_BY_GROUPID,
417 finderArgs, this);
418
419 if (list == null) {
420 Session session = null;
421
422 try {
423 session = openSession();
424
425 StringBundler query = new StringBundler(2);
426
427 query.append(_SQL_SELECT_LAYOUTSET_WHERE);
428
429 query.append(_FINDER_COLUMN_GROUPID_GROUPID_2);
430
431 String sql = query.toString();
432
433 Query q = session.createQuery(sql);
434
435 QueryPos qPos = QueryPos.getInstance(q);
436
437 qPos.add(groupId);
438
439 list = q.list();
440 }
441 catch (Exception e) {
442 throw processException(e);
443 }
444 finally {
445 if (list == null) {
446 list = new ArrayList<LayoutSet>();
447 }
448
449 cacheResult(list);
450
451 FinderCacheUtil.putResult(FINDER_PATH_FIND_BY_GROUPID,
452 finderArgs, list);
453
454 closeSession(session);
455 }
456 }
457
458 return list;
459 }
460
461 public List<LayoutSet> findByGroupId(long groupId, int start, int end)
462 throws SystemException {
463 return findByGroupId(groupId, start, end, null);
464 }
465
466 public List<LayoutSet> findByGroupId(long groupId, int start, int end,
467 OrderByComparator obc) throws SystemException {
468 Object[] finderArgs = new Object[] {
469 new Long(groupId),
470
471 String.valueOf(start), String.valueOf(end), String.valueOf(obc)
472 };
473
474 List<LayoutSet> list = (List<LayoutSet>)FinderCacheUtil.getResult(FINDER_PATH_FIND_BY_OBC_GROUPID,
475 finderArgs, this);
476
477 if (list == null) {
478 Session session = null;
479
480 try {
481 session = openSession();
482
483 StringBundler query = null;
484
485 if (obc != null) {
486 query = new StringBundler(3 +
487 (obc.getOrderByFields().length * 3));
488 }
489 else {
490 query = new StringBundler(2);
491 }
492
493 query.append(_SQL_SELECT_LAYOUTSET_WHERE);
494
495 query.append(_FINDER_COLUMN_GROUPID_GROUPID_2);
496
497 if (obc != null) {
498 appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, obc);
499 }
500
501 String sql = query.toString();
502
503 Query q = session.createQuery(sql);
504
505 QueryPos qPos = QueryPos.getInstance(q);
506
507 qPos.add(groupId);
508
509 list = (List<LayoutSet>)QueryUtil.list(q, getDialect(), start,
510 end);
511 }
512 catch (Exception e) {
513 throw processException(e);
514 }
515 finally {
516 if (list == null) {
517 list = new ArrayList<LayoutSet>();
518 }
519
520 cacheResult(list);
521
522 FinderCacheUtil.putResult(FINDER_PATH_FIND_BY_OBC_GROUPID,
523 finderArgs, list);
524
525 closeSession(session);
526 }
527 }
528
529 return list;
530 }
531
532 public LayoutSet findByGroupId_First(long groupId, OrderByComparator obc)
533 throws NoSuchLayoutSetException, SystemException {
534 List<LayoutSet> list = findByGroupId(groupId, 0, 1, obc);
535
536 if (list.isEmpty()) {
537 StringBundler msg = new StringBundler(4);
538
539 msg.append(_NO_SUCH_ENTITY_WITH_KEY);
540
541 msg.append("groupId=");
542 msg.append(groupId);
543
544 msg.append(StringPool.CLOSE_CURLY_BRACE);
545
546 throw new NoSuchLayoutSetException(msg.toString());
547 }
548 else {
549 return list.get(0);
550 }
551 }
552
553 public LayoutSet findByGroupId_Last(long groupId, OrderByComparator obc)
554 throws NoSuchLayoutSetException, SystemException {
555 int count = countByGroupId(groupId);
556
557 List<LayoutSet> list = findByGroupId(groupId, count - 1, count, obc);
558
559 if (list.isEmpty()) {
560 StringBundler msg = new StringBundler(4);
561
562 msg.append(_NO_SUCH_ENTITY_WITH_KEY);
563
564 msg.append("groupId=");
565 msg.append(groupId);
566
567 msg.append(StringPool.CLOSE_CURLY_BRACE);
568
569 throw new NoSuchLayoutSetException(msg.toString());
570 }
571 else {
572 return list.get(0);
573 }
574 }
575
576 public LayoutSet[] findByGroupId_PrevAndNext(long layoutSetId,
577 long groupId, OrderByComparator obc)
578 throws NoSuchLayoutSetException, SystemException {
579 LayoutSet layoutSet = findByPrimaryKey(layoutSetId);
580
581 int count = countByGroupId(groupId);
582
583 Session session = null;
584
585 try {
586 session = openSession();
587
588 StringBundler query = null;
589
590 if (obc != null) {
591 query = new StringBundler(3 +
592 (obc.getOrderByFields().length * 3));
593 }
594 else {
595 query = new StringBundler(2);
596 }
597
598 query.append(_SQL_SELECT_LAYOUTSET_WHERE);
599
600 query.append(_FINDER_COLUMN_GROUPID_GROUPID_2);
601
602 if (obc != null) {
603 appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, obc);
604 }
605
606 String sql = query.toString();
607
608 Query q = session.createQuery(sql);
609
610 QueryPos qPos = QueryPos.getInstance(q);
611
612 qPos.add(groupId);
613
614 Object[] objArray = QueryUtil.getPrevAndNext(q, count, obc,
615 layoutSet);
616
617 LayoutSet[] array = new LayoutSetImpl[3];
618
619 array[0] = (LayoutSet)objArray[0];
620 array[1] = (LayoutSet)objArray[1];
621 array[2] = (LayoutSet)objArray[2];
622
623 return array;
624 }
625 catch (Exception e) {
626 throw processException(e);
627 }
628 finally {
629 closeSession(session);
630 }
631 }
632
633 public LayoutSet findByVirtualHost(String virtualHost)
634 throws NoSuchLayoutSetException, SystemException {
635 LayoutSet layoutSet = fetchByVirtualHost(virtualHost);
636
637 if (layoutSet == null) {
638 StringBundler msg = new StringBundler(4);
639
640 msg.append(_NO_SUCH_ENTITY_WITH_KEY);
641
642 msg.append("virtualHost=");
643 msg.append(virtualHost);
644
645 msg.append(StringPool.CLOSE_CURLY_BRACE);
646
647 if (_log.isWarnEnabled()) {
648 _log.warn(msg.toString());
649 }
650
651 throw new NoSuchLayoutSetException(msg.toString());
652 }
653
654 return layoutSet;
655 }
656
657 public LayoutSet fetchByVirtualHost(String virtualHost)
658 throws SystemException {
659 return fetchByVirtualHost(virtualHost, true);
660 }
661
662 public LayoutSet fetchByVirtualHost(String virtualHost,
663 boolean retrieveFromCache) throws SystemException {
664 Object[] finderArgs = new Object[] { virtualHost };
665
666 Object result = null;
667
668 if (retrieveFromCache) {
669 result = FinderCacheUtil.getResult(FINDER_PATH_FETCH_BY_VIRTUALHOST,
670 finderArgs, this);
671 }
672
673 if (result == null) {
674 Session session = null;
675
676 try {
677 session = openSession();
678
679 StringBundler query = new StringBundler(2);
680
681 query.append(_SQL_SELECT_LAYOUTSET_WHERE);
682
683 if (virtualHost == null) {
684 query.append(_FINDER_COLUMN_VIRTUALHOST_VIRTUALHOST_1);
685 }
686 else {
687 if (virtualHost.equals(StringPool.BLANK)) {
688 query.append(_FINDER_COLUMN_VIRTUALHOST_VIRTUALHOST_3);
689 }
690 else {
691 query.append(_FINDER_COLUMN_VIRTUALHOST_VIRTUALHOST_2);
692 }
693 }
694
695 String sql = query.toString();
696
697 Query q = session.createQuery(sql);
698
699 QueryPos qPos = QueryPos.getInstance(q);
700
701 if (virtualHost != null) {
702 qPos.add(virtualHost);
703 }
704
705 List<LayoutSet> list = q.list();
706
707 result = list;
708
709 LayoutSet layoutSet = null;
710
711 if (list.isEmpty()) {
712 FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_VIRTUALHOST,
713 finderArgs, list);
714 }
715 else {
716 layoutSet = list.get(0);
717
718 cacheResult(layoutSet);
719
720 if ((layoutSet.getVirtualHost() == null) ||
721 !layoutSet.getVirtualHost().equals(virtualHost)) {
722 FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_VIRTUALHOST,
723 finderArgs, layoutSet);
724 }
725 }
726
727 return layoutSet;
728 }
729 catch (Exception e) {
730 throw processException(e);
731 }
732 finally {
733 if (result == null) {
734 FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_VIRTUALHOST,
735 finderArgs, new ArrayList<LayoutSet>());
736 }
737
738 closeSession(session);
739 }
740 }
741 else {
742 if (result instanceof List<?>) {
743 return null;
744 }
745 else {
746 return (LayoutSet)result;
747 }
748 }
749 }
750
751 public LayoutSet findByG_P(long groupId, boolean privateLayout)
752 throws NoSuchLayoutSetException, SystemException {
753 LayoutSet layoutSet = fetchByG_P(groupId, privateLayout);
754
755 if (layoutSet == null) {
756 StringBundler msg = new StringBundler(6);
757
758 msg.append(_NO_SUCH_ENTITY_WITH_KEY);
759
760 msg.append("groupId=");
761 msg.append(groupId);
762
763 msg.append(", privateLayout=");
764 msg.append(privateLayout);
765
766 msg.append(StringPool.CLOSE_CURLY_BRACE);
767
768 if (_log.isWarnEnabled()) {
769 _log.warn(msg.toString());
770 }
771
772 throw new NoSuchLayoutSetException(msg.toString());
773 }
774
775 return layoutSet;
776 }
777
778 public LayoutSet fetchByG_P(long groupId, boolean privateLayout)
779 throws SystemException {
780 return fetchByG_P(groupId, privateLayout, true);
781 }
782
783 public LayoutSet fetchByG_P(long groupId, boolean privateLayout,
784 boolean retrieveFromCache) throws SystemException {
785 Object[] finderArgs = new Object[] {
786 new Long(groupId), Boolean.valueOf(privateLayout)
787 };
788
789 Object result = null;
790
791 if (retrieveFromCache) {
792 result = FinderCacheUtil.getResult(FINDER_PATH_FETCH_BY_G_P,
793 finderArgs, this);
794 }
795
796 if (result == null) {
797 Session session = null;
798
799 try {
800 session = openSession();
801
802 StringBundler query = new StringBundler(3);
803
804 query.append(_SQL_SELECT_LAYOUTSET_WHERE);
805
806 query.append(_FINDER_COLUMN_G_P_GROUPID_2);
807
808 query.append(_FINDER_COLUMN_G_P_PRIVATELAYOUT_2);
809
810 String sql = query.toString();
811
812 Query q = session.createQuery(sql);
813
814 QueryPos qPos = QueryPos.getInstance(q);
815
816 qPos.add(groupId);
817
818 qPos.add(privateLayout);
819
820 List<LayoutSet> list = q.list();
821
822 result = list;
823
824 LayoutSet layoutSet = null;
825
826 if (list.isEmpty()) {
827 FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_G_P,
828 finderArgs, list);
829 }
830 else {
831 layoutSet = list.get(0);
832
833 cacheResult(layoutSet);
834
835 if ((layoutSet.getGroupId() != groupId) ||
836 (layoutSet.getPrivateLayout() != privateLayout)) {
837 FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_G_P,
838 finderArgs, layoutSet);
839 }
840 }
841
842 return layoutSet;
843 }
844 catch (Exception e) {
845 throw processException(e);
846 }
847 finally {
848 if (result == null) {
849 FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_G_P,
850 finderArgs, new ArrayList<LayoutSet>());
851 }
852
853 closeSession(session);
854 }
855 }
856 else {
857 if (result instanceof List<?>) {
858 return null;
859 }
860 else {
861 return (LayoutSet)result;
862 }
863 }
864 }
865
866 public List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
867 throws SystemException {
868 Session session = null;
869
870 try {
871 session = openSession();
872
873 dynamicQuery.compile(session);
874
875 return dynamicQuery.list();
876 }
877 catch (Exception e) {
878 throw processException(e);
879 }
880 finally {
881 closeSession(session);
882 }
883 }
884
885 public List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery,
886 int start, int end) throws SystemException {
887 Session session = null;
888
889 try {
890 session = openSession();
891
892 dynamicQuery.setLimit(start, end);
893
894 dynamicQuery.compile(session);
895
896 return dynamicQuery.list();
897 }
898 catch (Exception e) {
899 throw processException(e);
900 }
901 finally {
902 closeSession(session);
903 }
904 }
905
906 public List<LayoutSet> findAll() throws SystemException {
907 return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
908 }
909
910 public List<LayoutSet> findAll(int start, int end)
911 throws SystemException {
912 return findAll(start, end, null);
913 }
914
915 public List<LayoutSet> findAll(int start, int end, OrderByComparator obc)
916 throws SystemException {
917 Object[] finderArgs = new Object[] {
918 String.valueOf(start), String.valueOf(end), String.valueOf(obc)
919 };
920
921 List<LayoutSet> list = (List<LayoutSet>)FinderCacheUtil.getResult(FINDER_PATH_FIND_ALL,
922 finderArgs, this);
923
924 if (list == null) {
925 Session session = null;
926
927 try {
928 session = openSession();
929
930 StringBundler query = null;
931 String sql = null;
932
933 if (obc != null) {
934 query = new StringBundler(2 +
935 (obc.getOrderByFields().length * 3));
936
937 query.append(_SQL_SELECT_LAYOUTSET);
938
939 appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, obc);
940
941 sql = query.toString();
942 }
943
944 sql = _SQL_SELECT_LAYOUTSET;
945
946 Query q = session.createQuery(sql);
947
948 if (obc == null) {
949 list = (List<LayoutSet>)QueryUtil.list(q, getDialect(),
950 start, end, false);
951
952 Collections.sort(list);
953 }
954 else {
955 list = (List<LayoutSet>)QueryUtil.list(q, getDialect(),
956 start, end);
957 }
958 }
959 catch (Exception e) {
960 throw processException(e);
961 }
962 finally {
963 if (list == null) {
964 list = new ArrayList<LayoutSet>();
965 }
966
967 cacheResult(list);
968
969 FinderCacheUtil.putResult(FINDER_PATH_FIND_ALL, finderArgs, list);
970
971 closeSession(session);
972 }
973 }
974
975 return list;
976 }
977
978 public void removeByGroupId(long groupId) throws SystemException {
979 for (LayoutSet layoutSet : findByGroupId(groupId)) {
980 remove(layoutSet);
981 }
982 }
983
984 public void removeByVirtualHost(String virtualHost)
985 throws NoSuchLayoutSetException, SystemException {
986 LayoutSet layoutSet = findByVirtualHost(virtualHost);
987
988 remove(layoutSet);
989 }
990
991 public void removeByG_P(long groupId, boolean privateLayout)
992 throws NoSuchLayoutSetException, SystemException {
993 LayoutSet layoutSet = findByG_P(groupId, privateLayout);
994
995 remove(layoutSet);
996 }
997
998 public void removeAll() throws SystemException {
999 for (LayoutSet layoutSet : findAll()) {
1000 remove(layoutSet);
1001 }
1002 }
1003
1004 public int countByGroupId(long groupId) throws SystemException {
1005 Object[] finderArgs = new Object[] { new Long(groupId) };
1006
1007 Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_BY_GROUPID,
1008 finderArgs, this);
1009
1010 if (count == null) {
1011 Session session = null;
1012
1013 try {
1014 session = openSession();
1015
1016 StringBundler query = new StringBundler(2);
1017
1018 query.append(_SQL_COUNT_LAYOUTSET_WHERE);
1019
1020 query.append(_FINDER_COLUMN_GROUPID_GROUPID_2);
1021
1022 String sql = query.toString();
1023
1024 Query q = session.createQuery(sql);
1025
1026 QueryPos qPos = QueryPos.getInstance(q);
1027
1028 qPos.add(groupId);
1029
1030 count = (Long)q.uniqueResult();
1031 }
1032 catch (Exception e) {
1033 throw processException(e);
1034 }
1035 finally {
1036 if (count == null) {
1037 count = Long.valueOf(0);
1038 }
1039
1040 FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_GROUPID,
1041 finderArgs, count);
1042
1043 closeSession(session);
1044 }
1045 }
1046
1047 return count.intValue();
1048 }
1049
1050 public int countByVirtualHost(String virtualHost) throws SystemException {
1051 Object[] finderArgs = new Object[] { virtualHost };
1052
1053 Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_BY_VIRTUALHOST,
1054 finderArgs, this);
1055
1056 if (count == null) {
1057 Session session = null;
1058
1059 try {
1060 session = openSession();
1061
1062 StringBundler query = new StringBundler(2);
1063
1064 query.append(_SQL_COUNT_LAYOUTSET_WHERE);
1065
1066 if (virtualHost == null) {
1067 query.append(_FINDER_COLUMN_VIRTUALHOST_VIRTUALHOST_1);
1068 }
1069 else {
1070 if (virtualHost.equals(StringPool.BLANK)) {
1071 query.append(_FINDER_COLUMN_VIRTUALHOST_VIRTUALHOST_3);
1072 }
1073 else {
1074 query.append(_FINDER_COLUMN_VIRTUALHOST_VIRTUALHOST_2);
1075 }
1076 }
1077
1078 String sql = query.toString();
1079
1080 Query q = session.createQuery(sql);
1081
1082 QueryPos qPos = QueryPos.getInstance(q);
1083
1084 if (virtualHost != null) {
1085 qPos.add(virtualHost);
1086 }
1087
1088 count = (Long)q.uniqueResult();
1089 }
1090 catch (Exception e) {
1091 throw processException(e);
1092 }
1093 finally {
1094 if (count == null) {
1095 count = Long.valueOf(0);
1096 }
1097
1098 FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_VIRTUALHOST,
1099 finderArgs, count);
1100
1101 closeSession(session);
1102 }
1103 }
1104
1105 return count.intValue();
1106 }
1107
1108 public int countByG_P(long groupId, boolean privateLayout)
1109 throws SystemException {
1110 Object[] finderArgs = new Object[] {
1111 new Long(groupId), Boolean.valueOf(privateLayout)
1112 };
1113
1114 Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_BY_G_P,
1115 finderArgs, this);
1116
1117 if (count == null) {
1118 Session session = null;
1119
1120 try {
1121 session = openSession();
1122
1123 StringBundler query = new StringBundler(3);
1124
1125 query.append(_SQL_COUNT_LAYOUTSET_WHERE);
1126
1127 query.append(_FINDER_COLUMN_G_P_GROUPID_2);
1128
1129 query.append(_FINDER_COLUMN_G_P_PRIVATELAYOUT_2);
1130
1131 String sql = query.toString();
1132
1133 Query q = session.createQuery(sql);
1134
1135 QueryPos qPos = QueryPos.getInstance(q);
1136
1137 qPos.add(groupId);
1138
1139 qPos.add(privateLayout);
1140
1141 count = (Long)q.uniqueResult();
1142 }
1143 catch (Exception e) {
1144 throw processException(e);
1145 }
1146 finally {
1147 if (count == null) {
1148 count = Long.valueOf(0);
1149 }
1150
1151 FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_G_P, finderArgs,
1152 count);
1153
1154 closeSession(session);
1155 }
1156 }
1157
1158 return count.intValue();
1159 }
1160
1161 public int countAll() throws SystemException {
1162 Object[] finderArgs = new Object[0];
1163
1164 Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_ALL,
1165 finderArgs, this);
1166
1167 if (count == null) {
1168 Session session = null;
1169
1170 try {
1171 session = openSession();
1172
1173 Query q = session.createQuery(_SQL_COUNT_LAYOUTSET);
1174
1175 count = (Long)q.uniqueResult();
1176 }
1177 catch (Exception e) {
1178 throw processException(e);
1179 }
1180 finally {
1181 if (count == null) {
1182 count = Long.valueOf(0);
1183 }
1184
1185 FinderCacheUtil.putResult(FINDER_PATH_COUNT_ALL, finderArgs,
1186 count);
1187
1188 closeSession(session);
1189 }
1190 }
1191
1192 return count.intValue();
1193 }
1194
1195 public void afterPropertiesSet() {
1196 String[] listenerClassNames = StringUtil.split(GetterUtil.getString(
1197 com.liferay.portal.util.PropsUtil.get(
1198 "value.object.listener.com.liferay.portal.model.LayoutSet")));
1199
1200 if (listenerClassNames.length > 0) {
1201 try {
1202 List<ModelListener<LayoutSet>> listenersList = new ArrayList<ModelListener<LayoutSet>>();
1203
1204 for (String listenerClassName : listenerClassNames) {
1205 listenersList.add((ModelListener<LayoutSet>)Class.forName(
1206 listenerClassName).newInstance());
1207 }
1208
1209 listeners = listenersList.toArray(new ModelListener[listenersList.size()]);
1210 }
1211 catch (Exception e) {
1212 _log.error(e);
1213 }
1214 }
1215 }
1216
1217 @BeanReference(name = "com.liferay.portal.service.persistence.AccountPersistence")
1218 protected com.liferay.portal.service.persistence.AccountPersistence accountPersistence;
1219 @BeanReference(name = "com.liferay.portal.service.persistence.AddressPersistence")
1220 protected com.liferay.portal.service.persistence.AddressPersistence addressPersistence;
1221 @BeanReference(name = "com.liferay.portal.service.persistence.BrowserTrackerPersistence")
1222 protected com.liferay.portal.service.persistence.BrowserTrackerPersistence browserTrackerPersistence;
1223 @BeanReference(name = "com.liferay.portal.service.persistence.ClassNamePersistence")
1224 protected com.liferay.portal.service.persistence.ClassNamePersistence classNamePersistence;
1225 @BeanReference(name = "com.liferay.portal.service.persistence.CompanyPersistence")
1226 protected com.liferay.portal.service.persistence.CompanyPersistence companyPersistence;
1227 @BeanReference(name = "com.liferay.portal.service.persistence.ContactPersistence")
1228 protected com.liferay.portal.service.persistence.ContactPersistence contactPersistence;
1229 @BeanReference(name = "com.liferay.portal.service.persistence.CountryPersistence")
1230 protected com.liferay.portal.service.persistence.CountryPersistence countryPersistence;
1231 @BeanReference(name = "com.liferay.portal.service.persistence.EmailAddressPersistence")
1232 protected com.liferay.portal.service.persistence.EmailAddressPersistence emailAddressPersistence;
1233 @BeanReference(name = "com.liferay.portal.service.persistence.GroupPersistence")
1234 protected com.liferay.portal.service.persistence.GroupPersistence groupPersistence;
1235 @BeanReference(name = "com.liferay.portal.service.persistence.ImagePersistence")
1236 protected com.liferay.portal.service.persistence.ImagePersistence imagePersistence;
1237 @BeanReference(name = "com.liferay.portal.service.persistence.LayoutPersistence")
1238 protected com.liferay.portal.service.persistence.LayoutPersistence layoutPersistence;
1239 @BeanReference(name = "com.liferay.portal.service.persistence.LayoutSetPersistence")
1240 protected com.liferay.portal.service.persistence.LayoutSetPersistence layoutSetPersistence;
1241 @BeanReference(name = "com.liferay.portal.service.persistence.ListTypePersistence")
1242 protected com.liferay.portal.service.persistence.ListTypePersistence listTypePersistence;
1243 @BeanReference(name = "com.liferay.portal.service.persistence.LockPersistence")
1244 protected com.liferay.portal.service.persistence.LockPersistence lockPersistence;
1245 @BeanReference(name = "com.liferay.portal.service.persistence.MembershipRequestPersistence")
1246 protected com.liferay.portal.service.persistence.MembershipRequestPersistence membershipRequestPersistence;
1247 @BeanReference(name = "com.liferay.portal.service.persistence.OrganizationPersistence")
1248 protected com.liferay.portal.service.persistence.OrganizationPersistence organizationPersistence;
1249 @BeanReference(name = "com.liferay.portal.service.persistence.OrgGroupPermissionPersistence")
1250 protected com.liferay.portal.service.persistence.OrgGroupPermissionPersistence orgGroupPermissionPersistence;
1251 @BeanReference(name = "com.liferay.portal.service.persistence.OrgGroupRolePersistence")
1252 protected com.liferay.portal.service.persistence.OrgGroupRolePersistence orgGroupRolePersistence;
1253 @BeanReference(name = "com.liferay.portal.service.persistence.OrgLaborPersistence")
1254 protected com.liferay.portal.service.persistence.OrgLaborPersistence orgLaborPersistence;
1255 @BeanReference(name = "com.liferay.portal.service.persistence.PasswordPolicyPersistence")
1256 protected com.liferay.portal.service.persistence.PasswordPolicyPersistence passwordPolicyPersistence;
1257 @BeanReference(name = "com.liferay.portal.service.persistence.PasswordPolicyRelPersistence")
1258 protected com.liferay.portal.service.persistence.PasswordPolicyRelPersistence passwordPolicyRelPersistence;
1259 @BeanReference(name = "com.liferay.portal.service.persistence.PasswordTrackerPersistence")
1260 protected com.liferay.portal.service.persistence.PasswordTrackerPersistence passwordTrackerPersistence;
1261 @BeanReference(name = "com.liferay.portal.service.persistence.PermissionPersistence")
1262 protected com.liferay.portal.service.persistence.PermissionPersistence permissionPersistence;
1263 @BeanReference(name = "com.liferay.portal.service.persistence.PhonePersistence")
1264 protected com.liferay.portal.service.persistence.PhonePersistence phonePersistence;
1265 @BeanReference(name = "com.liferay.portal.service.persistence.PluginSettingPersistence")
1266 protected com.liferay.portal.service.persistence.PluginSettingPersistence pluginSettingPersistence;
1267 @BeanReference(name = "com.liferay.portal.service.persistence.PortletPersistence")
1268 protected com.liferay.portal.service.persistence.PortletPersistence portletPersistence;
1269 @BeanReference(name = "com.liferay.portal.service.persistence.PortletItemPersistence")
1270 protected com.liferay.portal.service.persistence.PortletItemPersistence portletItemPersistence;
1271 @BeanReference(name = "com.liferay.portal.service.persistence.PortletPreferencesPersistence")
1272 protected com.liferay.portal.service.persistence.PortletPreferencesPersistence portletPreferencesPersistence;
1273 @BeanReference(name = "com.liferay.portal.service.persistence.RegionPersistence")
1274 protected com.liferay.portal.service.persistence.RegionPersistence regionPersistence;
1275 @BeanReference(name = "com.liferay.portal.service.persistence.ReleasePersistence")
1276 protected com.liferay.portal.service.persistence.ReleasePersistence releasePersistence;
1277 @BeanReference(name = "com.liferay.portal.service.persistence.ResourcePersistence")
1278 protected com.liferay.portal.service.persistence.ResourcePersistence resourcePersistence;
1279 @BeanReference(name = "com.liferay.portal.service.persistence.ResourceActionPersistence")
1280 protected com.liferay.portal.service.persistence.ResourceActionPersistence resourceActionPersistence;
1281 @BeanReference(name = "com.liferay.portal.service.persistence.ResourceCodePersistence")
1282 protected com.liferay.portal.service.persistence.ResourceCodePersistence resourceCodePersistence;
1283 @BeanReference(name = "com.liferay.portal.service.persistence.ResourcePermissionPersistence")
1284 protected com.liferay.portal.service.persistence.ResourcePermissionPersistence resourcePermissionPersistence;
1285 @BeanReference(name = "com.liferay.portal.service.persistence.RolePersistence")
1286 protected com.liferay.portal.service.persistence.RolePersistence rolePersistence;
1287 @BeanReference(name = "com.liferay.portal.service.persistence.ServiceComponentPersistence")
1288 protected com.liferay.portal.service.persistence.ServiceComponentPersistence serviceComponentPersistence;
1289 @BeanReference(name = "com.liferay.portal.service.persistence.ShardPersistence")
1290 protected com.liferay.portal.service.persistence.ShardPersistence shardPersistence;
1291 @BeanReference(name = "com.liferay.portal.service.persistence.SubscriptionPersistence")
1292 protected com.liferay.portal.service.persistence.SubscriptionPersistence subscriptionPersistence;
1293 @BeanReference(name = "com.liferay.portal.service.persistence.UserPersistence")
1294 protected com.liferay.portal.service.persistence.UserPersistence userPersistence;
1295 @BeanReference(name = "com.liferay.portal.service.persistence.UserGroupPersistence")
1296 protected com.liferay.portal.service.persistence.UserGroupPersistence userGroupPersistence;
1297 @BeanReference(name = "com.liferay.portal.service.persistence.UserGroupGroupRolePersistence")
1298 protected com.liferay.portal.service.persistence.UserGroupGroupRolePersistence userGroupGroupRolePersistence;
1299 @BeanReference(name = "com.liferay.portal.service.persistence.UserGroupRolePersistence")
1300 protected com.liferay.portal.service.persistence.UserGroupRolePersistence userGroupRolePersistence;
1301 @BeanReference(name = "com.liferay.portal.service.persistence.UserIdMapperPersistence")
1302 protected com.liferay.portal.service.persistence.UserIdMapperPersistence userIdMapperPersistence;
1303 @BeanReference(name = "com.liferay.portal.service.persistence.UserTrackerPersistence")
1304 protected com.liferay.portal.service.persistence.UserTrackerPersistence userTrackerPersistence;
1305 @BeanReference(name = "com.liferay.portal.service.persistence.UserTrackerPathPersistence")
1306 protected com.liferay.portal.service.persistence.UserTrackerPathPersistence userTrackerPathPersistence;
1307 @BeanReference(name = "com.liferay.portal.service.persistence.WebDAVPropsPersistence")
1308 protected com.liferay.portal.service.persistence.WebDAVPropsPersistence webDAVPropsPersistence;
1309 @BeanReference(name = "com.liferay.portal.service.persistence.WebsitePersistence")
1310 protected com.liferay.portal.service.persistence.WebsitePersistence websitePersistence;
1311 private static final String _SQL_SELECT_LAYOUTSET = "SELECT layoutSet FROM LayoutSet layoutSet";
1312 private static final String _SQL_SELECT_LAYOUTSET_WHERE = "SELECT layoutSet FROM LayoutSet layoutSet WHERE ";
1313 private static final String _SQL_COUNT_LAYOUTSET = "SELECT COUNT(layoutSet) FROM LayoutSet layoutSet";
1314 private static final String _SQL_COUNT_LAYOUTSET_WHERE = "SELECT COUNT(layoutSet) FROM LayoutSet layoutSet WHERE ";
1315 private static final String _FINDER_COLUMN_GROUPID_GROUPID_2 = "layoutSet.groupId = ?";
1316 private static final String _FINDER_COLUMN_VIRTUALHOST_VIRTUALHOST_1 = "layoutSet.virtualHost IS NULL";
1317 private static final String _FINDER_COLUMN_VIRTUALHOST_VIRTUALHOST_2 = "layoutSet.virtualHost = ?";
1318 private static final String _FINDER_COLUMN_VIRTUALHOST_VIRTUALHOST_3 = "(layoutSet.virtualHost IS NULL OR layoutSet.virtualHost = ?)";
1319 private static final String _FINDER_COLUMN_G_P_GROUPID_2 = "layoutSet.groupId = ? AND ";
1320 private static final String _FINDER_COLUMN_G_P_PRIVATELAYOUT_2 = "layoutSet.privateLayout = ?";
1321 private static final String _ORDER_BY_ENTITY_ALIAS = "layoutSet.";
1322 private static final String _NO_SUCH_ENTITY_WITH_PRIMARY_KEY = "No LayoutSet exists with the primary key ";
1323 private static final String _NO_SUCH_ENTITY_WITH_KEY = "No LayoutSet exists with the key {";
1324 private static Log _log = LogFactoryUtil.getLog(LayoutSetPersistenceImpl.class);
1325}