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