1
22
23 package com.liferay.portal.service.persistence;
24
25 import com.liferay.portal.NoSuchLockException;
26 import com.liferay.portal.SystemException;
27 import com.liferay.portal.kernel.annotation.BeanReference;
28 import com.liferay.portal.kernel.cache.CacheRegistry;
29 import com.liferay.portal.kernel.dao.orm.DynamicQuery;
30 import com.liferay.portal.kernel.dao.orm.EntityCacheUtil;
31 import com.liferay.portal.kernel.dao.orm.FinderCacheUtil;
32 import com.liferay.portal.kernel.dao.orm.FinderPath;
33 import com.liferay.portal.kernel.dao.orm.Query;
34 import com.liferay.portal.kernel.dao.orm.QueryPos;
35 import com.liferay.portal.kernel.dao.orm.QueryUtil;
36 import com.liferay.portal.kernel.dao.orm.Session;
37 import com.liferay.portal.kernel.log.Log;
38 import com.liferay.portal.kernel.log.LogFactoryUtil;
39 import com.liferay.portal.kernel.util.CalendarUtil;
40 import com.liferay.portal.kernel.util.GetterUtil;
41 import com.liferay.portal.kernel.util.OrderByComparator;
42 import com.liferay.portal.kernel.util.StringPool;
43 import com.liferay.portal.kernel.util.StringUtil;
44 import com.liferay.portal.kernel.util.Validator;
45 import com.liferay.portal.kernel.uuid.PortalUUIDUtil;
46 import com.liferay.portal.model.Lock;
47 import com.liferay.portal.model.ModelListener;
48 import com.liferay.portal.model.impl.LockImpl;
49 import com.liferay.portal.model.impl.LockModelImpl;
50 import com.liferay.portal.service.persistence.impl.BasePersistenceImpl;
51
52 import java.util.ArrayList;
53 import java.util.Collections;
54 import java.util.Date;
55 import java.util.List;
56
57
70 public class LockPersistenceImpl extends BasePersistenceImpl
71 implements LockPersistence {
72 public static final String FINDER_CLASS_NAME_ENTITY = LockImpl.class.getName();
73 public static final String FINDER_CLASS_NAME_LIST = FINDER_CLASS_NAME_ENTITY +
74 ".List";
75 public static final FinderPath FINDER_PATH_FIND_BY_UUID = new FinderPath(LockModelImpl.ENTITY_CACHE_ENABLED,
76 LockModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
77 "findByUuid", new String[] { String.class.getName() });
78 public static final FinderPath FINDER_PATH_FIND_BY_OBC_UUID = new FinderPath(LockModelImpl.ENTITY_CACHE_ENABLED,
79 LockModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
80 "findByUuid",
81 new String[] {
82 String.class.getName(),
83
84 "java.lang.Integer", "java.lang.Integer",
85 "com.liferay.portal.kernel.util.OrderByComparator"
86 });
87 public static final FinderPath FINDER_PATH_COUNT_BY_UUID = new FinderPath(LockModelImpl.ENTITY_CACHE_ENABLED,
88 LockModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
89 "countByUuid", new String[] { String.class.getName() });
90 public static final FinderPath FINDER_PATH_FIND_BY_EXPIRATIONDATE = new FinderPath(LockModelImpl.ENTITY_CACHE_ENABLED,
91 LockModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
92 "findByExpirationDate", new String[] { Date.class.getName() });
93 public static final FinderPath FINDER_PATH_FIND_BY_OBC_EXPIRATIONDATE = new FinderPath(LockModelImpl.ENTITY_CACHE_ENABLED,
94 LockModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
95 "findByExpirationDate",
96 new String[] {
97 Date.class.getName(),
98
99 "java.lang.Integer", "java.lang.Integer",
100 "com.liferay.portal.kernel.util.OrderByComparator"
101 });
102 public static final FinderPath FINDER_PATH_COUNT_BY_EXPIRATIONDATE = new FinderPath(LockModelImpl.ENTITY_CACHE_ENABLED,
103 LockModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
104 "countByExpirationDate", new String[] { Date.class.getName() });
105 public static final FinderPath FINDER_PATH_FETCH_BY_C_K = new FinderPath(LockModelImpl.ENTITY_CACHE_ENABLED,
106 LockModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_ENTITY,
107 "fetchByC_K",
108 new String[] { String.class.getName(), String.class.getName() });
109 public static final FinderPath FINDER_PATH_COUNT_BY_C_K = new FinderPath(LockModelImpl.ENTITY_CACHE_ENABLED,
110 LockModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
111 "countByC_K",
112 new String[] { String.class.getName(), String.class.getName() });
113 public static final FinderPath FINDER_PATH_FIND_ALL = new FinderPath(LockModelImpl.ENTITY_CACHE_ENABLED,
114 LockModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
115 "findAll", new String[0]);
116 public static final FinderPath FINDER_PATH_COUNT_ALL = new FinderPath(LockModelImpl.ENTITY_CACHE_ENABLED,
117 LockModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
118 "countAll", new String[0]);
119
120 public void cacheResult(Lock lock) {
121 EntityCacheUtil.putResult(LockModelImpl.ENTITY_CACHE_ENABLED,
122 LockImpl.class, lock.getPrimaryKey(), lock);
123
124 FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_C_K,
125 new Object[] { lock.getClassName(), lock.getKey() }, lock);
126 }
127
128 public void cacheResult(List<Lock> locks) {
129 for (Lock lock : locks) {
130 if (EntityCacheUtil.getResult(LockModelImpl.ENTITY_CACHE_ENABLED,
131 LockImpl.class, lock.getPrimaryKey(), this) == null) {
132 cacheResult(lock);
133 }
134 }
135 }
136
137 public void clearCache() {
138 CacheRegistry.clear(LockImpl.class.getName());
139 EntityCacheUtil.clearCache(LockImpl.class.getName());
140 FinderCacheUtil.clearCache(FINDER_CLASS_NAME_ENTITY);
141 FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST);
142 }
143
144 public Lock create(long lockId) {
145 Lock lock = new LockImpl();
146
147 lock.setNew(true);
148 lock.setPrimaryKey(lockId);
149
150 String uuid = PortalUUIDUtil.generate();
151
152 lock.setUuid(uuid);
153
154 return lock;
155 }
156
157 public Lock remove(long lockId) throws NoSuchLockException, SystemException {
158 Session session = null;
159
160 try {
161 session = openSession();
162
163 Lock lock = (Lock)session.get(LockImpl.class, new Long(lockId));
164
165 if (lock == null) {
166 if (_log.isWarnEnabled()) {
167 _log.warn("No Lock exists with the primary key " + lockId);
168 }
169
170 throw new NoSuchLockException(
171 "No Lock exists with the primary key " + lockId);
172 }
173
174 return remove(lock);
175 }
176 catch (NoSuchLockException nsee) {
177 throw nsee;
178 }
179 catch (Exception e) {
180 throw processException(e);
181 }
182 finally {
183 closeSession(session);
184 }
185 }
186
187 public Lock remove(Lock lock) throws SystemException {
188 for (ModelListener<Lock> listener : listeners) {
189 listener.onBeforeRemove(lock);
190 }
191
192 lock = removeImpl(lock);
193
194 for (ModelListener<Lock> listener : listeners) {
195 listener.onAfterRemove(lock);
196 }
197
198 return lock;
199 }
200
201 protected Lock removeImpl(Lock lock) throws SystemException {
202 lock = toUnwrappedModel(lock);
203
204 Session session = null;
205
206 try {
207 session = openSession();
208
209 if (lock.isCachedModel() || BatchSessionUtil.isEnabled()) {
210 Object staleObject = session.get(LockImpl.class,
211 lock.getPrimaryKeyObj());
212
213 if (staleObject != null) {
214 session.evict(staleObject);
215 }
216 }
217
218 session.delete(lock);
219
220 session.flush();
221 }
222 catch (Exception e) {
223 throw processException(e);
224 }
225 finally {
226 closeSession(session);
227 }
228
229 FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST);
230
231 LockModelImpl lockModelImpl = (LockModelImpl)lock;
232
233 FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_C_K,
234 new Object[] {
235 lockModelImpl.getOriginalClassName(),
236
237 lockModelImpl.getOriginalKey()
238 });
239
240 EntityCacheUtil.removeResult(LockModelImpl.ENTITY_CACHE_ENABLED,
241 LockImpl.class, lock.getPrimaryKey());
242
243 return lock;
244 }
245
246
249 public Lock update(Lock lock) throws SystemException {
250 if (_log.isWarnEnabled()) {
251 _log.warn(
252 "Using the deprecated update(Lock lock) method. Use update(Lock lock, boolean merge) instead.");
253 }
254
255 return update(lock, false);
256 }
257
258
270 public Lock update(Lock lock, boolean merge) throws SystemException {
271 boolean isNew = lock.isNew();
272
273 for (ModelListener<Lock> listener : listeners) {
274 if (isNew) {
275 listener.onBeforeCreate(lock);
276 }
277 else {
278 listener.onBeforeUpdate(lock);
279 }
280 }
281
282 lock = updateImpl(lock, merge);
283
284 for (ModelListener<Lock> listener : listeners) {
285 if (isNew) {
286 listener.onAfterCreate(lock);
287 }
288 else {
289 listener.onAfterUpdate(lock);
290 }
291 }
292
293 return lock;
294 }
295
296 public Lock updateImpl(com.liferay.portal.model.Lock lock, boolean merge)
297 throws SystemException {
298 lock = toUnwrappedModel(lock);
299
300 boolean isNew = lock.isNew();
301
302 LockModelImpl lockModelImpl = (LockModelImpl)lock;
303
304 if (Validator.isNull(lock.getUuid())) {
305 String uuid = PortalUUIDUtil.generate();
306
307 lock.setUuid(uuid);
308 }
309
310 Session session = null;
311
312 try {
313 session = openSession();
314
315 BatchSessionUtil.update(session, lock, merge);
316
317 lock.setNew(false);
318 }
319 catch (Exception e) {
320 throw processException(e);
321 }
322 finally {
323 closeSession(session);
324 }
325
326 FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST);
327
328 EntityCacheUtil.putResult(LockModelImpl.ENTITY_CACHE_ENABLED,
329 LockImpl.class, lock.getPrimaryKey(), lock);
330
331 if (!isNew &&
332 (!Validator.equals(lock.getClassName(),
333 lockModelImpl.getOriginalClassName()) ||
334 !Validator.equals(lock.getKey(), lockModelImpl.getOriginalKey()))) {
335 FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_C_K,
336 new Object[] {
337 lockModelImpl.getOriginalClassName(),
338
339 lockModelImpl.getOriginalKey()
340 });
341 }
342
343 if (isNew ||
344 (!Validator.equals(lock.getClassName(),
345 lockModelImpl.getOriginalClassName()) ||
346 !Validator.equals(lock.getKey(), lockModelImpl.getOriginalKey()))) {
347 FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_C_K,
348 new Object[] { lock.getClassName(), lock.getKey() }, lock);
349 }
350
351 return lock;
352 }
353
354 protected Lock toUnwrappedModel(Lock lock) {
355 if (lock instanceof LockImpl) {
356 return lock;
357 }
358
359 LockImpl lockImpl = new LockImpl();
360
361 lockImpl.setNew(lock.isNew());
362 lockImpl.setPrimaryKey(lock.getPrimaryKey());
363
364 lockImpl.setUuid(lock.getUuid());
365 lockImpl.setLockId(lock.getLockId());
366 lockImpl.setCompanyId(lock.getCompanyId());
367 lockImpl.setUserId(lock.getUserId());
368 lockImpl.setUserName(lock.getUserName());
369 lockImpl.setCreateDate(lock.getCreateDate());
370 lockImpl.setClassName(lock.getClassName());
371 lockImpl.setKey(lock.getKey());
372 lockImpl.setOwner(lock.getOwner());
373 lockImpl.setInheritable(lock.isInheritable());
374 lockImpl.setExpirationDate(lock.getExpirationDate());
375
376 return lockImpl;
377 }
378
379 public Lock findByPrimaryKey(long lockId)
380 throws NoSuchLockException, SystemException {
381 Lock lock = fetchByPrimaryKey(lockId);
382
383 if (lock == null) {
384 if (_log.isWarnEnabled()) {
385 _log.warn("No Lock exists with the primary key " + lockId);
386 }
387
388 throw new NoSuchLockException(
389 "No Lock exists with the primary key " + lockId);
390 }
391
392 return lock;
393 }
394
395 public Lock fetchByPrimaryKey(long lockId) throws SystemException {
396 Lock lock = (Lock)EntityCacheUtil.getResult(LockModelImpl.ENTITY_CACHE_ENABLED,
397 LockImpl.class, lockId, this);
398
399 if (lock == null) {
400 Session session = null;
401
402 try {
403 session = openSession();
404
405 lock = (Lock)session.get(LockImpl.class, new Long(lockId));
406 }
407 catch (Exception e) {
408 throw processException(e);
409 }
410 finally {
411 if (lock != null) {
412 cacheResult(lock);
413 }
414
415 closeSession(session);
416 }
417 }
418
419 return lock;
420 }
421
422 public List<Lock> findByUuid(String uuid) throws SystemException {
423 Object[] finderArgs = new Object[] { uuid };
424
425 List<Lock> list = (List<Lock>)FinderCacheUtil.getResult(FINDER_PATH_FIND_BY_UUID,
426 finderArgs, this);
427
428 if (list == null) {
429 Session session = null;
430
431 try {
432 session = openSession();
433
434 StringBuilder query = new StringBuilder();
435
436 query.append("SELECT lock FROM Lock lock WHERE ");
437
438 if (uuid == null) {
439 query.append("lock.uuid IS NULL");
440 }
441 else {
442 query.append("lock.uuid = ?");
443 }
444
445 query.append(" ");
446
447 Query q = session.createQuery(query.toString());
448
449 QueryPos qPos = QueryPos.getInstance(q);
450
451 if (uuid != null) {
452 qPos.add(uuid);
453 }
454
455 list = q.list();
456 }
457 catch (Exception e) {
458 throw processException(e);
459 }
460 finally {
461 if (list == null) {
462 list = new ArrayList<Lock>();
463 }
464
465 cacheResult(list);
466
467 FinderCacheUtil.putResult(FINDER_PATH_FIND_BY_UUID, finderArgs,
468 list);
469
470 closeSession(session);
471 }
472 }
473
474 return list;
475 }
476
477 public List<Lock> findByUuid(String uuid, int start, int end)
478 throws SystemException {
479 return findByUuid(uuid, start, end, null);
480 }
481
482 public List<Lock> findByUuid(String uuid, int start, int end,
483 OrderByComparator obc) throws SystemException {
484 Object[] finderArgs = new Object[] {
485 uuid,
486
487 String.valueOf(start), String.valueOf(end), String.valueOf(obc)
488 };
489
490 List<Lock> list = (List<Lock>)FinderCacheUtil.getResult(FINDER_PATH_FIND_BY_OBC_UUID,
491 finderArgs, this);
492
493 if (list == null) {
494 Session session = null;
495
496 try {
497 session = openSession();
498
499 StringBuilder query = new StringBuilder();
500
501 query.append("SELECT lock FROM Lock lock WHERE ");
502
503 if (uuid == null) {
504 query.append("lock.uuid IS NULL");
505 }
506 else {
507 query.append("lock.uuid = ?");
508 }
509
510 query.append(" ");
511
512 if (obc != null) {
513 query.append("ORDER BY ");
514
515 String[] orderByFields = obc.getOrderByFields();
516
517 for (int i = 0; i < orderByFields.length; i++) {
518 query.append("lock.");
519 query.append(orderByFields[i]);
520
521 if (obc.isAscending()) {
522 query.append(" ASC");
523 }
524 else {
525 query.append(" DESC");
526 }
527
528 if ((i + 1) < orderByFields.length) {
529 query.append(", ");
530 }
531 }
532 }
533
534 Query q = session.createQuery(query.toString());
535
536 QueryPos qPos = QueryPos.getInstance(q);
537
538 if (uuid != null) {
539 qPos.add(uuid);
540 }
541
542 list = (List<Lock>)QueryUtil.list(q, getDialect(), start, end);
543 }
544 catch (Exception e) {
545 throw processException(e);
546 }
547 finally {
548 if (list == null) {
549 list = new ArrayList<Lock>();
550 }
551
552 cacheResult(list);
553
554 FinderCacheUtil.putResult(FINDER_PATH_FIND_BY_OBC_UUID,
555 finderArgs, list);
556
557 closeSession(session);
558 }
559 }
560
561 return list;
562 }
563
564 public Lock findByUuid_First(String uuid, OrderByComparator obc)
565 throws NoSuchLockException, SystemException {
566 List<Lock> list = findByUuid(uuid, 0, 1, obc);
567
568 if (list.isEmpty()) {
569 StringBuilder msg = new StringBuilder();
570
571 msg.append("No Lock exists with the key {");
572
573 msg.append("uuid=" + uuid);
574
575 msg.append(StringPool.CLOSE_CURLY_BRACE);
576
577 throw new NoSuchLockException(msg.toString());
578 }
579 else {
580 return list.get(0);
581 }
582 }
583
584 public Lock findByUuid_Last(String uuid, OrderByComparator obc)
585 throws NoSuchLockException, SystemException {
586 int count = countByUuid(uuid);
587
588 List<Lock> list = findByUuid(uuid, count - 1, count, obc);
589
590 if (list.isEmpty()) {
591 StringBuilder msg = new StringBuilder();
592
593 msg.append("No Lock exists with the key {");
594
595 msg.append("uuid=" + uuid);
596
597 msg.append(StringPool.CLOSE_CURLY_BRACE);
598
599 throw new NoSuchLockException(msg.toString());
600 }
601 else {
602 return list.get(0);
603 }
604 }
605
606 public Lock[] findByUuid_PrevAndNext(long lockId, String uuid,
607 OrderByComparator obc) throws NoSuchLockException, SystemException {
608 Lock lock = findByPrimaryKey(lockId);
609
610 int count = countByUuid(uuid);
611
612 Session session = null;
613
614 try {
615 session = openSession();
616
617 StringBuilder query = new StringBuilder();
618
619 query.append("SELECT lock FROM Lock lock WHERE ");
620
621 if (uuid == null) {
622 query.append("lock.uuid IS NULL");
623 }
624 else {
625 query.append("lock.uuid = ?");
626 }
627
628 query.append(" ");
629
630 if (obc != null) {
631 query.append("ORDER BY ");
632
633 String[] orderByFields = obc.getOrderByFields();
634
635 for (int i = 0; i < orderByFields.length; i++) {
636 query.append("lock.");
637 query.append(orderByFields[i]);
638
639 if (obc.isAscending()) {
640 query.append(" ASC");
641 }
642 else {
643 query.append(" DESC");
644 }
645
646 if ((i + 1) < orderByFields.length) {
647 query.append(", ");
648 }
649 }
650 }
651
652 Query q = session.createQuery(query.toString());
653
654 QueryPos qPos = QueryPos.getInstance(q);
655
656 if (uuid != null) {
657 qPos.add(uuid);
658 }
659
660 Object[] objArray = QueryUtil.getPrevAndNext(q, count, obc, lock);
661
662 Lock[] array = new LockImpl[3];
663
664 array[0] = (Lock)objArray[0];
665 array[1] = (Lock)objArray[1];
666 array[2] = (Lock)objArray[2];
667
668 return array;
669 }
670 catch (Exception e) {
671 throw processException(e);
672 }
673 finally {
674 closeSession(session);
675 }
676 }
677
678 public List<Lock> findByExpirationDate(Date expirationDate)
679 throws SystemException {
680 Object[] finderArgs = new Object[] { expirationDate };
681
682 List<Lock> list = (List<Lock>)FinderCacheUtil.getResult(FINDER_PATH_FIND_BY_EXPIRATIONDATE,
683 finderArgs, this);
684
685 if (list == null) {
686 Session session = null;
687
688 try {
689 session = openSession();
690
691 StringBuilder query = new StringBuilder();
692
693 query.append("SELECT lock FROM Lock lock WHERE ");
694
695 if (expirationDate == null) {
696 query.append("lock.expirationDate < null");
697 }
698 else {
699 query.append("lock.expirationDate < ?");
700 }
701
702 query.append(" ");
703
704 Query q = session.createQuery(query.toString());
705
706 QueryPos qPos = QueryPos.getInstance(q);
707
708 if (expirationDate != null) {
709 qPos.add(CalendarUtil.getTimestamp(expirationDate));
710 }
711
712 list = q.list();
713 }
714 catch (Exception e) {
715 throw processException(e);
716 }
717 finally {
718 if (list == null) {
719 list = new ArrayList<Lock>();
720 }
721
722 cacheResult(list);
723
724 FinderCacheUtil.putResult(FINDER_PATH_FIND_BY_EXPIRATIONDATE,
725 finderArgs, list);
726
727 closeSession(session);
728 }
729 }
730
731 return list;
732 }
733
734 public List<Lock> findByExpirationDate(Date expirationDate, int start,
735 int end) throws SystemException {
736 return findByExpirationDate(expirationDate, start, end, null);
737 }
738
739 public List<Lock> findByExpirationDate(Date expirationDate, int start,
740 int end, OrderByComparator obc) throws SystemException {
741 Object[] finderArgs = new Object[] {
742 expirationDate,
743
744 String.valueOf(start), String.valueOf(end), String.valueOf(obc)
745 };
746
747 List<Lock> list = (List<Lock>)FinderCacheUtil.getResult(FINDER_PATH_FIND_BY_OBC_EXPIRATIONDATE,
748 finderArgs, this);
749
750 if (list == null) {
751 Session session = null;
752
753 try {
754 session = openSession();
755
756 StringBuilder query = new StringBuilder();
757
758 query.append("SELECT lock FROM Lock lock WHERE ");
759
760 if (expirationDate == null) {
761 query.append("lock.expirationDate < null");
762 }
763 else {
764 query.append("lock.expirationDate < ?");
765 }
766
767 query.append(" ");
768
769 if (obc != null) {
770 query.append("ORDER BY ");
771
772 String[] orderByFields = obc.getOrderByFields();
773
774 for (int i = 0; i < orderByFields.length; i++) {
775 query.append("lock.");
776 query.append(orderByFields[i]);
777
778 if (obc.isAscending()) {
779 query.append(" ASC");
780 }
781 else {
782 query.append(" DESC");
783 }
784
785 if ((i + 1) < orderByFields.length) {
786 query.append(", ");
787 }
788 }
789 }
790
791 Query q = session.createQuery(query.toString());
792
793 QueryPos qPos = QueryPos.getInstance(q);
794
795 if (expirationDate != null) {
796 qPos.add(CalendarUtil.getTimestamp(expirationDate));
797 }
798
799 list = (List<Lock>)QueryUtil.list(q, getDialect(), start, end);
800 }
801 catch (Exception e) {
802 throw processException(e);
803 }
804 finally {
805 if (list == null) {
806 list = new ArrayList<Lock>();
807 }
808
809 cacheResult(list);
810
811 FinderCacheUtil.putResult(FINDER_PATH_FIND_BY_OBC_EXPIRATIONDATE,
812 finderArgs, list);
813
814 closeSession(session);
815 }
816 }
817
818 return list;
819 }
820
821 public Lock findByExpirationDate_First(Date expirationDate,
822 OrderByComparator obc) throws NoSuchLockException, SystemException {
823 List<Lock> list = findByExpirationDate(expirationDate, 0, 1, obc);
824
825 if (list.isEmpty()) {
826 StringBuilder msg = new StringBuilder();
827
828 msg.append("No Lock exists with the key {");
829
830 msg.append("expirationDate=" + expirationDate);
831
832 msg.append(StringPool.CLOSE_CURLY_BRACE);
833
834 throw new NoSuchLockException(msg.toString());
835 }
836 else {
837 return list.get(0);
838 }
839 }
840
841 public Lock findByExpirationDate_Last(Date expirationDate,
842 OrderByComparator obc) throws NoSuchLockException, SystemException {
843 int count = countByExpirationDate(expirationDate);
844
845 List<Lock> list = findByExpirationDate(expirationDate, count - 1,
846 count, obc);
847
848 if (list.isEmpty()) {
849 StringBuilder msg = new StringBuilder();
850
851 msg.append("No Lock exists with the key {");
852
853 msg.append("expirationDate=" + expirationDate);
854
855 msg.append(StringPool.CLOSE_CURLY_BRACE);
856
857 throw new NoSuchLockException(msg.toString());
858 }
859 else {
860 return list.get(0);
861 }
862 }
863
864 public Lock[] findByExpirationDate_PrevAndNext(long lockId,
865 Date expirationDate, OrderByComparator obc)
866 throws NoSuchLockException, SystemException {
867 Lock lock = findByPrimaryKey(lockId);
868
869 int count = countByExpirationDate(expirationDate);
870
871 Session session = null;
872
873 try {
874 session = openSession();
875
876 StringBuilder query = new StringBuilder();
877
878 query.append("SELECT lock FROM Lock lock WHERE ");
879
880 if (expirationDate == null) {
881 query.append("lock.expirationDate < null");
882 }
883 else {
884 query.append("lock.expirationDate < ?");
885 }
886
887 query.append(" ");
888
889 if (obc != null) {
890 query.append("ORDER BY ");
891
892 String[] orderByFields = obc.getOrderByFields();
893
894 for (int i = 0; i < orderByFields.length; i++) {
895 query.append("lock.");
896 query.append(orderByFields[i]);
897
898 if (obc.isAscending()) {
899 query.append(" ASC");
900 }
901 else {
902 query.append(" DESC");
903 }
904
905 if ((i + 1) < orderByFields.length) {
906 query.append(", ");
907 }
908 }
909 }
910
911 Query q = session.createQuery(query.toString());
912
913 QueryPos qPos = QueryPos.getInstance(q);
914
915 if (expirationDate != null) {
916 qPos.add(CalendarUtil.getTimestamp(expirationDate));
917 }
918
919 Object[] objArray = QueryUtil.getPrevAndNext(q, count, obc, lock);
920
921 Lock[] array = new LockImpl[3];
922
923 array[0] = (Lock)objArray[0];
924 array[1] = (Lock)objArray[1];
925 array[2] = (Lock)objArray[2];
926
927 return array;
928 }
929 catch (Exception e) {
930 throw processException(e);
931 }
932 finally {
933 closeSession(session);
934 }
935 }
936
937 public Lock findByC_K(String className, String key)
938 throws NoSuchLockException, SystemException {
939 Lock lock = fetchByC_K(className, key);
940
941 if (lock == null) {
942 StringBuilder msg = new StringBuilder();
943
944 msg.append("No Lock exists with the key {");
945
946 msg.append("className=" + className);
947
948 msg.append(", ");
949 msg.append("key=" + key);
950
951 msg.append(StringPool.CLOSE_CURLY_BRACE);
952
953 if (_log.isWarnEnabled()) {
954 _log.warn(msg.toString());
955 }
956
957 throw new NoSuchLockException(msg.toString());
958 }
959
960 return lock;
961 }
962
963 public Lock fetchByC_K(String className, String key)
964 throws SystemException {
965 return fetchByC_K(className, key, true);
966 }
967
968 public Lock fetchByC_K(String className, String key,
969 boolean retrieveFromCache) throws SystemException {
970 Object[] finderArgs = new Object[] { className, key };
971
972 Object result = null;
973
974 if (retrieveFromCache) {
975 result = FinderCacheUtil.getResult(FINDER_PATH_FETCH_BY_C_K,
976 finderArgs, this);
977 }
978
979 if (result == null) {
980 Session session = null;
981
982 try {
983 session = openSession();
984
985 StringBuilder query = new StringBuilder();
986
987 query.append("SELECT lock FROM Lock lock WHERE ");
988
989 if (className == null) {
990 query.append("lock.className IS NULL");
991 }
992 else {
993 query.append("lock.className = ?");
994 }
995
996 query.append(" AND ");
997
998 if (key == null) {
999 query.append("lock.key IS NULL");
1000 }
1001 else {
1002 query.append("lock.key = ?");
1003 }
1004
1005 query.append(" ");
1006
1007 Query q = session.createQuery(query.toString());
1008
1009 QueryPos qPos = QueryPos.getInstance(q);
1010
1011 if (className != null) {
1012 qPos.add(className);
1013 }
1014
1015 if (key != null) {
1016 qPos.add(key);
1017 }
1018
1019 List<Lock> list = q.list();
1020
1021 result = list;
1022
1023 Lock lock = null;
1024
1025 if (list.isEmpty()) {
1026 FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_C_K,
1027 finderArgs, list);
1028 }
1029 else {
1030 lock = list.get(0);
1031
1032 cacheResult(lock);
1033
1034 if ((lock.getClassName() == null) ||
1035 !lock.getClassName().equals(className) ||
1036 (lock.getKey() == null) ||
1037 !lock.getKey().equals(key)) {
1038 FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_C_K,
1039 finderArgs, lock);
1040 }
1041 }
1042
1043 return lock;
1044 }
1045 catch (Exception e) {
1046 throw processException(e);
1047 }
1048 finally {
1049 if (result == null) {
1050 FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_C_K,
1051 finderArgs, new ArrayList<Lock>());
1052 }
1053
1054 closeSession(session);
1055 }
1056 }
1057 else {
1058 if (result instanceof List<?>) {
1059 return null;
1060 }
1061 else {
1062 return (Lock)result;
1063 }
1064 }
1065 }
1066
1067 public List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
1068 throws SystemException {
1069 Session session = null;
1070
1071 try {
1072 session = openSession();
1073
1074 dynamicQuery.compile(session);
1075
1076 return dynamicQuery.list();
1077 }
1078 catch (Exception e) {
1079 throw processException(e);
1080 }
1081 finally {
1082 closeSession(session);
1083 }
1084 }
1085
1086 public List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery,
1087 int start, int end) throws SystemException {
1088 Session session = null;
1089
1090 try {
1091 session = openSession();
1092
1093 dynamicQuery.setLimit(start, end);
1094
1095 dynamicQuery.compile(session);
1096
1097 return dynamicQuery.list();
1098 }
1099 catch (Exception e) {
1100 throw processException(e);
1101 }
1102 finally {
1103 closeSession(session);
1104 }
1105 }
1106
1107 public List<Lock> findAll() throws SystemException {
1108 return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
1109 }
1110
1111 public List<Lock> findAll(int start, int end) throws SystemException {
1112 return findAll(start, end, null);
1113 }
1114
1115 public List<Lock> findAll(int start, int end, OrderByComparator obc)
1116 throws SystemException {
1117 Object[] finderArgs = new Object[] {
1118 String.valueOf(start), String.valueOf(end), String.valueOf(obc)
1119 };
1120
1121 List<Lock> list = (List<Lock>)FinderCacheUtil.getResult(FINDER_PATH_FIND_ALL,
1122 finderArgs, this);
1123
1124 if (list == null) {
1125 Session session = null;
1126
1127 try {
1128 session = openSession();
1129
1130 StringBuilder query = new StringBuilder();
1131
1132 query.append("SELECT lock FROM Lock lock ");
1133
1134 if (obc != null) {
1135 query.append("ORDER BY ");
1136
1137 String[] orderByFields = obc.getOrderByFields();
1138
1139 for (int i = 0; i < orderByFields.length; i++) {
1140 query.append("lock.");
1141 query.append(orderByFields[i]);
1142
1143 if (obc.isAscending()) {
1144 query.append(" ASC");
1145 }
1146 else {
1147 query.append(" DESC");
1148 }
1149
1150 if ((i + 1) < orderByFields.length) {
1151 query.append(", ");
1152 }
1153 }
1154 }
1155
1156 Query q = session.createQuery(query.toString());
1157
1158 if (obc == null) {
1159 list = (List<Lock>)QueryUtil.list(q, getDialect(), start,
1160 end, false);
1161
1162 Collections.sort(list);
1163 }
1164 else {
1165 list = (List<Lock>)QueryUtil.list(q, getDialect(), start,
1166 end);
1167 }
1168 }
1169 catch (Exception e) {
1170 throw processException(e);
1171 }
1172 finally {
1173 if (list == null) {
1174 list = new ArrayList<Lock>();
1175 }
1176
1177 cacheResult(list);
1178
1179 FinderCacheUtil.putResult(FINDER_PATH_FIND_ALL, finderArgs, list);
1180
1181 closeSession(session);
1182 }
1183 }
1184
1185 return list;
1186 }
1187
1188 public void removeByUuid(String uuid) throws SystemException {
1189 for (Lock lock : findByUuid(uuid)) {
1190 remove(lock);
1191 }
1192 }
1193
1194 public void removeByExpirationDate(Date expirationDate)
1195 throws SystemException {
1196 for (Lock lock : findByExpirationDate(expirationDate)) {
1197 remove(lock);
1198 }
1199 }
1200
1201 public void removeByC_K(String className, String key)
1202 throws NoSuchLockException, SystemException {
1203 Lock lock = findByC_K(className, key);
1204
1205 remove(lock);
1206 }
1207
1208 public void removeAll() throws SystemException {
1209 for (Lock lock : findAll()) {
1210 remove(lock);
1211 }
1212 }
1213
1214 public int countByUuid(String uuid) throws SystemException {
1215 Object[] finderArgs = new Object[] { uuid };
1216
1217 Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_BY_UUID,
1218 finderArgs, this);
1219
1220 if (count == null) {
1221 Session session = null;
1222
1223 try {
1224 session = openSession();
1225
1226 StringBuilder query = new StringBuilder();
1227
1228 query.append("SELECT COUNT(lock) ");
1229 query.append("FROM Lock lock WHERE ");
1230
1231 if (uuid == null) {
1232 query.append("lock.uuid IS NULL");
1233 }
1234 else {
1235 query.append("lock.uuid = ?");
1236 }
1237
1238 query.append(" ");
1239
1240 Query q = session.createQuery(query.toString());
1241
1242 QueryPos qPos = QueryPos.getInstance(q);
1243
1244 if (uuid != null) {
1245 qPos.add(uuid);
1246 }
1247
1248 count = (Long)q.uniqueResult();
1249 }
1250 catch (Exception e) {
1251 throw processException(e);
1252 }
1253 finally {
1254 if (count == null) {
1255 count = Long.valueOf(0);
1256 }
1257
1258 FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_UUID,
1259 finderArgs, count);
1260
1261 closeSession(session);
1262 }
1263 }
1264
1265 return count.intValue();
1266 }
1267
1268 public int countByExpirationDate(Date expirationDate)
1269 throws SystemException {
1270 Object[] finderArgs = new Object[] { expirationDate };
1271
1272 Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_BY_EXPIRATIONDATE,
1273 finderArgs, this);
1274
1275 if (count == null) {
1276 Session session = null;
1277
1278 try {
1279 session = openSession();
1280
1281 StringBuilder query = new StringBuilder();
1282
1283 query.append("SELECT COUNT(lock) ");
1284 query.append("FROM Lock lock WHERE ");
1285
1286 if (expirationDate == null) {
1287 query.append("lock.expirationDate < null");
1288 }
1289 else {
1290 query.append("lock.expirationDate < ?");
1291 }
1292
1293 query.append(" ");
1294
1295 Query q = session.createQuery(query.toString());
1296
1297 QueryPos qPos = QueryPos.getInstance(q);
1298
1299 if (expirationDate != null) {
1300 qPos.add(CalendarUtil.getTimestamp(expirationDate));
1301 }
1302
1303 count = (Long)q.uniqueResult();
1304 }
1305 catch (Exception e) {
1306 throw processException(e);
1307 }
1308 finally {
1309 if (count == null) {
1310 count = Long.valueOf(0);
1311 }
1312
1313 FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_EXPIRATIONDATE,
1314 finderArgs, count);
1315
1316 closeSession(session);
1317 }
1318 }
1319
1320 return count.intValue();
1321 }
1322
1323 public int countByC_K(String className, String key)
1324 throws SystemException {
1325 Object[] finderArgs = new Object[] { className, key };
1326
1327 Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_BY_C_K,
1328 finderArgs, this);
1329
1330 if (count == null) {
1331 Session session = null;
1332
1333 try {
1334 session = openSession();
1335
1336 StringBuilder query = new StringBuilder();
1337
1338 query.append("SELECT COUNT(lock) ");
1339 query.append("FROM Lock lock WHERE ");
1340
1341 if (className == null) {
1342 query.append("lock.className IS NULL");
1343 }
1344 else {
1345 query.append("lock.className = ?");
1346 }
1347
1348 query.append(" AND ");
1349
1350 if (key == null) {
1351 query.append("lock.key IS NULL");
1352 }
1353 else {
1354 query.append("lock.key = ?");
1355 }
1356
1357 query.append(" ");
1358
1359 Query q = session.createQuery(query.toString());
1360
1361 QueryPos qPos = QueryPos.getInstance(q);
1362
1363 if (className != null) {
1364 qPos.add(className);
1365 }
1366
1367 if (key != null) {
1368 qPos.add(key);
1369 }
1370
1371 count = (Long)q.uniqueResult();
1372 }
1373 catch (Exception e) {
1374 throw processException(e);
1375 }
1376 finally {
1377 if (count == null) {
1378 count = Long.valueOf(0);
1379 }
1380
1381 FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_C_K, finderArgs,
1382 count);
1383
1384 closeSession(session);
1385 }
1386 }
1387
1388 return count.intValue();
1389 }
1390
1391 public int countAll() throws SystemException {
1392 Object[] finderArgs = new Object[0];
1393
1394 Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_ALL,
1395 finderArgs, this);
1396
1397 if (count == null) {
1398 Session session = null;
1399
1400 try {
1401 session = openSession();
1402
1403 Query q = session.createQuery(
1404 "SELECT COUNT(lock) FROM Lock lock");
1405
1406 count = (Long)q.uniqueResult();
1407 }
1408 catch (Exception e) {
1409 throw processException(e);
1410 }
1411 finally {
1412 if (count == null) {
1413 count = Long.valueOf(0);
1414 }
1415
1416 FinderCacheUtil.putResult(FINDER_PATH_COUNT_ALL, finderArgs,
1417 count);
1418
1419 closeSession(session);
1420 }
1421 }
1422
1423 return count.intValue();
1424 }
1425
1426 public void afterPropertiesSet() {
1427 String[] listenerClassNames = StringUtil.split(GetterUtil.getString(
1428 com.liferay.portal.util.PropsUtil.get(
1429 "value.object.listener.com.liferay.portal.model.Lock")));
1430
1431 if (listenerClassNames.length > 0) {
1432 try {
1433 List<ModelListener<Lock>> listenersList = new ArrayList<ModelListener<Lock>>();
1434
1435 for (String listenerClassName : listenerClassNames) {
1436 listenersList.add((ModelListener<Lock>)Class.forName(
1437 listenerClassName).newInstance());
1438 }
1439
1440 listeners = listenersList.toArray(new ModelListener[listenersList.size()]);
1441 }
1442 catch (Exception e) {
1443 _log.error(e);
1444 }
1445 }
1446 }
1447
1448 @BeanReference(name = "com.liferay.portal.service.persistence.AccountPersistence.impl")
1449 protected com.liferay.portal.service.persistence.AccountPersistence accountPersistence;
1450 @BeanReference(name = "com.liferay.portal.service.persistence.AddressPersistence.impl")
1451 protected com.liferay.portal.service.persistence.AddressPersistence addressPersistence;
1452 @BeanReference(name = "com.liferay.portal.service.persistence.BrowserTrackerPersistence.impl")
1453 protected com.liferay.portal.service.persistence.BrowserTrackerPersistence browserTrackerPersistence;
1454 @BeanReference(name = "com.liferay.portal.service.persistence.ClassNamePersistence.impl")
1455 protected com.liferay.portal.service.persistence.ClassNamePersistence classNamePersistence;
1456 @BeanReference(name = "com.liferay.portal.service.persistence.CompanyPersistence.impl")
1457 protected com.liferay.portal.service.persistence.CompanyPersistence companyPersistence;
1458 @BeanReference(name = "com.liferay.portal.service.persistence.ContactPersistence.impl")
1459 protected com.liferay.portal.service.persistence.ContactPersistence contactPersistence;
1460 @BeanReference(name = "com.liferay.portal.service.persistence.CountryPersistence.impl")
1461 protected com.liferay.portal.service.persistence.CountryPersistence countryPersistence;
1462 @BeanReference(name = "com.liferay.portal.service.persistence.EmailAddressPersistence.impl")
1463 protected com.liferay.portal.service.persistence.EmailAddressPersistence emailAddressPersistence;
1464 @BeanReference(name = "com.liferay.portal.service.persistence.GroupPersistence.impl")
1465 protected com.liferay.portal.service.persistence.GroupPersistence groupPersistence;
1466 @BeanReference(name = "com.liferay.portal.service.persistence.ImagePersistence.impl")
1467 protected com.liferay.portal.service.persistence.ImagePersistence imagePersistence;
1468 @BeanReference(name = "com.liferay.portal.service.persistence.LayoutPersistence.impl")
1469 protected com.liferay.portal.service.persistence.LayoutPersistence layoutPersistence;
1470 @BeanReference(name = "com.liferay.portal.service.persistence.LayoutSetPersistence.impl")
1471 protected com.liferay.portal.service.persistence.LayoutSetPersistence layoutSetPersistence;
1472 @BeanReference(name = "com.liferay.portal.service.persistence.ListTypePersistence.impl")
1473 protected com.liferay.portal.service.persistence.ListTypePersistence listTypePersistence;
1474 @BeanReference(name = "com.liferay.portal.service.persistence.LockPersistence.impl")
1475 protected com.liferay.portal.service.persistence.LockPersistence lockPersistence;
1476 @BeanReference(name = "com.liferay.portal.service.persistence.MembershipRequestPersistence.impl")
1477 protected com.liferay.portal.service.persistence.MembershipRequestPersistence membershipRequestPersistence;
1478 @BeanReference(name = "com.liferay.portal.service.persistence.OrganizationPersistence.impl")
1479 protected com.liferay.portal.service.persistence.OrganizationPersistence organizationPersistence;
1480 @BeanReference(name = "com.liferay.portal.service.persistence.OrgGroupPermissionPersistence.impl")
1481 protected com.liferay.portal.service.persistence.OrgGroupPermissionPersistence orgGroupPermissionPersistence;
1482 @BeanReference(name = "com.liferay.portal.service.persistence.OrgGroupRolePersistence.impl")
1483 protected com.liferay.portal.service.persistence.OrgGroupRolePersistence orgGroupRolePersistence;
1484 @BeanReference(name = "com.liferay.portal.service.persistence.OrgLaborPersistence.impl")
1485 protected com.liferay.portal.service.persistence.OrgLaborPersistence orgLaborPersistence;
1486 @BeanReference(name = "com.liferay.portal.service.persistence.PasswordPolicyPersistence.impl")
1487 protected com.liferay.portal.service.persistence.PasswordPolicyPersistence passwordPolicyPersistence;
1488 @BeanReference(name = "com.liferay.portal.service.persistence.PasswordPolicyRelPersistence.impl")
1489 protected com.liferay.portal.service.persistence.PasswordPolicyRelPersistence passwordPolicyRelPersistence;
1490 @BeanReference(name = "com.liferay.portal.service.persistence.PasswordTrackerPersistence.impl")
1491 protected com.liferay.portal.service.persistence.PasswordTrackerPersistence passwordTrackerPersistence;
1492 @BeanReference(name = "com.liferay.portal.service.persistence.PermissionPersistence.impl")
1493 protected com.liferay.portal.service.persistence.PermissionPersistence permissionPersistence;
1494 @BeanReference(name = "com.liferay.portal.service.persistence.PhonePersistence.impl")
1495 protected com.liferay.portal.service.persistence.PhonePersistence phonePersistence;
1496 @BeanReference(name = "com.liferay.portal.service.persistence.PluginSettingPersistence.impl")
1497 protected com.liferay.portal.service.persistence.PluginSettingPersistence pluginSettingPersistence;
1498 @BeanReference(name = "com.liferay.portal.service.persistence.PortletPersistence.impl")
1499 protected com.liferay.portal.service.persistence.PortletPersistence portletPersistence;
1500 @BeanReference(name = "com.liferay.portal.service.persistence.PortletItemPersistence.impl")
1501 protected com.liferay.portal.service.persistence.PortletItemPersistence portletItemPersistence;
1502 @BeanReference(name = "com.liferay.portal.service.persistence.PortletPreferencesPersistence.impl")
1503 protected com.liferay.portal.service.persistence.PortletPreferencesPersistence portletPreferencesPersistence;
1504 @BeanReference(name = "com.liferay.portal.service.persistence.RegionPersistence.impl")
1505 protected com.liferay.portal.service.persistence.RegionPersistence regionPersistence;
1506 @BeanReference(name = "com.liferay.portal.service.persistence.ReleasePersistence.impl")
1507 protected com.liferay.portal.service.persistence.ReleasePersistence releasePersistence;
1508 @BeanReference(name = "com.liferay.portal.service.persistence.ResourcePersistence.impl")
1509 protected com.liferay.portal.service.persistence.ResourcePersistence resourcePersistence;
1510 @BeanReference(name = "com.liferay.portal.service.persistence.ResourceActionPersistence.impl")
1511 protected com.liferay.portal.service.persistence.ResourceActionPersistence resourceActionPersistence;
1512 @BeanReference(name = "com.liferay.portal.service.persistence.ResourceCodePersistence.impl")
1513 protected com.liferay.portal.service.persistence.ResourceCodePersistence resourceCodePersistence;
1514 @BeanReference(name = "com.liferay.portal.service.persistence.ResourcePermissionPersistence.impl")
1515 protected com.liferay.portal.service.persistence.ResourcePermissionPersistence resourcePermissionPersistence;
1516 @BeanReference(name = "com.liferay.portal.service.persistence.RolePersistence.impl")
1517 protected com.liferay.portal.service.persistence.RolePersistence rolePersistence;
1518 @BeanReference(name = "com.liferay.portal.service.persistence.ServiceComponentPersistence.impl")
1519 protected com.liferay.portal.service.persistence.ServiceComponentPersistence serviceComponentPersistence;
1520 @BeanReference(name = "com.liferay.portal.service.persistence.ShardPersistence.impl")
1521 protected com.liferay.portal.service.persistence.ShardPersistence shardPersistence;
1522 @BeanReference(name = "com.liferay.portal.service.persistence.SubscriptionPersistence.impl")
1523 protected com.liferay.portal.service.persistence.SubscriptionPersistence subscriptionPersistence;
1524 @BeanReference(name = "com.liferay.portal.service.persistence.UserPersistence.impl")
1525 protected com.liferay.portal.service.persistence.UserPersistence userPersistence;
1526 @BeanReference(name = "com.liferay.portal.service.persistence.UserGroupPersistence.impl")
1527 protected com.liferay.portal.service.persistence.UserGroupPersistence userGroupPersistence;
1528 @BeanReference(name = "com.liferay.portal.service.persistence.UserGroupGroupRolePersistence.impl")
1529 protected com.liferay.portal.service.persistence.UserGroupGroupRolePersistence userGroupGroupRolePersistence;
1530 @BeanReference(name = "com.liferay.portal.service.persistence.UserGroupRolePersistence.impl")
1531 protected com.liferay.portal.service.persistence.UserGroupRolePersistence userGroupRolePersistence;
1532 @BeanReference(name = "com.liferay.portal.service.persistence.UserIdMapperPersistence.impl")
1533 protected com.liferay.portal.service.persistence.UserIdMapperPersistence userIdMapperPersistence;
1534 @BeanReference(name = "com.liferay.portal.service.persistence.UserTrackerPersistence.impl")
1535 protected com.liferay.portal.service.persistence.UserTrackerPersistence userTrackerPersistence;
1536 @BeanReference(name = "com.liferay.portal.service.persistence.UserTrackerPathPersistence.impl")
1537 protected com.liferay.portal.service.persistence.UserTrackerPathPersistence userTrackerPathPersistence;
1538 @BeanReference(name = "com.liferay.portal.service.persistence.WebDAVPropsPersistence.impl")
1539 protected com.liferay.portal.service.persistence.WebDAVPropsPersistence webDAVPropsPersistence;
1540 @BeanReference(name = "com.liferay.portal.service.persistence.WebsitePersistence.impl")
1541 protected com.liferay.portal.service.persistence.WebsitePersistence websitePersistence;
1542 private static Log _log = LogFactoryUtil.getLog(LockPersistenceImpl.class);
1543}