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