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