1
14
15 package com.liferay.portal.service.persistence;
16
17 import com.liferay.portal.NoSuchClassNameException;
18 import com.liferay.portal.NoSuchModelException;
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.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.log.Log;
30 import com.liferay.portal.kernel.log.LogFactoryUtil;
31 import com.liferay.portal.kernel.util.GetterUtil;
32 import com.liferay.portal.kernel.util.OrderByComparator;
33 import com.liferay.portal.kernel.util.StringBundler;
34 import com.liferay.portal.kernel.util.StringPool;
35 import com.liferay.portal.kernel.util.StringUtil;
36 import com.liferay.portal.kernel.util.Validator;
37 import com.liferay.portal.model.ClassName;
38 import com.liferay.portal.model.ModelListener;
39 import com.liferay.portal.model.impl.ClassNameImpl;
40 import com.liferay.portal.model.impl.ClassNameModelImpl;
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 ClassNamePersistenceImpl extends BasePersistenceImpl<ClassName>
63 implements ClassNamePersistence {
64 public static final String FINDER_CLASS_NAME_ENTITY = ClassNameImpl.class.getName();
65 public static final String FINDER_CLASS_NAME_LIST = FINDER_CLASS_NAME_ENTITY +
66 ".List";
67 public static final FinderPath FINDER_PATH_FETCH_BY_VALUE = new FinderPath(ClassNameModelImpl.ENTITY_CACHE_ENABLED,
68 ClassNameModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_ENTITY,
69 "fetchByValue", new String[] { String.class.getName() });
70 public static final FinderPath FINDER_PATH_COUNT_BY_VALUE = new FinderPath(ClassNameModelImpl.ENTITY_CACHE_ENABLED,
71 ClassNameModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
72 "countByValue", new String[] { String.class.getName() });
73 public static final FinderPath FINDER_PATH_FIND_ALL = new FinderPath(ClassNameModelImpl.ENTITY_CACHE_ENABLED,
74 ClassNameModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
75 "findAll", new String[0]);
76 public static final FinderPath FINDER_PATH_COUNT_ALL = new FinderPath(ClassNameModelImpl.ENTITY_CACHE_ENABLED,
77 ClassNameModelImpl.FINDER_CACHE_ENABLED, FINDER_CLASS_NAME_LIST,
78 "countAll", new String[0]);
79
80 public void cacheResult(ClassName className) {
81 EntityCacheUtil.putResult(ClassNameModelImpl.ENTITY_CACHE_ENABLED,
82 ClassNameImpl.class, className.getPrimaryKey(), className);
83
84 FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_VALUE,
85 new Object[] { className.getValue() }, className);
86 }
87
88 public void cacheResult(List<ClassName> classNames) {
89 for (ClassName className : classNames) {
90 if (EntityCacheUtil.getResult(
91 ClassNameModelImpl.ENTITY_CACHE_ENABLED,
92 ClassNameImpl.class, className.getPrimaryKey(), this) == null) {
93 cacheResult(className);
94 }
95 }
96 }
97
98 public void clearCache() {
99 CacheRegistry.clear(ClassNameImpl.class.getName());
100 EntityCacheUtil.clearCache(ClassNameImpl.class.getName());
101 FinderCacheUtil.clearCache(FINDER_CLASS_NAME_ENTITY);
102 FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST);
103 }
104
105 public ClassName create(long classNameId) {
106 ClassName className = new ClassNameImpl();
107
108 className.setNew(true);
109 className.setPrimaryKey(classNameId);
110
111 return className;
112 }
113
114 public ClassName remove(Serializable primaryKey)
115 throws NoSuchModelException, SystemException {
116 return remove(((Long)primaryKey).longValue());
117 }
118
119 public ClassName remove(long classNameId)
120 throws NoSuchClassNameException, SystemException {
121 Session session = null;
122
123 try {
124 session = openSession();
125
126 ClassName className = (ClassName)session.get(ClassNameImpl.class,
127 new Long(classNameId));
128
129 if (className == null) {
130 if (_log.isWarnEnabled()) {
131 _log.warn(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + classNameId);
132 }
133
134 throw new NoSuchClassNameException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY +
135 classNameId);
136 }
137
138 return remove(className);
139 }
140 catch (NoSuchClassNameException nsee) {
141 throw nsee;
142 }
143 catch (Exception e) {
144 throw processException(e);
145 }
146 finally {
147 closeSession(session);
148 }
149 }
150
151 public ClassName remove(ClassName className) throws SystemException {
152 for (ModelListener<ClassName> listener : listeners) {
153 listener.onBeforeRemove(className);
154 }
155
156 className = removeImpl(className);
157
158 for (ModelListener<ClassName> listener : listeners) {
159 listener.onAfterRemove(className);
160 }
161
162 return className;
163 }
164
165 protected ClassName removeImpl(ClassName className)
166 throws SystemException {
167 className = toUnwrappedModel(className);
168
169 Session session = null;
170
171 try {
172 session = openSession();
173
174 if (className.isCachedModel() || BatchSessionUtil.isEnabled()) {
175 Object staleObject = session.get(ClassNameImpl.class,
176 className.getPrimaryKeyObj());
177
178 if (staleObject != null) {
179 session.evict(staleObject);
180 }
181 }
182
183 session.delete(className);
184
185 session.flush();
186 }
187 catch (Exception e) {
188 throw processException(e);
189 }
190 finally {
191 closeSession(session);
192 }
193
194 FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST);
195
196 ClassNameModelImpl classNameModelImpl = (ClassNameModelImpl)className;
197
198 FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_VALUE,
199 new Object[] { classNameModelImpl.getOriginalValue() });
200
201 EntityCacheUtil.removeResult(ClassNameModelImpl.ENTITY_CACHE_ENABLED,
202 ClassNameImpl.class, className.getPrimaryKey());
203
204 return className;
205 }
206
207
210 public ClassName update(ClassName className) throws SystemException {
211 if (_log.isWarnEnabled()) {
212 _log.warn(
213 "Using the deprecated update(ClassName className) method. Use update(ClassName className, boolean merge) instead.");
214 }
215
216 return update(className, false);
217 }
218
219 public ClassName updateImpl(com.liferay.portal.model.ClassName className,
220 boolean merge) throws SystemException {
221 className = toUnwrappedModel(className);
222
223 boolean isNew = className.isNew();
224
225 ClassNameModelImpl classNameModelImpl = (ClassNameModelImpl)className;
226
227 Session session = null;
228
229 try {
230 session = openSession();
231
232 BatchSessionUtil.update(session, className, merge);
233
234 className.setNew(false);
235 }
236 catch (Exception e) {
237 throw processException(e);
238 }
239 finally {
240 closeSession(session);
241 }
242
243 FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST);
244
245 EntityCacheUtil.putResult(ClassNameModelImpl.ENTITY_CACHE_ENABLED,
246 ClassNameImpl.class, className.getPrimaryKey(), className);
247
248 if (!isNew &&
249 (!Validator.equals(className.getValue(),
250 classNameModelImpl.getOriginalValue()))) {
251 FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_VALUE,
252 new Object[] { classNameModelImpl.getOriginalValue() });
253 }
254
255 if (isNew ||
256 (!Validator.equals(className.getValue(),
257 classNameModelImpl.getOriginalValue()))) {
258 FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_VALUE,
259 new Object[] { className.getValue() }, className);
260 }
261
262 return className;
263 }
264
265 protected ClassName toUnwrappedModel(ClassName className) {
266 if (className instanceof ClassNameImpl) {
267 return className;
268 }
269
270 ClassNameImpl classNameImpl = new ClassNameImpl();
271
272 classNameImpl.setNew(className.isNew());
273 classNameImpl.setPrimaryKey(className.getPrimaryKey());
274
275 classNameImpl.setClassNameId(className.getClassNameId());
276 classNameImpl.setValue(className.getValue());
277
278 return classNameImpl;
279 }
280
281 public ClassName findByPrimaryKey(Serializable primaryKey)
282 throws NoSuchModelException, SystemException {
283 return findByPrimaryKey(((Long)primaryKey).longValue());
284 }
285
286 public ClassName findByPrimaryKey(long classNameId)
287 throws NoSuchClassNameException, SystemException {
288 ClassName className = fetchByPrimaryKey(classNameId);
289
290 if (className == null) {
291 if (_log.isWarnEnabled()) {
292 _log.warn(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + classNameId);
293 }
294
295 throw new NoSuchClassNameException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY +
296 classNameId);
297 }
298
299 return className;
300 }
301
302 public ClassName fetchByPrimaryKey(Serializable primaryKey)
303 throws SystemException {
304 return fetchByPrimaryKey(((Long)primaryKey).longValue());
305 }
306
307 public ClassName fetchByPrimaryKey(long classNameId)
308 throws SystemException {
309 ClassName className = (ClassName)EntityCacheUtil.getResult(ClassNameModelImpl.ENTITY_CACHE_ENABLED,
310 ClassNameImpl.class, classNameId, this);
311
312 if (className == null) {
313 Session session = null;
314
315 try {
316 session = openSession();
317
318 className = (ClassName)session.get(ClassNameImpl.class,
319 new Long(classNameId));
320 }
321 catch (Exception e) {
322 throw processException(e);
323 }
324 finally {
325 if (className != null) {
326 cacheResult(className);
327 }
328
329 closeSession(session);
330 }
331 }
332
333 return className;
334 }
335
336 public ClassName findByValue(String value)
337 throws NoSuchClassNameException, SystemException {
338 ClassName className = fetchByValue(value);
339
340 if (className == null) {
341 StringBundler msg = new StringBundler(4);
342
343 msg.append(_NO_SUCH_ENTITY_WITH_KEY);
344
345 msg.append("value=");
346 msg.append(value);
347
348 msg.append(StringPool.CLOSE_CURLY_BRACE);
349
350 if (_log.isWarnEnabled()) {
351 _log.warn(msg.toString());
352 }
353
354 throw new NoSuchClassNameException(msg.toString());
355 }
356
357 return className;
358 }
359
360 public ClassName fetchByValue(String value) throws SystemException {
361 return fetchByValue(value, true);
362 }
363
364 public ClassName fetchByValue(String value, boolean retrieveFromCache)
365 throws SystemException {
366 Object[] finderArgs = new Object[] { value };
367
368 Object result = null;
369
370 if (retrieveFromCache) {
371 result = FinderCacheUtil.getResult(FINDER_PATH_FETCH_BY_VALUE,
372 finderArgs, this);
373 }
374
375 if (result == null) {
376 Session session = null;
377
378 try {
379 session = openSession();
380
381 StringBundler query = new StringBundler(2);
382
383 query.append(_SQL_SELECT_CLASSNAME_WHERE);
384
385 if (value == null) {
386 query.append(_FINDER_COLUMN_VALUE_VALUE_1);
387 }
388 else {
389 if (value.equals(StringPool.BLANK)) {
390 query.append(_FINDER_COLUMN_VALUE_VALUE_3);
391 }
392 else {
393 query.append(_FINDER_COLUMN_VALUE_VALUE_2);
394 }
395 }
396
397 String sql = query.toString();
398
399 Query q = session.createQuery(sql);
400
401 QueryPos qPos = QueryPos.getInstance(q);
402
403 if (value != null) {
404 qPos.add(value);
405 }
406
407 List<ClassName> list = q.list();
408
409 result = list;
410
411 ClassName className = null;
412
413 if (list.isEmpty()) {
414 FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_VALUE,
415 finderArgs, list);
416 }
417 else {
418 className = list.get(0);
419
420 cacheResult(className);
421
422 if ((className.getValue() == null) ||
423 !className.getValue().equals(value)) {
424 FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_VALUE,
425 finderArgs, className);
426 }
427 }
428
429 return className;
430 }
431 catch (Exception e) {
432 throw processException(e);
433 }
434 finally {
435 if (result == null) {
436 FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_VALUE,
437 finderArgs, new ArrayList<ClassName>());
438 }
439
440 closeSession(session);
441 }
442 }
443 else {
444 if (result instanceof List<?>) {
445 return null;
446 }
447 else {
448 return (ClassName)result;
449 }
450 }
451 }
452
453 public List<ClassName> findAll() throws SystemException {
454 return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
455 }
456
457 public List<ClassName> findAll(int start, int end)
458 throws SystemException {
459 return findAll(start, end, null);
460 }
461
462 public List<ClassName> findAll(int start, int end,
463 OrderByComparator orderByComparator) throws SystemException {
464 Object[] finderArgs = new Object[] {
465 String.valueOf(start), String.valueOf(end),
466 String.valueOf(orderByComparator)
467 };
468
469 List<ClassName> list = (List<ClassName>)FinderCacheUtil.getResult(FINDER_PATH_FIND_ALL,
470 finderArgs, this);
471
472 if (list == null) {
473 Session session = null;
474
475 try {
476 session = openSession();
477
478 StringBundler query = null;
479 String sql = null;
480
481 if (orderByComparator != null) {
482 query = new StringBundler(2 +
483 (orderByComparator.getOrderByFields().length * 3));
484
485 query.append(_SQL_SELECT_CLASSNAME);
486
487 appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS,
488 orderByComparator);
489
490 sql = query.toString();
491 }
492
493 sql = _SQL_SELECT_CLASSNAME;
494
495 Query q = session.createQuery(sql);
496
497 if (orderByComparator == null) {
498 list = (List<ClassName>)QueryUtil.list(q, getDialect(),
499 start, end, false);
500
501 Collections.sort(list);
502 }
503 else {
504 list = (List<ClassName>)QueryUtil.list(q, getDialect(),
505 start, end);
506 }
507 }
508 catch (Exception e) {
509 throw processException(e);
510 }
511 finally {
512 if (list == null) {
513 list = new ArrayList<ClassName>();
514 }
515
516 cacheResult(list);
517
518 FinderCacheUtil.putResult(FINDER_PATH_FIND_ALL, finderArgs, list);
519
520 closeSession(session);
521 }
522 }
523
524 return list;
525 }
526
527 public void removeByValue(String value)
528 throws NoSuchClassNameException, SystemException {
529 ClassName className = findByValue(value);
530
531 remove(className);
532 }
533
534 public void removeAll() throws SystemException {
535 for (ClassName className : findAll()) {
536 remove(className);
537 }
538 }
539
540 public int countByValue(String value) throws SystemException {
541 Object[] finderArgs = new Object[] { value };
542
543 Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_BY_VALUE,
544 finderArgs, this);
545
546 if (count == null) {
547 Session session = null;
548
549 try {
550 session = openSession();
551
552 StringBundler query = new StringBundler(2);
553
554 query.append(_SQL_COUNT_CLASSNAME_WHERE);
555
556 if (value == null) {
557 query.append(_FINDER_COLUMN_VALUE_VALUE_1);
558 }
559 else {
560 if (value.equals(StringPool.BLANK)) {
561 query.append(_FINDER_COLUMN_VALUE_VALUE_3);
562 }
563 else {
564 query.append(_FINDER_COLUMN_VALUE_VALUE_2);
565 }
566 }
567
568 String sql = query.toString();
569
570 Query q = session.createQuery(sql);
571
572 QueryPos qPos = QueryPos.getInstance(q);
573
574 if (value != null) {
575 qPos.add(value);
576 }
577
578 count = (Long)q.uniqueResult();
579 }
580 catch (Exception e) {
581 throw processException(e);
582 }
583 finally {
584 if (count == null) {
585 count = Long.valueOf(0);
586 }
587
588 FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_VALUE,
589 finderArgs, count);
590
591 closeSession(session);
592 }
593 }
594
595 return count.intValue();
596 }
597
598 public int countAll() throws SystemException {
599 Object[] finderArgs = new Object[0];
600
601 Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_ALL,
602 finderArgs, this);
603
604 if (count == null) {
605 Session session = null;
606
607 try {
608 session = openSession();
609
610 Query q = session.createQuery(_SQL_COUNT_CLASSNAME);
611
612 count = (Long)q.uniqueResult();
613 }
614 catch (Exception e) {
615 throw processException(e);
616 }
617 finally {
618 if (count == null) {
619 count = Long.valueOf(0);
620 }
621
622 FinderCacheUtil.putResult(FINDER_PATH_COUNT_ALL, finderArgs,
623 count);
624
625 closeSession(session);
626 }
627 }
628
629 return count.intValue();
630 }
631
632 public void afterPropertiesSet() {
633 String[] listenerClassNames = StringUtil.split(GetterUtil.getString(
634 com.liferay.portal.util.PropsUtil.get(
635 "value.object.listener.com.liferay.portal.model.ClassName")));
636
637 if (listenerClassNames.length > 0) {
638 try {
639 List<ModelListener<ClassName>> listenersList = new ArrayList<ModelListener<ClassName>>();
640
641 for (String listenerClassName : listenerClassNames) {
642 listenersList.add((ModelListener<ClassName>)Class.forName(
643 listenerClassName).newInstance());
644 }
645
646 listeners = listenersList.toArray(new ModelListener[listenersList.size()]);
647 }
648 catch (Exception e) {
649 _log.error(e);
650 }
651 }
652 }
653
654 @BeanReference(type = AccountPersistence.class)
655 protected AccountPersistence accountPersistence;
656 @BeanReference(type = AddressPersistence.class)
657 protected AddressPersistence addressPersistence;
658 @BeanReference(type = BrowserTrackerPersistence.class)
659 protected BrowserTrackerPersistence browserTrackerPersistence;
660 @BeanReference(type = ClassNamePersistence.class)
661 protected ClassNamePersistence classNamePersistence;
662 @BeanReference(type = CompanyPersistence.class)
663 protected CompanyPersistence companyPersistence;
664 @BeanReference(type = ContactPersistence.class)
665 protected ContactPersistence contactPersistence;
666 @BeanReference(type = CountryPersistence.class)
667 protected CountryPersistence countryPersistence;
668 @BeanReference(type = EmailAddressPersistence.class)
669 protected EmailAddressPersistence emailAddressPersistence;
670 @BeanReference(type = GroupPersistence.class)
671 protected GroupPersistence groupPersistence;
672 @BeanReference(type = ImagePersistence.class)
673 protected ImagePersistence imagePersistence;
674 @BeanReference(type = LayoutPersistence.class)
675 protected LayoutPersistence layoutPersistence;
676 @BeanReference(type = LayoutSetPersistence.class)
677 protected LayoutSetPersistence layoutSetPersistence;
678 @BeanReference(type = ListTypePersistence.class)
679 protected ListTypePersistence listTypePersistence;
680 @BeanReference(type = LockPersistence.class)
681 protected LockPersistence lockPersistence;
682 @BeanReference(type = MembershipRequestPersistence.class)
683 protected MembershipRequestPersistence membershipRequestPersistence;
684 @BeanReference(type = OrganizationPersistence.class)
685 protected OrganizationPersistence organizationPersistence;
686 @BeanReference(type = OrgGroupPermissionPersistence.class)
687 protected OrgGroupPermissionPersistence orgGroupPermissionPersistence;
688 @BeanReference(type = OrgGroupRolePersistence.class)
689 protected OrgGroupRolePersistence orgGroupRolePersistence;
690 @BeanReference(type = OrgLaborPersistence.class)
691 protected OrgLaborPersistence orgLaborPersistence;
692 @BeanReference(type = PasswordPolicyPersistence.class)
693 protected PasswordPolicyPersistence passwordPolicyPersistence;
694 @BeanReference(type = PasswordPolicyRelPersistence.class)
695 protected PasswordPolicyRelPersistence passwordPolicyRelPersistence;
696 @BeanReference(type = PasswordTrackerPersistence.class)
697 protected PasswordTrackerPersistence passwordTrackerPersistence;
698 @BeanReference(type = PermissionPersistence.class)
699 protected PermissionPersistence permissionPersistence;
700 @BeanReference(type = PhonePersistence.class)
701 protected PhonePersistence phonePersistence;
702 @BeanReference(type = PluginSettingPersistence.class)
703 protected PluginSettingPersistence pluginSettingPersistence;
704 @BeanReference(type = PortletPersistence.class)
705 protected PortletPersistence portletPersistence;
706 @BeanReference(type = PortletItemPersistence.class)
707 protected PortletItemPersistence portletItemPersistence;
708 @BeanReference(type = PortletPreferencesPersistence.class)
709 protected PortletPreferencesPersistence portletPreferencesPersistence;
710 @BeanReference(type = RegionPersistence.class)
711 protected RegionPersistence regionPersistence;
712 @BeanReference(type = ReleasePersistence.class)
713 protected ReleasePersistence releasePersistence;
714 @BeanReference(type = ResourcePersistence.class)
715 protected ResourcePersistence resourcePersistence;
716 @BeanReference(type = ResourceActionPersistence.class)
717 protected ResourceActionPersistence resourceActionPersistence;
718 @BeanReference(type = ResourceCodePersistence.class)
719 protected ResourceCodePersistence resourceCodePersistence;
720 @BeanReference(type = ResourcePermissionPersistence.class)
721 protected ResourcePermissionPersistence resourcePermissionPersistence;
722 @BeanReference(type = RolePersistence.class)
723 protected RolePersistence rolePersistence;
724 @BeanReference(type = ServiceComponentPersistence.class)
725 protected ServiceComponentPersistence serviceComponentPersistence;
726 @BeanReference(type = ShardPersistence.class)
727 protected ShardPersistence shardPersistence;
728 @BeanReference(type = SubscriptionPersistence.class)
729 protected SubscriptionPersistence subscriptionPersistence;
730 @BeanReference(type = UserPersistence.class)
731 protected UserPersistence userPersistence;
732 @BeanReference(type = UserGroupPersistence.class)
733 protected UserGroupPersistence userGroupPersistence;
734 @BeanReference(type = UserGroupGroupRolePersistence.class)
735 protected UserGroupGroupRolePersistence userGroupGroupRolePersistence;
736 @BeanReference(type = UserGroupRolePersistence.class)
737 protected UserGroupRolePersistence userGroupRolePersistence;
738 @BeanReference(type = UserIdMapperPersistence.class)
739 protected UserIdMapperPersistence userIdMapperPersistence;
740 @BeanReference(type = UserTrackerPersistence.class)
741 protected UserTrackerPersistence userTrackerPersistence;
742 @BeanReference(type = UserTrackerPathPersistence.class)
743 protected UserTrackerPathPersistence userTrackerPathPersistence;
744 @BeanReference(type = WebDAVPropsPersistence.class)
745 protected WebDAVPropsPersistence webDAVPropsPersistence;
746 @BeanReference(type = WebsitePersistence.class)
747 protected WebsitePersistence websitePersistence;
748 private static final String _SQL_SELECT_CLASSNAME = "SELECT className FROM ClassName className";
749 private static final String _SQL_SELECT_CLASSNAME_WHERE = "SELECT className FROM ClassName className WHERE ";
750 private static final String _SQL_COUNT_CLASSNAME = "SELECT COUNT(className) FROM ClassName className";
751 private static final String _SQL_COUNT_CLASSNAME_WHERE = "SELECT COUNT(className) FROM ClassName className WHERE ";
752 private static final String _FINDER_COLUMN_VALUE_VALUE_1 = "className.value IS NULL";
753 private static final String _FINDER_COLUMN_VALUE_VALUE_2 = "className.value = ?";
754 private static final String _FINDER_COLUMN_VALUE_VALUE_3 = "(className.value IS NULL OR className.value = ?)";
755 private static final String _ORDER_BY_ENTITY_ALIAS = "className.";
756 private static final String _NO_SUCH_ENTITY_WITH_PRIMARY_KEY = "No ClassName exists with the primary key ";
757 private static final String _NO_SUCH_ENTITY_WITH_KEY = "No ClassName exists with the key {";
758 private static Log _log = LogFactoryUtil.getLog(ClassNamePersistenceImpl.class);
759 }