001
014
015 package com.liferay.portal.service.persistence;
016
017 import com.liferay.portal.NoSuchLayoutSetPrototypeException;
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.QueryPos;
026 import com.liferay.portal.kernel.dao.orm.QueryUtil;
027 import com.liferay.portal.kernel.dao.orm.SQLQuery;
028 import com.liferay.portal.kernel.dao.orm.Session;
029 import com.liferay.portal.kernel.exception.SystemException;
030 import com.liferay.portal.kernel.log.Log;
031 import com.liferay.portal.kernel.log.LogFactoryUtil;
032 import com.liferay.portal.kernel.util.GetterUtil;
033 import com.liferay.portal.kernel.util.InstanceFactory;
034 import com.liferay.portal.kernel.util.OrderByComparator;
035 import com.liferay.portal.kernel.util.StringBundler;
036 import com.liferay.portal.kernel.util.StringPool;
037 import com.liferay.portal.kernel.util.StringUtil;
038 import com.liferay.portal.model.LayoutSetPrototype;
039 import com.liferay.portal.model.ModelListener;
040 import com.liferay.portal.model.impl.LayoutSetPrototypeImpl;
041 import com.liferay.portal.model.impl.LayoutSetPrototypeModelImpl;
042 import com.liferay.portal.security.permission.InlineSQLHelperUtil;
043 import com.liferay.portal.service.persistence.impl.BasePersistenceImpl;
044
045 import java.io.Serializable;
046
047 import java.util.ArrayList;
048 import java.util.Collections;
049 import java.util.List;
050
051
067 public class LayoutSetPrototypePersistenceImpl extends BasePersistenceImpl<LayoutSetPrototype>
068 implements LayoutSetPrototypePersistence {
069 public static final String FINDER_CLASS_NAME_ENTITY = LayoutSetPrototypeImpl.class.getName();
070 public static final String FINDER_CLASS_NAME_LIST = FINDER_CLASS_NAME_ENTITY +
071 ".List";
072 public static final FinderPath FINDER_PATH_FIND_BY_COMPANYID = new FinderPath(LayoutSetPrototypeModelImpl.ENTITY_CACHE_ENABLED,
073 LayoutSetPrototypeModelImpl.FINDER_CACHE_ENABLED,
074 FINDER_CLASS_NAME_LIST, "findByCompanyId",
075 new String[] {
076 Long.class.getName(),
077
078 "java.lang.Integer", "java.lang.Integer",
079 "com.liferay.portal.kernel.util.OrderByComparator"
080 });
081 public static final FinderPath FINDER_PATH_COUNT_BY_COMPANYID = new FinderPath(LayoutSetPrototypeModelImpl.ENTITY_CACHE_ENABLED,
082 LayoutSetPrototypeModelImpl.FINDER_CACHE_ENABLED,
083 FINDER_CLASS_NAME_LIST, "countByCompanyId",
084 new String[] { Long.class.getName() });
085 public static final FinderPath FINDER_PATH_FIND_BY_C_A = new FinderPath(LayoutSetPrototypeModelImpl.ENTITY_CACHE_ENABLED,
086 LayoutSetPrototypeModelImpl.FINDER_CACHE_ENABLED,
087 FINDER_CLASS_NAME_LIST, "findByC_A",
088 new String[] {
089 Long.class.getName(), Boolean.class.getName(),
090
091 "java.lang.Integer", "java.lang.Integer",
092 "com.liferay.portal.kernel.util.OrderByComparator"
093 });
094 public static final FinderPath FINDER_PATH_COUNT_BY_C_A = new FinderPath(LayoutSetPrototypeModelImpl.ENTITY_CACHE_ENABLED,
095 LayoutSetPrototypeModelImpl.FINDER_CACHE_ENABLED,
096 FINDER_CLASS_NAME_LIST, "countByC_A",
097 new String[] { Long.class.getName(), Boolean.class.getName() });
098 public static final FinderPath FINDER_PATH_FIND_ALL = new FinderPath(LayoutSetPrototypeModelImpl.ENTITY_CACHE_ENABLED,
099 LayoutSetPrototypeModelImpl.FINDER_CACHE_ENABLED,
100 FINDER_CLASS_NAME_LIST, "findAll", new String[0]);
101 public static final FinderPath FINDER_PATH_COUNT_ALL = new FinderPath(LayoutSetPrototypeModelImpl.ENTITY_CACHE_ENABLED,
102 LayoutSetPrototypeModelImpl.FINDER_CACHE_ENABLED,
103 FINDER_CLASS_NAME_LIST, "countAll", new String[0]);
104
105
110 public void cacheResult(LayoutSetPrototype layoutSetPrototype) {
111 EntityCacheUtil.putResult(LayoutSetPrototypeModelImpl.ENTITY_CACHE_ENABLED,
112 LayoutSetPrototypeImpl.class, layoutSetPrototype.getPrimaryKey(),
113 layoutSetPrototype);
114 }
115
116
121 public void cacheResult(List<LayoutSetPrototype> layoutSetPrototypes) {
122 for (LayoutSetPrototype layoutSetPrototype : layoutSetPrototypes) {
123 if (EntityCacheUtil.getResult(
124 LayoutSetPrototypeModelImpl.ENTITY_CACHE_ENABLED,
125 LayoutSetPrototypeImpl.class,
126 layoutSetPrototype.getPrimaryKey(), this) == null) {
127 cacheResult(layoutSetPrototype);
128 }
129 }
130 }
131
132
139 public void clearCache() {
140 CacheRegistryUtil.clear(LayoutSetPrototypeImpl.class.getName());
141 EntityCacheUtil.clearCache(LayoutSetPrototypeImpl.class.getName());
142 FinderCacheUtil.clearCache(FINDER_CLASS_NAME_ENTITY);
143 FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST);
144 }
145
146
153 public void clearCache(LayoutSetPrototype layoutSetPrototype) {
154 EntityCacheUtil.removeResult(LayoutSetPrototypeModelImpl.ENTITY_CACHE_ENABLED,
155 LayoutSetPrototypeImpl.class, layoutSetPrototype.getPrimaryKey());
156 }
157
158
164 public LayoutSetPrototype create(long layoutSetPrototypeId) {
165 LayoutSetPrototype layoutSetPrototype = new LayoutSetPrototypeImpl();
166
167 layoutSetPrototype.setNew(true);
168 layoutSetPrototype.setPrimaryKey(layoutSetPrototypeId);
169
170 return layoutSetPrototype;
171 }
172
173
181 public LayoutSetPrototype remove(Serializable primaryKey)
182 throws NoSuchModelException, SystemException {
183 return remove(((Long)primaryKey).longValue());
184 }
185
186
194 public LayoutSetPrototype remove(long layoutSetPrototypeId)
195 throws NoSuchLayoutSetPrototypeException, SystemException {
196 Session session = null;
197
198 try {
199 session = openSession();
200
201 LayoutSetPrototype layoutSetPrototype = (LayoutSetPrototype)session.get(LayoutSetPrototypeImpl.class,
202 new Long(layoutSetPrototypeId));
203
204 if (layoutSetPrototype == null) {
205 if (_log.isWarnEnabled()) {
206 _log.warn(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY +
207 layoutSetPrototypeId);
208 }
209
210 throw new NoSuchLayoutSetPrototypeException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY +
211 layoutSetPrototypeId);
212 }
213
214 return remove(layoutSetPrototype);
215 }
216 catch (NoSuchLayoutSetPrototypeException nsee) {
217 throw nsee;
218 }
219 catch (Exception e) {
220 throw processException(e);
221 }
222 finally {
223 closeSession(session);
224 }
225 }
226
227 protected LayoutSetPrototype removeImpl(
228 LayoutSetPrototype layoutSetPrototype) throws SystemException {
229 layoutSetPrototype = toUnwrappedModel(layoutSetPrototype);
230
231 Session session = null;
232
233 try {
234 session = openSession();
235
236 BatchSessionUtil.delete(session, layoutSetPrototype);
237 }
238 catch (Exception e) {
239 throw processException(e);
240 }
241 finally {
242 closeSession(session);
243 }
244
245 FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST);
246
247 EntityCacheUtil.removeResult(LayoutSetPrototypeModelImpl.ENTITY_CACHE_ENABLED,
248 LayoutSetPrototypeImpl.class, layoutSetPrototype.getPrimaryKey());
249
250 return layoutSetPrototype;
251 }
252
253 public LayoutSetPrototype updateImpl(
254 com.liferay.portal.model.LayoutSetPrototype layoutSetPrototype,
255 boolean merge) throws SystemException {
256 layoutSetPrototype = toUnwrappedModel(layoutSetPrototype);
257
258 Session session = null;
259
260 try {
261 session = openSession();
262
263 BatchSessionUtil.update(session, layoutSetPrototype, merge);
264
265 layoutSetPrototype.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);
275
276 EntityCacheUtil.putResult(LayoutSetPrototypeModelImpl.ENTITY_CACHE_ENABLED,
277 LayoutSetPrototypeImpl.class, layoutSetPrototype.getPrimaryKey(),
278 layoutSetPrototype);
279
280 return layoutSetPrototype;
281 }
282
283 protected LayoutSetPrototype toUnwrappedModel(
284 LayoutSetPrototype layoutSetPrototype) {
285 if (layoutSetPrototype instanceof LayoutSetPrototypeImpl) {
286 return layoutSetPrototype;
287 }
288
289 LayoutSetPrototypeImpl layoutSetPrototypeImpl = new LayoutSetPrototypeImpl();
290
291 layoutSetPrototypeImpl.setNew(layoutSetPrototype.isNew());
292 layoutSetPrototypeImpl.setPrimaryKey(layoutSetPrototype.getPrimaryKey());
293
294 layoutSetPrototypeImpl.setLayoutSetPrototypeId(layoutSetPrototype.getLayoutSetPrototypeId());
295 layoutSetPrototypeImpl.setCompanyId(layoutSetPrototype.getCompanyId());
296 layoutSetPrototypeImpl.setName(layoutSetPrototype.getName());
297 layoutSetPrototypeImpl.setDescription(layoutSetPrototype.getDescription());
298 layoutSetPrototypeImpl.setSettings(layoutSetPrototype.getSettings());
299 layoutSetPrototypeImpl.setActive(layoutSetPrototype.isActive());
300
301 return layoutSetPrototypeImpl;
302 }
303
304
312 public LayoutSetPrototype findByPrimaryKey(Serializable primaryKey)
313 throws NoSuchModelException, SystemException {
314 return findByPrimaryKey(((Long)primaryKey).longValue());
315 }
316
317
325 public LayoutSetPrototype findByPrimaryKey(long layoutSetPrototypeId)
326 throws NoSuchLayoutSetPrototypeException, SystemException {
327 LayoutSetPrototype layoutSetPrototype = fetchByPrimaryKey(layoutSetPrototypeId);
328
329 if (layoutSetPrototype == null) {
330 if (_log.isWarnEnabled()) {
331 _log.warn(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY +
332 layoutSetPrototypeId);
333 }
334
335 throw new NoSuchLayoutSetPrototypeException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY +
336 layoutSetPrototypeId);
337 }
338
339 return layoutSetPrototype;
340 }
341
342
349 public LayoutSetPrototype fetchByPrimaryKey(Serializable primaryKey)
350 throws SystemException {
351 return fetchByPrimaryKey(((Long)primaryKey).longValue());
352 }
353
354
361 public LayoutSetPrototype fetchByPrimaryKey(long layoutSetPrototypeId)
362 throws SystemException {
363 LayoutSetPrototype layoutSetPrototype = (LayoutSetPrototype)EntityCacheUtil.getResult(LayoutSetPrototypeModelImpl.ENTITY_CACHE_ENABLED,
364 LayoutSetPrototypeImpl.class, layoutSetPrototypeId, this);
365
366 if (layoutSetPrototype == null) {
367 Session session = null;
368
369 try {
370 session = openSession();
371
372 layoutSetPrototype = (LayoutSetPrototype)session.get(LayoutSetPrototypeImpl.class,
373 new Long(layoutSetPrototypeId));
374 }
375 catch (Exception e) {
376 throw processException(e);
377 }
378 finally {
379 if (layoutSetPrototype != null) {
380 cacheResult(layoutSetPrototype);
381 }
382
383 closeSession(session);
384 }
385 }
386
387 return layoutSetPrototype;
388 }
389
390
397 public List<LayoutSetPrototype> findByCompanyId(long companyId)
398 throws SystemException {
399 return findByCompanyId(companyId, QueryUtil.ALL_POS, QueryUtil.ALL_POS,
400 null);
401 }
402
403
416 public List<LayoutSetPrototype> findByCompanyId(long companyId, int start,
417 int end) throws SystemException {
418 return findByCompanyId(companyId, start, end, null);
419 }
420
421
435 public List<LayoutSetPrototype> findByCompanyId(long companyId, int start,
436 int end, OrderByComparator orderByComparator) throws SystemException {
437 Object[] finderArgs = new Object[] {
438 companyId,
439
440 String.valueOf(start), String.valueOf(end),
441 String.valueOf(orderByComparator)
442 };
443
444 List<LayoutSetPrototype> list = (List<LayoutSetPrototype>)FinderCacheUtil.getResult(FINDER_PATH_FIND_BY_COMPANYID,
445 finderArgs, this);
446
447 if (list == null) {
448 StringBundler query = null;
449
450 if (orderByComparator != null) {
451 query = new StringBundler(3 +
452 (orderByComparator.getOrderByFields().length * 3));
453 }
454 else {
455 query = new StringBundler(2);
456 }
457
458 query.append(_SQL_SELECT_LAYOUTSETPROTOTYPE_WHERE);
459
460 query.append(_FINDER_COLUMN_COMPANYID_COMPANYID_2);
461
462 if (orderByComparator != null) {
463 appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS,
464 orderByComparator);
465 }
466
467 String sql = query.toString();
468
469 Session session = null;
470
471 try {
472 session = openSession();
473
474 Query q = session.createQuery(sql);
475
476 QueryPos qPos = QueryPos.getInstance(q);
477
478 qPos.add(companyId);
479
480 list = (List<LayoutSetPrototype>)QueryUtil.list(q,
481 getDialect(), start, end);
482 }
483 catch (Exception e) {
484 throw processException(e);
485 }
486 finally {
487 if (list == null) {
488 FinderCacheUtil.removeResult(FINDER_PATH_FIND_BY_COMPANYID,
489 finderArgs);
490 }
491 else {
492 cacheResult(list);
493
494 FinderCacheUtil.putResult(FINDER_PATH_FIND_BY_COMPANYID,
495 finderArgs, list);
496 }
497
498 closeSession(session);
499 }
500 }
501
502 return list;
503 }
504
505
518 public LayoutSetPrototype findByCompanyId_First(long companyId,
519 OrderByComparator orderByComparator)
520 throws NoSuchLayoutSetPrototypeException, SystemException {
521 List<LayoutSetPrototype> list = findByCompanyId(companyId, 0, 1,
522 orderByComparator);
523
524 if (list.isEmpty()) {
525 StringBundler msg = new StringBundler(4);
526
527 msg.append(_NO_SUCH_ENTITY_WITH_KEY);
528
529 msg.append("companyId=");
530 msg.append(companyId);
531
532 msg.append(StringPool.CLOSE_CURLY_BRACE);
533
534 throw new NoSuchLayoutSetPrototypeException(msg.toString());
535 }
536 else {
537 return list.get(0);
538 }
539 }
540
541
554 public LayoutSetPrototype findByCompanyId_Last(long companyId,
555 OrderByComparator orderByComparator)
556 throws NoSuchLayoutSetPrototypeException, SystemException {
557 int count = countByCompanyId(companyId);
558
559 List<LayoutSetPrototype> list = findByCompanyId(companyId, count - 1,
560 count, orderByComparator);
561
562 if (list.isEmpty()) {
563 StringBundler msg = new StringBundler(4);
564
565 msg.append(_NO_SUCH_ENTITY_WITH_KEY);
566
567 msg.append("companyId=");
568 msg.append(companyId);
569
570 msg.append(StringPool.CLOSE_CURLY_BRACE);
571
572 throw new NoSuchLayoutSetPrototypeException(msg.toString());
573 }
574 else {
575 return list.get(0);
576 }
577 }
578
579
593 public LayoutSetPrototype[] findByCompanyId_PrevAndNext(
594 long layoutSetPrototypeId, long companyId,
595 OrderByComparator orderByComparator)
596 throws NoSuchLayoutSetPrototypeException, SystemException {
597 LayoutSetPrototype layoutSetPrototype = findByPrimaryKey(layoutSetPrototypeId);
598
599 Session session = null;
600
601 try {
602 session = openSession();
603
604 LayoutSetPrototype[] array = new LayoutSetPrototypeImpl[3];
605
606 array[0] = getByCompanyId_PrevAndNext(session, layoutSetPrototype,
607 companyId, orderByComparator, true);
608
609 array[1] = layoutSetPrototype;
610
611 array[2] = getByCompanyId_PrevAndNext(session, layoutSetPrototype,
612 companyId, orderByComparator, false);
613
614 return array;
615 }
616 catch (Exception e) {
617 throw processException(e);
618 }
619 finally {
620 closeSession(session);
621 }
622 }
623
624 protected LayoutSetPrototype getByCompanyId_PrevAndNext(Session session,
625 LayoutSetPrototype layoutSetPrototype, long companyId,
626 OrderByComparator orderByComparator, boolean previous) {
627 StringBundler query = null;
628
629 if (orderByComparator != null) {
630 query = new StringBundler(6 +
631 (orderByComparator.getOrderByFields().length * 6));
632 }
633 else {
634 query = new StringBundler(3);
635 }
636
637 query.append(_SQL_SELECT_LAYOUTSETPROTOTYPE_WHERE);
638
639 query.append(_FINDER_COLUMN_COMPANYID_COMPANYID_2);
640
641 if (orderByComparator != null) {
642 String[] orderByFields = orderByComparator.getOrderByFields();
643
644 if (orderByFields.length > 0) {
645 query.append(WHERE_AND);
646 }
647
648 for (int i = 0; i < orderByFields.length; i++) {
649 query.append(_ORDER_BY_ENTITY_ALIAS);
650 query.append(orderByFields[i]);
651
652 if ((i + 1) < orderByFields.length) {
653 if (orderByComparator.isAscending() ^ previous) {
654 query.append(WHERE_GREATER_THAN_HAS_NEXT);
655 }
656 else {
657 query.append(WHERE_LESSER_THAN_HAS_NEXT);
658 }
659 }
660 else {
661 if (orderByComparator.isAscending() ^ previous) {
662 query.append(WHERE_GREATER_THAN);
663 }
664 else {
665 query.append(WHERE_LESSER_THAN);
666 }
667 }
668 }
669
670 query.append(ORDER_BY_CLAUSE);
671
672 for (int i = 0; i < orderByFields.length; i++) {
673 query.append(_ORDER_BY_ENTITY_ALIAS);
674 query.append(orderByFields[i]);
675
676 if ((i + 1) < orderByFields.length) {
677 if (orderByComparator.isAscending() ^ previous) {
678 query.append(ORDER_BY_ASC_HAS_NEXT);
679 }
680 else {
681 query.append(ORDER_BY_DESC_HAS_NEXT);
682 }
683 }
684 else {
685 if (orderByComparator.isAscending() ^ previous) {
686 query.append(ORDER_BY_ASC);
687 }
688 else {
689 query.append(ORDER_BY_DESC);
690 }
691 }
692 }
693 }
694
695 String sql = query.toString();
696
697 Query q = session.createQuery(sql);
698
699 q.setFirstResult(0);
700 q.setMaxResults(2);
701
702 QueryPos qPos = QueryPos.getInstance(q);
703
704 qPos.add(companyId);
705
706 if (orderByComparator != null) {
707 Object[] values = orderByComparator.getOrderByValues(layoutSetPrototype);
708
709 for (Object value : values) {
710 qPos.add(value);
711 }
712 }
713
714 List<LayoutSetPrototype> list = q.list();
715
716 if (list.size() == 2) {
717 return list.get(1);
718 }
719 else {
720 return null;
721 }
722 }
723
724
731 public List<LayoutSetPrototype> filterFindByCompanyId(long companyId)
732 throws SystemException {
733 return filterFindByCompanyId(companyId, QueryUtil.ALL_POS,
734 QueryUtil.ALL_POS, null);
735 }
736
737
750 public List<LayoutSetPrototype> filterFindByCompanyId(long companyId,
751 int start, int end) throws SystemException {
752 return filterFindByCompanyId(companyId, start, end, null);
753 }
754
755
769 public List<LayoutSetPrototype> filterFindByCompanyId(long companyId,
770 int start, int end, OrderByComparator orderByComparator)
771 throws SystemException {
772 if (!InlineSQLHelperUtil.isEnabled()) {
773 return findByCompanyId(companyId, start, end, orderByComparator);
774 }
775
776 StringBundler query = null;
777
778 if (orderByComparator != null) {
779 query = new StringBundler(3 +
780 (orderByComparator.getOrderByFields().length * 3));
781 }
782 else {
783 query = new StringBundler(2);
784 }
785
786 if (getDB().isSupportsInlineDistinct()) {
787 query.append(_FILTER_SQL_SELECT_LAYOUTSETPROTOTYPE_WHERE);
788 }
789 else {
790 query.append(_FILTER_SQL_SELECT_LAYOUTSETPROTOTYPE_NO_INLINE_DISTINCT_WHERE_1);
791 }
792
793 query.append(_FINDER_COLUMN_COMPANYID_COMPANYID_2);
794
795 if (!getDB().isSupportsInlineDistinct()) {
796 query.append(_FILTER_SQL_SELECT_LAYOUTSETPROTOTYPE_NO_INLINE_DISTINCT_WHERE_2);
797 }
798
799 if (orderByComparator != null) {
800 if (getDB().isSupportsInlineDistinct()) {
801 appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS,
802 orderByComparator);
803 }
804 else {
805 appendOrderByComparator(query, _ORDER_BY_ENTITY_TABLE,
806 orderByComparator);
807 }
808 }
809
810 String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(),
811 LayoutSetPrototype.class.getName(), _FILTER_COLUMN_PK,
812 _FILTER_COLUMN_USERID);
813
814 Session session = null;
815
816 try {
817 session = openSession();
818
819 SQLQuery q = session.createSQLQuery(sql);
820
821 if (getDB().isSupportsInlineDistinct()) {
822 q.addEntity(_FILTER_ENTITY_ALIAS, LayoutSetPrototypeImpl.class);
823 }
824 else {
825 q.addEntity(_FILTER_ENTITY_TABLE, LayoutSetPrototypeImpl.class);
826 }
827
828 QueryPos qPos = QueryPos.getInstance(q);
829
830 qPos.add(companyId);
831
832 return (List<LayoutSetPrototype>)QueryUtil.list(q, getDialect(),
833 start, end);
834 }
835 catch (Exception e) {
836 throw processException(e);
837 }
838 finally {
839 closeSession(session);
840 }
841 }
842
843
851 public List<LayoutSetPrototype> findByC_A(long companyId, boolean active)
852 throws SystemException {
853 return findByC_A(companyId, active, QueryUtil.ALL_POS,
854 QueryUtil.ALL_POS, null);
855 }
856
857
871 public List<LayoutSetPrototype> findByC_A(long companyId, boolean active,
872 int start, int end) throws SystemException {
873 return findByC_A(companyId, active, start, end, null);
874 }
875
876
891 public List<LayoutSetPrototype> findByC_A(long companyId, boolean active,
892 int start, int end, OrderByComparator orderByComparator)
893 throws SystemException {
894 Object[] finderArgs = new Object[] {
895 companyId, active,
896
897 String.valueOf(start), String.valueOf(end),
898 String.valueOf(orderByComparator)
899 };
900
901 List<LayoutSetPrototype> list = (List<LayoutSetPrototype>)FinderCacheUtil.getResult(FINDER_PATH_FIND_BY_C_A,
902 finderArgs, this);
903
904 if (list == null) {
905 StringBundler query = null;
906
907 if (orderByComparator != null) {
908 query = new StringBundler(4 +
909 (orderByComparator.getOrderByFields().length * 3));
910 }
911 else {
912 query = new StringBundler(3);
913 }
914
915 query.append(_SQL_SELECT_LAYOUTSETPROTOTYPE_WHERE);
916
917 query.append(_FINDER_COLUMN_C_A_COMPANYID_2);
918
919 query.append(_FINDER_COLUMN_C_A_ACTIVE_2);
920
921 if (orderByComparator != null) {
922 appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS,
923 orderByComparator);
924 }
925
926 String sql = query.toString();
927
928 Session session = null;
929
930 try {
931 session = openSession();
932
933 Query q = session.createQuery(sql);
934
935 QueryPos qPos = QueryPos.getInstance(q);
936
937 qPos.add(companyId);
938
939 qPos.add(active);
940
941 list = (List<LayoutSetPrototype>)QueryUtil.list(q,
942 getDialect(), start, end);
943 }
944 catch (Exception e) {
945 throw processException(e);
946 }
947 finally {
948 if (list == null) {
949 FinderCacheUtil.removeResult(FINDER_PATH_FIND_BY_C_A,
950 finderArgs);
951 }
952 else {
953 cacheResult(list);
954
955 FinderCacheUtil.putResult(FINDER_PATH_FIND_BY_C_A,
956 finderArgs, list);
957 }
958
959 closeSession(session);
960 }
961 }
962
963 return list;
964 }
965
966
980 public LayoutSetPrototype findByC_A_First(long companyId, boolean active,
981 OrderByComparator orderByComparator)
982 throws NoSuchLayoutSetPrototypeException, SystemException {
983 List<LayoutSetPrototype> list = findByC_A(companyId, active, 0, 1,
984 orderByComparator);
985
986 if (list.isEmpty()) {
987 StringBundler msg = new StringBundler(6);
988
989 msg.append(_NO_SUCH_ENTITY_WITH_KEY);
990
991 msg.append("companyId=");
992 msg.append(companyId);
993
994 msg.append(", active=");
995 msg.append(active);
996
997 msg.append(StringPool.CLOSE_CURLY_BRACE);
998
999 throw new NoSuchLayoutSetPrototypeException(msg.toString());
1000 }
1001 else {
1002 return list.get(0);
1003 }
1004 }
1005
1006
1020 public LayoutSetPrototype findByC_A_Last(long companyId, boolean active,
1021 OrderByComparator orderByComparator)
1022 throws NoSuchLayoutSetPrototypeException, SystemException {
1023 int count = countByC_A(companyId, active);
1024
1025 List<LayoutSetPrototype> list = findByC_A(companyId, active, count - 1,
1026 count, orderByComparator);
1027
1028 if (list.isEmpty()) {
1029 StringBundler msg = new StringBundler(6);
1030
1031 msg.append(_NO_SUCH_ENTITY_WITH_KEY);
1032
1033 msg.append("companyId=");
1034 msg.append(companyId);
1035
1036 msg.append(", active=");
1037 msg.append(active);
1038
1039 msg.append(StringPool.CLOSE_CURLY_BRACE);
1040
1041 throw new NoSuchLayoutSetPrototypeException(msg.toString());
1042 }
1043 else {
1044 return list.get(0);
1045 }
1046 }
1047
1048
1063 public LayoutSetPrototype[] findByC_A_PrevAndNext(
1064 long layoutSetPrototypeId, long companyId, boolean active,
1065 OrderByComparator orderByComparator)
1066 throws NoSuchLayoutSetPrototypeException, SystemException {
1067 LayoutSetPrototype layoutSetPrototype = findByPrimaryKey(layoutSetPrototypeId);
1068
1069 Session session = null;
1070
1071 try {
1072 session = openSession();
1073
1074 LayoutSetPrototype[] array = new LayoutSetPrototypeImpl[3];
1075
1076 array[0] = getByC_A_PrevAndNext(session, layoutSetPrototype,
1077 companyId, active, orderByComparator, true);
1078
1079 array[1] = layoutSetPrototype;
1080
1081 array[2] = getByC_A_PrevAndNext(session, layoutSetPrototype,
1082 companyId, active, orderByComparator, false);
1083
1084 return array;
1085 }
1086 catch (Exception e) {
1087 throw processException(e);
1088 }
1089 finally {
1090 closeSession(session);
1091 }
1092 }
1093
1094 protected LayoutSetPrototype getByC_A_PrevAndNext(Session session,
1095 LayoutSetPrototype layoutSetPrototype, long companyId, boolean active,
1096 OrderByComparator orderByComparator, boolean previous) {
1097 StringBundler query = null;
1098
1099 if (orderByComparator != null) {
1100 query = new StringBundler(6 +
1101 (orderByComparator.getOrderByFields().length * 6));
1102 }
1103 else {
1104 query = new StringBundler(3);
1105 }
1106
1107 query.append(_SQL_SELECT_LAYOUTSETPROTOTYPE_WHERE);
1108
1109 query.append(_FINDER_COLUMN_C_A_COMPANYID_2);
1110
1111 query.append(_FINDER_COLUMN_C_A_ACTIVE_2);
1112
1113 if (orderByComparator != null) {
1114 String[] orderByFields = orderByComparator.getOrderByFields();
1115
1116 if (orderByFields.length > 0) {
1117 query.append(WHERE_AND);
1118 }
1119
1120 for (int i = 0; i < orderByFields.length; i++) {
1121 query.append(_ORDER_BY_ENTITY_ALIAS);
1122 query.append(orderByFields[i]);
1123
1124 if ((i + 1) < orderByFields.length) {
1125 if (orderByComparator.isAscending() ^ previous) {
1126 query.append(WHERE_GREATER_THAN_HAS_NEXT);
1127 }
1128 else {
1129 query.append(WHERE_LESSER_THAN_HAS_NEXT);
1130 }
1131 }
1132 else {
1133 if (orderByComparator.isAscending() ^ previous) {
1134 query.append(WHERE_GREATER_THAN);
1135 }
1136 else {
1137 query.append(WHERE_LESSER_THAN);
1138 }
1139 }
1140 }
1141
1142 query.append(ORDER_BY_CLAUSE);
1143
1144 for (int i = 0; i < orderByFields.length; i++) {
1145 query.append(_ORDER_BY_ENTITY_ALIAS);
1146 query.append(orderByFields[i]);
1147
1148 if ((i + 1) < orderByFields.length) {
1149 if (orderByComparator.isAscending() ^ previous) {
1150 query.append(ORDER_BY_ASC_HAS_NEXT);
1151 }
1152 else {
1153 query.append(ORDER_BY_DESC_HAS_NEXT);
1154 }
1155 }
1156 else {
1157 if (orderByComparator.isAscending() ^ previous) {
1158 query.append(ORDER_BY_ASC);
1159 }
1160 else {
1161 query.append(ORDER_BY_DESC);
1162 }
1163 }
1164 }
1165 }
1166
1167 String sql = query.toString();
1168
1169 Query q = session.createQuery(sql);
1170
1171 q.setFirstResult(0);
1172 q.setMaxResults(2);
1173
1174 QueryPos qPos = QueryPos.getInstance(q);
1175
1176 qPos.add(companyId);
1177
1178 qPos.add(active);
1179
1180 if (orderByComparator != null) {
1181 Object[] values = orderByComparator.getOrderByValues(layoutSetPrototype);
1182
1183 for (Object value : values) {
1184 qPos.add(value);
1185 }
1186 }
1187
1188 List<LayoutSetPrototype> list = q.list();
1189
1190 if (list.size() == 2) {
1191 return list.get(1);
1192 }
1193 else {
1194 return null;
1195 }
1196 }
1197
1198
1206 public List<LayoutSetPrototype> filterFindByC_A(long companyId,
1207 boolean active) throws SystemException {
1208 return filterFindByC_A(companyId, active, QueryUtil.ALL_POS,
1209 QueryUtil.ALL_POS, null);
1210 }
1211
1212
1226 public List<LayoutSetPrototype> filterFindByC_A(long companyId,
1227 boolean active, int start, int end) throws SystemException {
1228 return filterFindByC_A(companyId, active, start, end, null);
1229 }
1230
1231
1246 public List<LayoutSetPrototype> filterFindByC_A(long companyId,
1247 boolean active, int start, int end, OrderByComparator orderByComparator)
1248 throws SystemException {
1249 if (!InlineSQLHelperUtil.isEnabled()) {
1250 return findByC_A(companyId, active, start, end, orderByComparator);
1251 }
1252
1253 StringBundler query = null;
1254
1255 if (orderByComparator != null) {
1256 query = new StringBundler(4 +
1257 (orderByComparator.getOrderByFields().length * 3));
1258 }
1259 else {
1260 query = new StringBundler(3);
1261 }
1262
1263 if (getDB().isSupportsInlineDistinct()) {
1264 query.append(_FILTER_SQL_SELECT_LAYOUTSETPROTOTYPE_WHERE);
1265 }
1266 else {
1267 query.append(_FILTER_SQL_SELECT_LAYOUTSETPROTOTYPE_NO_INLINE_DISTINCT_WHERE_1);
1268 }
1269
1270 query.append(_FINDER_COLUMN_C_A_COMPANYID_2);
1271
1272 query.append(_FINDER_COLUMN_C_A_ACTIVE_2);
1273
1274 if (!getDB().isSupportsInlineDistinct()) {
1275 query.append(_FILTER_SQL_SELECT_LAYOUTSETPROTOTYPE_NO_INLINE_DISTINCT_WHERE_2);
1276 }
1277
1278 if (orderByComparator != null) {
1279 if (getDB().isSupportsInlineDistinct()) {
1280 appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS,
1281 orderByComparator);
1282 }
1283 else {
1284 appendOrderByComparator(query, _ORDER_BY_ENTITY_TABLE,
1285 orderByComparator);
1286 }
1287 }
1288
1289 String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(),
1290 LayoutSetPrototype.class.getName(), _FILTER_COLUMN_PK,
1291 _FILTER_COLUMN_USERID);
1292
1293 Session session = null;
1294
1295 try {
1296 session = openSession();
1297
1298 SQLQuery q = session.createSQLQuery(sql);
1299
1300 if (getDB().isSupportsInlineDistinct()) {
1301 q.addEntity(_FILTER_ENTITY_ALIAS, LayoutSetPrototypeImpl.class);
1302 }
1303 else {
1304 q.addEntity(_FILTER_ENTITY_TABLE, LayoutSetPrototypeImpl.class);
1305 }
1306
1307 QueryPos qPos = QueryPos.getInstance(q);
1308
1309 qPos.add(companyId);
1310
1311 qPos.add(active);
1312
1313 return (List<LayoutSetPrototype>)QueryUtil.list(q, getDialect(),
1314 start, end);
1315 }
1316 catch (Exception e) {
1317 throw processException(e);
1318 }
1319 finally {
1320 closeSession(session);
1321 }
1322 }
1323
1324
1330 public List<LayoutSetPrototype> findAll() throws SystemException {
1331 return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
1332 }
1333
1334
1346 public List<LayoutSetPrototype> findAll(int start, int end)
1347 throws SystemException {
1348 return findAll(start, end, null);
1349 }
1350
1351
1364 public List<LayoutSetPrototype> findAll(int start, int end,
1365 OrderByComparator orderByComparator) throws SystemException {
1366 Object[] finderArgs = new Object[] {
1367 String.valueOf(start), String.valueOf(end),
1368 String.valueOf(orderByComparator)
1369 };
1370
1371 List<LayoutSetPrototype> list = (List<LayoutSetPrototype>)FinderCacheUtil.getResult(FINDER_PATH_FIND_ALL,
1372 finderArgs, this);
1373
1374 if (list == null) {
1375 StringBundler query = null;
1376 String sql = null;
1377
1378 if (orderByComparator != null) {
1379 query = new StringBundler(2 +
1380 (orderByComparator.getOrderByFields().length * 3));
1381
1382 query.append(_SQL_SELECT_LAYOUTSETPROTOTYPE);
1383
1384 appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS,
1385 orderByComparator);
1386
1387 sql = query.toString();
1388 }
1389 else {
1390 sql = _SQL_SELECT_LAYOUTSETPROTOTYPE;
1391 }
1392
1393 Session session = null;
1394
1395 try {
1396 session = openSession();
1397
1398 Query q = session.createQuery(sql);
1399
1400 if (orderByComparator == null) {
1401 list = (List<LayoutSetPrototype>)QueryUtil.list(q,
1402 getDialect(), start, end, false);
1403
1404 Collections.sort(list);
1405 }
1406 else {
1407 list = (List<LayoutSetPrototype>)QueryUtil.list(q,
1408 getDialect(), start, end);
1409 }
1410 }
1411 catch (Exception e) {
1412 throw processException(e);
1413 }
1414 finally {
1415 if (list == null) {
1416 FinderCacheUtil.removeResult(FINDER_PATH_FIND_ALL,
1417 finderArgs);
1418 }
1419 else {
1420 cacheResult(list);
1421
1422 FinderCacheUtil.putResult(FINDER_PATH_FIND_ALL, finderArgs,
1423 list);
1424 }
1425
1426 closeSession(session);
1427 }
1428 }
1429
1430 return list;
1431 }
1432
1433
1439 public void removeByCompanyId(long companyId) throws SystemException {
1440 for (LayoutSetPrototype layoutSetPrototype : findByCompanyId(companyId)) {
1441 remove(layoutSetPrototype);
1442 }
1443 }
1444
1445
1452 public void removeByC_A(long companyId, boolean active)
1453 throws SystemException {
1454 for (LayoutSetPrototype layoutSetPrototype : findByC_A(companyId, active)) {
1455 remove(layoutSetPrototype);
1456 }
1457 }
1458
1459
1464 public void removeAll() throws SystemException {
1465 for (LayoutSetPrototype layoutSetPrototype : findAll()) {
1466 remove(layoutSetPrototype);
1467 }
1468 }
1469
1470
1477 public int countByCompanyId(long companyId) throws SystemException {
1478 Object[] finderArgs = new Object[] { companyId };
1479
1480 Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_BY_COMPANYID,
1481 finderArgs, this);
1482
1483 if (count == null) {
1484 StringBundler query = new StringBundler(2);
1485
1486 query.append(_SQL_COUNT_LAYOUTSETPROTOTYPE_WHERE);
1487
1488 query.append(_FINDER_COLUMN_COMPANYID_COMPANYID_2);
1489
1490 String sql = query.toString();
1491
1492 Session session = null;
1493
1494 try {
1495 session = openSession();
1496
1497 Query q = session.createQuery(sql);
1498
1499 QueryPos qPos = QueryPos.getInstance(q);
1500
1501 qPos.add(companyId);
1502
1503 count = (Long)q.uniqueResult();
1504 }
1505 catch (Exception e) {
1506 throw processException(e);
1507 }
1508 finally {
1509 if (count == null) {
1510 count = Long.valueOf(0);
1511 }
1512
1513 FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_COMPANYID,
1514 finderArgs, count);
1515
1516 closeSession(session);
1517 }
1518 }
1519
1520 return count.intValue();
1521 }
1522
1523
1530 public int filterCountByCompanyId(long companyId) throws SystemException {
1531 if (!InlineSQLHelperUtil.isEnabled()) {
1532 return countByCompanyId(companyId);
1533 }
1534
1535 StringBundler query = new StringBundler(2);
1536
1537 query.append(_FILTER_SQL_COUNT_LAYOUTSETPROTOTYPE_WHERE);
1538
1539 query.append(_FINDER_COLUMN_COMPANYID_COMPANYID_2);
1540
1541 String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(),
1542 LayoutSetPrototype.class.getName(), _FILTER_COLUMN_PK,
1543 _FILTER_COLUMN_USERID);
1544
1545 Session session = null;
1546
1547 try {
1548 session = openSession();
1549
1550 SQLQuery q = session.createSQLQuery(sql);
1551
1552 q.addScalar(COUNT_COLUMN_NAME,
1553 com.liferay.portal.kernel.dao.orm.Type.LONG);
1554
1555 QueryPos qPos = QueryPos.getInstance(q);
1556
1557 qPos.add(companyId);
1558
1559 Long count = (Long)q.uniqueResult();
1560
1561 return count.intValue();
1562 }
1563 catch (Exception e) {
1564 throw processException(e);
1565 }
1566 finally {
1567 closeSession(session);
1568 }
1569 }
1570
1571
1579 public int countByC_A(long companyId, boolean active)
1580 throws SystemException {
1581 Object[] finderArgs = new Object[] { companyId, active };
1582
1583 Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_BY_C_A,
1584 finderArgs, this);
1585
1586 if (count == null) {
1587 StringBundler query = new StringBundler(3);
1588
1589 query.append(_SQL_COUNT_LAYOUTSETPROTOTYPE_WHERE);
1590
1591 query.append(_FINDER_COLUMN_C_A_COMPANYID_2);
1592
1593 query.append(_FINDER_COLUMN_C_A_ACTIVE_2);
1594
1595 String sql = query.toString();
1596
1597 Session session = null;
1598
1599 try {
1600 session = openSession();
1601
1602 Query q = session.createQuery(sql);
1603
1604 QueryPos qPos = QueryPos.getInstance(q);
1605
1606 qPos.add(companyId);
1607
1608 qPos.add(active);
1609
1610 count = (Long)q.uniqueResult();
1611 }
1612 catch (Exception e) {
1613 throw processException(e);
1614 }
1615 finally {
1616 if (count == null) {
1617 count = Long.valueOf(0);
1618 }
1619
1620 FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_C_A, finderArgs,
1621 count);
1622
1623 closeSession(session);
1624 }
1625 }
1626
1627 return count.intValue();
1628 }
1629
1630
1638 public int filterCountByC_A(long companyId, boolean active)
1639 throws SystemException {
1640 if (!InlineSQLHelperUtil.isEnabled()) {
1641 return countByC_A(companyId, active);
1642 }
1643
1644 StringBundler query = new StringBundler(3);
1645
1646 query.append(_FILTER_SQL_COUNT_LAYOUTSETPROTOTYPE_WHERE);
1647
1648 query.append(_FINDER_COLUMN_C_A_COMPANYID_2);
1649
1650 query.append(_FINDER_COLUMN_C_A_ACTIVE_2);
1651
1652 String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(),
1653 LayoutSetPrototype.class.getName(), _FILTER_COLUMN_PK,
1654 _FILTER_COLUMN_USERID);
1655
1656 Session session = null;
1657
1658 try {
1659 session = openSession();
1660
1661 SQLQuery q = session.createSQLQuery(sql);
1662
1663 q.addScalar(COUNT_COLUMN_NAME,
1664 com.liferay.portal.kernel.dao.orm.Type.LONG);
1665
1666 QueryPos qPos = QueryPos.getInstance(q);
1667
1668 qPos.add(companyId);
1669
1670 qPos.add(active);
1671
1672 Long count = (Long)q.uniqueResult();
1673
1674 return count.intValue();
1675 }
1676 catch (Exception e) {
1677 throw processException(e);
1678 }
1679 finally {
1680 closeSession(session);
1681 }
1682 }
1683
1684
1690 public int countAll() throws SystemException {
1691 Object[] finderArgs = new Object[0];
1692
1693 Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_ALL,
1694 finderArgs, this);
1695
1696 if (count == null) {
1697 Session session = null;
1698
1699 try {
1700 session = openSession();
1701
1702 Query q = session.createQuery(_SQL_COUNT_LAYOUTSETPROTOTYPE);
1703
1704 count = (Long)q.uniqueResult();
1705 }
1706 catch (Exception e) {
1707 throw processException(e);
1708 }
1709 finally {
1710 if (count == null) {
1711 count = Long.valueOf(0);
1712 }
1713
1714 FinderCacheUtil.putResult(FINDER_PATH_COUNT_ALL, finderArgs,
1715 count);
1716
1717 closeSession(session);
1718 }
1719 }
1720
1721 return count.intValue();
1722 }
1723
1724
1727 public void afterPropertiesSet() {
1728 String[] listenerClassNames = StringUtil.split(GetterUtil.getString(
1729 com.liferay.portal.util.PropsUtil.get(
1730 "value.object.listener.com.liferay.portal.model.LayoutSetPrototype")));
1731
1732 if (listenerClassNames.length > 0) {
1733 try {
1734 List<ModelListener<LayoutSetPrototype>> listenersList = new ArrayList<ModelListener<LayoutSetPrototype>>();
1735
1736 for (String listenerClassName : listenerClassNames) {
1737 listenersList.add((ModelListener<LayoutSetPrototype>)InstanceFactory.newInstance(
1738 listenerClassName));
1739 }
1740
1741 listeners = listenersList.toArray(new ModelListener[listenersList.size()]);
1742 }
1743 catch (Exception e) {
1744 _log.error(e);
1745 }
1746 }
1747 }
1748
1749 public void destroy() {
1750 EntityCacheUtil.removeCache(LayoutSetPrototypeImpl.class.getName());
1751 FinderCacheUtil.removeCache(FINDER_CLASS_NAME_ENTITY);
1752 FinderCacheUtil.removeCache(FINDER_CLASS_NAME_LIST);
1753 }
1754
1755 @BeanReference(type = AccountPersistence.class)
1756 protected AccountPersistence accountPersistence;
1757 @BeanReference(type = AddressPersistence.class)
1758 protected AddressPersistence addressPersistence;
1759 @BeanReference(type = BrowserTrackerPersistence.class)
1760 protected BrowserTrackerPersistence browserTrackerPersistence;
1761 @BeanReference(type = ClassNamePersistence.class)
1762 protected ClassNamePersistence classNamePersistence;
1763 @BeanReference(type = ClusterGroupPersistence.class)
1764 protected ClusterGroupPersistence clusterGroupPersistence;
1765 @BeanReference(type = CompanyPersistence.class)
1766 protected CompanyPersistence companyPersistence;
1767 @BeanReference(type = ContactPersistence.class)
1768 protected ContactPersistence contactPersistence;
1769 @BeanReference(type = CountryPersistence.class)
1770 protected CountryPersistence countryPersistence;
1771 @BeanReference(type = EmailAddressPersistence.class)
1772 protected EmailAddressPersistence emailAddressPersistence;
1773 @BeanReference(type = GroupPersistence.class)
1774 protected GroupPersistence groupPersistence;
1775 @BeanReference(type = ImagePersistence.class)
1776 protected ImagePersistence imagePersistence;
1777 @BeanReference(type = LayoutPersistence.class)
1778 protected LayoutPersistence layoutPersistence;
1779 @BeanReference(type = LayoutPrototypePersistence.class)
1780 protected LayoutPrototypePersistence layoutPrototypePersistence;
1781 @BeanReference(type = LayoutSetPersistence.class)
1782 protected LayoutSetPersistence layoutSetPersistence;
1783 @BeanReference(type = LayoutSetPrototypePersistence.class)
1784 protected LayoutSetPrototypePersistence layoutSetPrototypePersistence;
1785 @BeanReference(type = ListTypePersistence.class)
1786 protected ListTypePersistence listTypePersistence;
1787 @BeanReference(type = LockPersistence.class)
1788 protected LockPersistence lockPersistence;
1789 @BeanReference(type = MembershipRequestPersistence.class)
1790 protected MembershipRequestPersistence membershipRequestPersistence;
1791 @BeanReference(type = OrganizationPersistence.class)
1792 protected OrganizationPersistence organizationPersistence;
1793 @BeanReference(type = OrgGroupPermissionPersistence.class)
1794 protected OrgGroupPermissionPersistence orgGroupPermissionPersistence;
1795 @BeanReference(type = OrgGroupRolePersistence.class)
1796 protected OrgGroupRolePersistence orgGroupRolePersistence;
1797 @BeanReference(type = OrgLaborPersistence.class)
1798 protected OrgLaborPersistence orgLaborPersistence;
1799 @BeanReference(type = PasswordPolicyPersistence.class)
1800 protected PasswordPolicyPersistence passwordPolicyPersistence;
1801 @BeanReference(type = PasswordPolicyRelPersistence.class)
1802 protected PasswordPolicyRelPersistence passwordPolicyRelPersistence;
1803 @BeanReference(type = PasswordTrackerPersistence.class)
1804 protected PasswordTrackerPersistence passwordTrackerPersistence;
1805 @BeanReference(type = PermissionPersistence.class)
1806 protected PermissionPersistence permissionPersistence;
1807 @BeanReference(type = PhonePersistence.class)
1808 protected PhonePersistence phonePersistence;
1809 @BeanReference(type = PluginSettingPersistence.class)
1810 protected PluginSettingPersistence pluginSettingPersistence;
1811 @BeanReference(type = PortletPersistence.class)
1812 protected PortletPersistence portletPersistence;
1813 @BeanReference(type = PortletItemPersistence.class)
1814 protected PortletItemPersistence portletItemPersistence;
1815 @BeanReference(type = PortletPreferencesPersistence.class)
1816 protected PortletPreferencesPersistence portletPreferencesPersistence;
1817 @BeanReference(type = RegionPersistence.class)
1818 protected RegionPersistence regionPersistence;
1819 @BeanReference(type = ReleasePersistence.class)
1820 protected ReleasePersistence releasePersistence;
1821 @BeanReference(type = ResourcePersistence.class)
1822 protected ResourcePersistence resourcePersistence;
1823 @BeanReference(type = ResourceActionPersistence.class)
1824 protected ResourceActionPersistence resourceActionPersistence;
1825 @BeanReference(type = ResourceCodePersistence.class)
1826 protected ResourceCodePersistence resourceCodePersistence;
1827 @BeanReference(type = ResourcePermissionPersistence.class)
1828 protected ResourcePermissionPersistence resourcePermissionPersistence;
1829 @BeanReference(type = RolePersistence.class)
1830 protected RolePersistence rolePersistence;
1831 @BeanReference(type = ServiceComponentPersistence.class)
1832 protected ServiceComponentPersistence serviceComponentPersistence;
1833 @BeanReference(type = ShardPersistence.class)
1834 protected ShardPersistence shardPersistence;
1835 @BeanReference(type = SubscriptionPersistence.class)
1836 protected SubscriptionPersistence subscriptionPersistence;
1837 @BeanReference(type = TicketPersistence.class)
1838 protected TicketPersistence ticketPersistence;
1839 @BeanReference(type = TeamPersistence.class)
1840 protected TeamPersistence teamPersistence;
1841 @BeanReference(type = UserPersistence.class)
1842 protected UserPersistence userPersistence;
1843 @BeanReference(type = UserGroupPersistence.class)
1844 protected UserGroupPersistence userGroupPersistence;
1845 @BeanReference(type = UserGroupGroupRolePersistence.class)
1846 protected UserGroupGroupRolePersistence userGroupGroupRolePersistence;
1847 @BeanReference(type = UserGroupRolePersistence.class)
1848 protected UserGroupRolePersistence userGroupRolePersistence;
1849 @BeanReference(type = UserIdMapperPersistence.class)
1850 protected UserIdMapperPersistence userIdMapperPersistence;
1851 @BeanReference(type = UserTrackerPersistence.class)
1852 protected UserTrackerPersistence userTrackerPersistence;
1853 @BeanReference(type = UserTrackerPathPersistence.class)
1854 protected UserTrackerPathPersistence userTrackerPathPersistence;
1855 @BeanReference(type = WebDAVPropsPersistence.class)
1856 protected WebDAVPropsPersistence webDAVPropsPersistence;
1857 @BeanReference(type = WebsitePersistence.class)
1858 protected WebsitePersistence websitePersistence;
1859 @BeanReference(type = WorkflowDefinitionLinkPersistence.class)
1860 protected WorkflowDefinitionLinkPersistence workflowDefinitionLinkPersistence;
1861 @BeanReference(type = WorkflowInstanceLinkPersistence.class)
1862 protected WorkflowInstanceLinkPersistence workflowInstanceLinkPersistence;
1863 private static final String _SQL_SELECT_LAYOUTSETPROTOTYPE = "SELECT layoutSetPrototype FROM LayoutSetPrototype layoutSetPrototype";
1864 private static final String _SQL_SELECT_LAYOUTSETPROTOTYPE_WHERE = "SELECT layoutSetPrototype FROM LayoutSetPrototype layoutSetPrototype WHERE ";
1865 private static final String _SQL_COUNT_LAYOUTSETPROTOTYPE = "SELECT COUNT(layoutSetPrototype) FROM LayoutSetPrototype layoutSetPrototype";
1866 private static final String _SQL_COUNT_LAYOUTSETPROTOTYPE_WHERE = "SELECT COUNT(layoutSetPrototype) FROM LayoutSetPrototype layoutSetPrototype WHERE ";
1867 private static final String _FINDER_COLUMN_COMPANYID_COMPANYID_2 = "layoutSetPrototype.companyId = ?";
1868 private static final String _FINDER_COLUMN_C_A_COMPANYID_2 = "layoutSetPrototype.companyId = ? AND ";
1869 private static final String _FINDER_COLUMN_C_A_ACTIVE_2 = "layoutSetPrototype.active = ?";
1870 private static final String _FILTER_SQL_SELECT_LAYOUTSETPROTOTYPE_WHERE = "SELECT DISTINCT {layoutSetPrototype.*} FROM LayoutSetPrototype layoutSetPrototype WHERE ";
1871 private static final String _FILTER_SQL_SELECT_LAYOUTSETPROTOTYPE_NO_INLINE_DISTINCT_WHERE_1 =
1872 "SELECT {LayoutSetPrototype.*} FROM (SELECT DISTINCT layoutSetPrototype.layoutSetPrototypeId FROM LayoutSetPrototype layoutSetPrototype WHERE ";
1873 private static final String _FILTER_SQL_SELECT_LAYOUTSETPROTOTYPE_NO_INLINE_DISTINCT_WHERE_2 =
1874 ") TEMP_TABLE INNER JOIN LayoutSetPrototype ON TEMP_TABLE.layoutSetPrototypeId = LayoutSetPrototype.layoutSetPrototypeId";
1875 private static final String _FILTER_SQL_COUNT_LAYOUTSETPROTOTYPE_WHERE = "SELECT COUNT(DISTINCT layoutSetPrototype.layoutSetPrototypeId) AS COUNT_VALUE FROM LayoutSetPrototype layoutSetPrototype WHERE ";
1876 private static final String _FILTER_COLUMN_PK = "layoutSetPrototype.layoutSetPrototypeId";
1877 private static final String _FILTER_COLUMN_USERID = null;
1878 private static final String _FILTER_ENTITY_ALIAS = "layoutSetPrototype";
1879 private static final String _FILTER_ENTITY_TABLE = "LayoutSetPrototype";
1880 private static final String _ORDER_BY_ENTITY_ALIAS = "layoutSetPrototype.";
1881 private static final String _ORDER_BY_ENTITY_TABLE = "LayoutSetPrototype.";
1882 private static final String _NO_SUCH_ENTITY_WITH_PRIMARY_KEY = "No LayoutSetPrototype exists with the primary key ";
1883 private static final String _NO_SUCH_ENTITY_WITH_KEY = "No LayoutSetPrototype exists with the key {";
1884 private static Log _log = LogFactoryUtil.getLog(LayoutSetPrototypePersistenceImpl.class);
1885 }