1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   *
13   */
14  
15  package com.liferay.portlet.wiki.service.persistence;
16  
17  import com.liferay.portal.NoSuchModelException;
18  import com.liferay.portal.SystemException;
19  import com.liferay.portal.kernel.annotation.BeanReference;
20  import com.liferay.portal.kernel.cache.CacheRegistry;
21  import com.liferay.portal.kernel.dao.orm.EntityCacheUtil;
22  import com.liferay.portal.kernel.dao.orm.FinderCacheUtil;
23  import com.liferay.portal.kernel.dao.orm.FinderPath;
24  import com.liferay.portal.kernel.dao.orm.Query;
25  import com.liferay.portal.kernel.dao.orm.QueryPos;
26  import com.liferay.portal.kernel.dao.orm.QueryUtil;
27  import com.liferay.portal.kernel.dao.orm.Session;
28  import com.liferay.portal.kernel.log.Log;
29  import com.liferay.portal.kernel.log.LogFactoryUtil;
30  import com.liferay.portal.kernel.util.GetterUtil;
31  import com.liferay.portal.kernel.util.InstanceFactory;
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.ModelListener;
38  import com.liferay.portal.service.persistence.BatchSessionUtil;
39  import com.liferay.portal.service.persistence.ResourcePersistence;
40  import com.liferay.portal.service.persistence.UserPersistence;
41  import com.liferay.portal.service.persistence.impl.BasePersistenceImpl;
42  
43  import com.liferay.portlet.wiki.NoSuchPageResourceException;
44  import com.liferay.portlet.wiki.model.WikiPageResource;
45  import com.liferay.portlet.wiki.model.impl.WikiPageResourceImpl;
46  import com.liferay.portlet.wiki.model.impl.WikiPageResourceModelImpl;
47  
48  import java.io.Serializable;
49  
50  import java.util.ArrayList;
51  import java.util.Collections;
52  import java.util.List;
53  
54  /**
55   * <a href="WikiPageResourcePersistenceImpl.java.html"><b><i>View Source</i></b></a>
56   *
57   * <p>
58   * ServiceBuilder generated this class. Modifications in this class will be
59   * overwritten the next time is generated.
60   * </p>
61   *
62   * @author    Brian Wing Shun Chan
63   * @see       WikiPageResourcePersistence
64   * @see       WikiPageResourceUtil
65   * @generated
66   */
67  public class WikiPageResourcePersistenceImpl extends BasePersistenceImpl<WikiPageResource>
68      implements WikiPageResourcePersistence {
69      public static final String FINDER_CLASS_NAME_ENTITY = WikiPageResourceImpl.class.getName();
70      public static final String FINDER_CLASS_NAME_LIST = FINDER_CLASS_NAME_ENTITY +
71          ".List";
72      public static final FinderPath FINDER_PATH_FETCH_BY_N_T = new FinderPath(WikiPageResourceModelImpl.ENTITY_CACHE_ENABLED,
73              WikiPageResourceModelImpl.FINDER_CACHE_ENABLED,
74              FINDER_CLASS_NAME_ENTITY, "fetchByN_T",
75              new String[] { Long.class.getName(), String.class.getName() });
76      public static final FinderPath FINDER_PATH_COUNT_BY_N_T = new FinderPath(WikiPageResourceModelImpl.ENTITY_CACHE_ENABLED,
77              WikiPageResourceModelImpl.FINDER_CACHE_ENABLED,
78              FINDER_CLASS_NAME_LIST, "countByN_T",
79              new String[] { Long.class.getName(), String.class.getName() });
80      public static final FinderPath FINDER_PATH_FIND_ALL = new FinderPath(WikiPageResourceModelImpl.ENTITY_CACHE_ENABLED,
81              WikiPageResourceModelImpl.FINDER_CACHE_ENABLED,
82              FINDER_CLASS_NAME_LIST, "findAll", new String[0]);
83      public static final FinderPath FINDER_PATH_COUNT_ALL = new FinderPath(WikiPageResourceModelImpl.ENTITY_CACHE_ENABLED,
84              WikiPageResourceModelImpl.FINDER_CACHE_ENABLED,
85              FINDER_CLASS_NAME_LIST, "countAll", new String[0]);
86  
87      public void cacheResult(WikiPageResource wikiPageResource) {
88          EntityCacheUtil.putResult(WikiPageResourceModelImpl.ENTITY_CACHE_ENABLED,
89              WikiPageResourceImpl.class, wikiPageResource.getPrimaryKey(),
90              wikiPageResource);
91  
92          FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_N_T,
93              new Object[] {
94                  new Long(wikiPageResource.getNodeId()),
95                  
96              wikiPageResource.getTitle()
97              }, wikiPageResource);
98      }
99  
100     public void cacheResult(List<WikiPageResource> wikiPageResources) {
101         for (WikiPageResource wikiPageResource : wikiPageResources) {
102             if (EntityCacheUtil.getResult(
103                         WikiPageResourceModelImpl.ENTITY_CACHE_ENABLED,
104                         WikiPageResourceImpl.class,
105                         wikiPageResource.getPrimaryKey(), this) == null) {
106                 cacheResult(wikiPageResource);
107             }
108         }
109     }
110 
111     public void clearCache() {
112         CacheRegistry.clear(WikiPageResourceImpl.class.getName());
113         EntityCacheUtil.clearCache(WikiPageResourceImpl.class.getName());
114         FinderCacheUtil.clearCache(FINDER_CLASS_NAME_ENTITY);
115         FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST);
116     }
117 
118     public void clearCache(WikiPageResource wikiPageResource) {
119         EntityCacheUtil.removeResult(WikiPageResourceModelImpl.ENTITY_CACHE_ENABLED,
120             WikiPageResourceImpl.class, wikiPageResource.getPrimaryKey());
121 
122         FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_N_T,
123             new Object[] {
124                 new Long(wikiPageResource.getNodeId()),
125                 
126             wikiPageResource.getTitle()
127             });
128     }
129 
130     public WikiPageResource create(long resourcePrimKey) {
131         WikiPageResource wikiPageResource = new WikiPageResourceImpl();
132 
133         wikiPageResource.setNew(true);
134         wikiPageResource.setPrimaryKey(resourcePrimKey);
135 
136         return wikiPageResource;
137     }
138 
139     public WikiPageResource remove(Serializable primaryKey)
140         throws NoSuchModelException, SystemException {
141         return remove(((Long)primaryKey).longValue());
142     }
143 
144     public WikiPageResource remove(long resourcePrimKey)
145         throws NoSuchPageResourceException, SystemException {
146         Session session = null;
147 
148         try {
149             session = openSession();
150 
151             WikiPageResource wikiPageResource = (WikiPageResource)session.get(WikiPageResourceImpl.class,
152                     new Long(resourcePrimKey));
153 
154             if (wikiPageResource == null) {
155                 if (_log.isWarnEnabled()) {
156                     _log.warn(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY +
157                         resourcePrimKey);
158                 }
159 
160                 throw new NoSuchPageResourceException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY +
161                     resourcePrimKey);
162             }
163 
164             return remove(wikiPageResource);
165         }
166         catch (NoSuchPageResourceException nsee) {
167             throw nsee;
168         }
169         catch (Exception e) {
170             throw processException(e);
171         }
172         finally {
173             closeSession(session);
174         }
175     }
176 
177     protected WikiPageResource removeImpl(WikiPageResource wikiPageResource)
178         throws SystemException {
179         wikiPageResource = toUnwrappedModel(wikiPageResource);
180 
181         Session session = null;
182 
183         try {
184             session = openSession();
185 
186             BatchSessionUtil.delete(session, wikiPageResource);
187         }
188         catch (Exception e) {
189             throw processException(e);
190         }
191         finally {
192             closeSession(session);
193         }
194 
195         FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST);
196 
197         WikiPageResourceModelImpl wikiPageResourceModelImpl = (WikiPageResourceModelImpl)wikiPageResource;
198 
199         FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_N_T,
200             new Object[] {
201                 new Long(wikiPageResourceModelImpl.getOriginalNodeId()),
202                 
203             wikiPageResourceModelImpl.getOriginalTitle()
204             });
205 
206         EntityCacheUtil.removeResult(WikiPageResourceModelImpl.ENTITY_CACHE_ENABLED,
207             WikiPageResourceImpl.class, wikiPageResource.getPrimaryKey());
208 
209         return wikiPageResource;
210     }
211 
212     /**
213      * @deprecated Use {@link BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)}.
214      */
215     public WikiPageResource update(WikiPageResource wikiPageResource)
216         throws SystemException {
217         if (_log.isWarnEnabled()) {
218             _log.warn(
219                 "Using the deprecated update(WikiPageResource wikiPageResource) method. Use update(WikiPageResource wikiPageResource, boolean merge) instead.");
220         }
221 
222         return update(wikiPageResource, false);
223     }
224 
225     public WikiPageResource updateImpl(
226         com.liferay.portlet.wiki.model.WikiPageResource wikiPageResource,
227         boolean merge) throws SystemException {
228         wikiPageResource = toUnwrappedModel(wikiPageResource);
229 
230         boolean isNew = wikiPageResource.isNew();
231 
232         WikiPageResourceModelImpl wikiPageResourceModelImpl = (WikiPageResourceModelImpl)wikiPageResource;
233 
234         Session session = null;
235 
236         try {
237             session = openSession();
238 
239             BatchSessionUtil.update(session, wikiPageResource, merge);
240 
241             wikiPageResource.setNew(false);
242         }
243         catch (Exception e) {
244             throw processException(e);
245         }
246         finally {
247             closeSession(session);
248         }
249 
250         FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST);
251 
252         EntityCacheUtil.putResult(WikiPageResourceModelImpl.ENTITY_CACHE_ENABLED,
253             WikiPageResourceImpl.class, wikiPageResource.getPrimaryKey(),
254             wikiPageResource);
255 
256         if (!isNew &&
257                 ((wikiPageResource.getNodeId() != wikiPageResourceModelImpl.getOriginalNodeId()) ||
258                 !Validator.equals(wikiPageResource.getTitle(),
259                     wikiPageResourceModelImpl.getOriginalTitle()))) {
260             FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_N_T,
261                 new Object[] {
262                     new Long(wikiPageResourceModelImpl.getOriginalNodeId()),
263                     
264                 wikiPageResourceModelImpl.getOriginalTitle()
265                 });
266         }
267 
268         if (isNew ||
269                 ((wikiPageResource.getNodeId() != wikiPageResourceModelImpl.getOriginalNodeId()) ||
270                 !Validator.equals(wikiPageResource.getTitle(),
271                     wikiPageResourceModelImpl.getOriginalTitle()))) {
272             FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_N_T,
273                 new Object[] {
274                     new Long(wikiPageResource.getNodeId()),
275                     
276                 wikiPageResource.getTitle()
277                 }, wikiPageResource);
278         }
279 
280         return wikiPageResource;
281     }
282 
283     protected WikiPageResource toUnwrappedModel(
284         WikiPageResource wikiPageResource) {
285         if (wikiPageResource instanceof WikiPageResourceImpl) {
286             return wikiPageResource;
287         }
288 
289         WikiPageResourceImpl wikiPageResourceImpl = new WikiPageResourceImpl();
290 
291         wikiPageResourceImpl.setNew(wikiPageResource.isNew());
292         wikiPageResourceImpl.setPrimaryKey(wikiPageResource.getPrimaryKey());
293 
294         wikiPageResourceImpl.setResourcePrimKey(wikiPageResource.getResourcePrimKey());
295         wikiPageResourceImpl.setNodeId(wikiPageResource.getNodeId());
296         wikiPageResourceImpl.setTitle(wikiPageResource.getTitle());
297 
298         return wikiPageResourceImpl;
299     }
300 
301     public WikiPageResource findByPrimaryKey(Serializable primaryKey)
302         throws NoSuchModelException, SystemException {
303         return findByPrimaryKey(((Long)primaryKey).longValue());
304     }
305 
306     public WikiPageResource findByPrimaryKey(long resourcePrimKey)
307         throws NoSuchPageResourceException, SystemException {
308         WikiPageResource wikiPageResource = fetchByPrimaryKey(resourcePrimKey);
309 
310         if (wikiPageResource == null) {
311             if (_log.isWarnEnabled()) {
312                 _log.warn(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + resourcePrimKey);
313             }
314 
315             throw new NoSuchPageResourceException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY +
316                 resourcePrimKey);
317         }
318 
319         return wikiPageResource;
320     }
321 
322     public WikiPageResource fetchByPrimaryKey(Serializable primaryKey)
323         throws SystemException {
324         return fetchByPrimaryKey(((Long)primaryKey).longValue());
325     }
326 
327     public WikiPageResource fetchByPrimaryKey(long resourcePrimKey)
328         throws SystemException {
329         WikiPageResource wikiPageResource = (WikiPageResource)EntityCacheUtil.getResult(WikiPageResourceModelImpl.ENTITY_CACHE_ENABLED,
330                 WikiPageResourceImpl.class, resourcePrimKey, this);
331 
332         if (wikiPageResource == null) {
333             Session session = null;
334 
335             try {
336                 session = openSession();
337 
338                 wikiPageResource = (WikiPageResource)session.get(WikiPageResourceImpl.class,
339                         new Long(resourcePrimKey));
340             }
341             catch (Exception e) {
342                 throw processException(e);
343             }
344             finally {
345                 if (wikiPageResource != null) {
346                     cacheResult(wikiPageResource);
347                 }
348 
349                 closeSession(session);
350             }
351         }
352 
353         return wikiPageResource;
354     }
355 
356     public WikiPageResource findByN_T(long nodeId, String title)
357         throws NoSuchPageResourceException, SystemException {
358         WikiPageResource wikiPageResource = fetchByN_T(nodeId, title);
359 
360         if (wikiPageResource == null) {
361             StringBundler msg = new StringBundler(6);
362 
363             msg.append(_NO_SUCH_ENTITY_WITH_KEY);
364 
365             msg.append("nodeId=");
366             msg.append(nodeId);
367 
368             msg.append(", title=");
369             msg.append(title);
370 
371             msg.append(StringPool.CLOSE_CURLY_BRACE);
372 
373             if (_log.isWarnEnabled()) {
374                 _log.warn(msg.toString());
375             }
376 
377             throw new NoSuchPageResourceException(msg.toString());
378         }
379 
380         return wikiPageResource;
381     }
382 
383     public WikiPageResource fetchByN_T(long nodeId, String title)
384         throws SystemException {
385         return fetchByN_T(nodeId, title, true);
386     }
387 
388     public WikiPageResource fetchByN_T(long nodeId, String title,
389         boolean retrieveFromCache) throws SystemException {
390         Object[] finderArgs = new Object[] { nodeId, title };
391 
392         Object result = null;
393 
394         if (retrieveFromCache) {
395             result = FinderCacheUtil.getResult(FINDER_PATH_FETCH_BY_N_T,
396                     finderArgs, this);
397         }
398 
399         if (result == null) {
400             StringBundler query = new StringBundler(3);
401 
402             query.append(_SQL_SELECT_WIKIPAGERESOURCE_WHERE);
403 
404             query.append(_FINDER_COLUMN_N_T_NODEID_2);
405 
406             if (title == null) {
407                 query.append(_FINDER_COLUMN_N_T_TITLE_1);
408             }
409             else {
410                 if (title.equals(StringPool.BLANK)) {
411                     query.append(_FINDER_COLUMN_N_T_TITLE_3);
412                 }
413                 else {
414                     query.append(_FINDER_COLUMN_N_T_TITLE_2);
415                 }
416             }
417 
418             String sql = query.toString();
419 
420             Session session = null;
421 
422             try {
423                 session = openSession();
424 
425                 Query q = session.createQuery(sql);
426 
427                 QueryPos qPos = QueryPos.getInstance(q);
428 
429                 qPos.add(nodeId);
430 
431                 if (title != null) {
432                     qPos.add(title);
433                 }
434 
435                 List<WikiPageResource> list = q.list();
436 
437                 result = list;
438 
439                 WikiPageResource wikiPageResource = null;
440 
441                 if (list.isEmpty()) {
442                     FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_N_T,
443                         finderArgs, list);
444                 }
445                 else {
446                     wikiPageResource = list.get(0);
447 
448                     cacheResult(wikiPageResource);
449 
450                     if ((wikiPageResource.getNodeId() != nodeId) ||
451                             (wikiPageResource.getTitle() == null) ||
452                             !wikiPageResource.getTitle().equals(title)) {
453                         FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_N_T,
454                             finderArgs, wikiPageResource);
455                     }
456                 }
457 
458                 return wikiPageResource;
459             }
460             catch (Exception e) {
461                 throw processException(e);
462             }
463             finally {
464                 if (result == null) {
465                     FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_N_T,
466                         finderArgs, new ArrayList<WikiPageResource>());
467                 }
468 
469                 closeSession(session);
470             }
471         }
472         else {
473             if (result instanceof List<?>) {
474                 return null;
475             }
476             else {
477                 return (WikiPageResource)result;
478             }
479         }
480     }
481 
482     public List<WikiPageResource> findAll() throws SystemException {
483         return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
484     }
485 
486     public List<WikiPageResource> findAll(int start, int end)
487         throws SystemException {
488         return findAll(start, end, null);
489     }
490 
491     public List<WikiPageResource> findAll(int start, int end,
492         OrderByComparator orderByComparator) throws SystemException {
493         Object[] finderArgs = new Object[] {
494                 String.valueOf(start), String.valueOf(end),
495                 String.valueOf(orderByComparator)
496             };
497 
498         List<WikiPageResource> list = (List<WikiPageResource>)FinderCacheUtil.getResult(FINDER_PATH_FIND_ALL,
499                 finderArgs, this);
500 
501         if (list == null) {
502             StringBundler query = null;
503             String sql = null;
504 
505             if (orderByComparator != null) {
506                 query = new StringBundler(2 +
507                         (orderByComparator.getOrderByFields().length * 3));
508 
509                 query.append(_SQL_SELECT_WIKIPAGERESOURCE);
510 
511                 appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS,
512                     orderByComparator);
513 
514                 sql = query.toString();
515             }
516             else {
517                 sql = _SQL_SELECT_WIKIPAGERESOURCE;
518             }
519 
520             Session session = null;
521 
522             try {
523                 session = openSession();
524 
525                 Query q = session.createQuery(sql);
526 
527                 if (orderByComparator == null) {
528                     list = (List<WikiPageResource>)QueryUtil.list(q,
529                             getDialect(), start, end, false);
530 
531                     Collections.sort(list);
532                 }
533                 else {
534                     list = (List<WikiPageResource>)QueryUtil.list(q,
535                             getDialect(), start, end);
536                 }
537             }
538             catch (Exception e) {
539                 throw processException(e);
540             }
541             finally {
542                 if (list == null) {
543                     list = new ArrayList<WikiPageResource>();
544                 }
545 
546                 cacheResult(list);
547 
548                 FinderCacheUtil.putResult(FINDER_PATH_FIND_ALL, finderArgs, list);
549 
550                 closeSession(session);
551             }
552         }
553 
554         return list;
555     }
556 
557     public void removeByN_T(long nodeId, String title)
558         throws NoSuchPageResourceException, SystemException {
559         WikiPageResource wikiPageResource = findByN_T(nodeId, title);
560 
561         remove(wikiPageResource);
562     }
563 
564     public void removeAll() throws SystemException {
565         for (WikiPageResource wikiPageResource : findAll()) {
566             remove(wikiPageResource);
567         }
568     }
569 
570     public int countByN_T(long nodeId, String title) throws SystemException {
571         Object[] finderArgs = new Object[] { nodeId, title };
572 
573         Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_BY_N_T,
574                 finderArgs, this);
575 
576         if (count == null) {
577             StringBundler query = new StringBundler(3);
578 
579             query.append(_SQL_COUNT_WIKIPAGERESOURCE_WHERE);
580 
581             query.append(_FINDER_COLUMN_N_T_NODEID_2);
582 
583             if (title == null) {
584                 query.append(_FINDER_COLUMN_N_T_TITLE_1);
585             }
586             else {
587                 if (title.equals(StringPool.BLANK)) {
588                     query.append(_FINDER_COLUMN_N_T_TITLE_3);
589                 }
590                 else {
591                     query.append(_FINDER_COLUMN_N_T_TITLE_2);
592                 }
593             }
594 
595             String sql = query.toString();
596 
597             Session session = null;
598 
599             try {
600                 session = openSession();
601 
602                 Query q = session.createQuery(sql);
603 
604                 QueryPos qPos = QueryPos.getInstance(q);
605 
606                 qPos.add(nodeId);
607 
608                 if (title != null) {
609                     qPos.add(title);
610                 }
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_BY_N_T, finderArgs,
623                     count);
624 
625                 closeSession(session);
626             }
627         }
628 
629         return count.intValue();
630     }
631 
632     public int countAll() throws SystemException {
633         Object[] finderArgs = new Object[0];
634 
635         Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_ALL,
636                 finderArgs, this);
637 
638         if (count == null) {
639             Session session = null;
640 
641             try {
642                 session = openSession();
643 
644                 Query q = session.createQuery(_SQL_COUNT_WIKIPAGERESOURCE);
645 
646                 count = (Long)q.uniqueResult();
647             }
648             catch (Exception e) {
649                 throw processException(e);
650             }
651             finally {
652                 if (count == null) {
653                     count = Long.valueOf(0);
654                 }
655 
656                 FinderCacheUtil.putResult(FINDER_PATH_COUNT_ALL, finderArgs,
657                     count);
658 
659                 closeSession(session);
660             }
661         }
662 
663         return count.intValue();
664     }
665 
666     public void afterPropertiesSet() {
667         String[] listenerClassNames = StringUtil.split(GetterUtil.getString(
668                     com.liferay.portal.util.PropsUtil.get(
669                         "value.object.listener.com.liferay.portlet.wiki.model.WikiPageResource")));
670 
671         if (listenerClassNames.length > 0) {
672             try {
673                 List<ModelListener<WikiPageResource>> listenersList = new ArrayList<ModelListener<WikiPageResource>>();
674 
675                 for (String listenerClassName : listenerClassNames) {
676                     listenersList.add((ModelListener<WikiPageResource>)InstanceFactory.newInstance(
677                             listenerClassName));
678                 }
679 
680                 listeners = listenersList.toArray(new ModelListener[listenersList.size()]);
681             }
682             catch (Exception e) {
683                 _log.error(e);
684             }
685         }
686     }
687 
688     public void destroy() {
689         EntityCacheUtil.removeCache(WikiPageResourceImpl.class.getName());
690         FinderCacheUtil.removeCache(FINDER_CLASS_NAME_ENTITY);
691         FinderCacheUtil.removeCache(FINDER_CLASS_NAME_LIST);
692     }
693 
694     @BeanReference(type = WikiNodePersistence.class)
695     protected WikiNodePersistence wikiNodePersistence;
696     @BeanReference(type = WikiPagePersistence.class)
697     protected WikiPagePersistence wikiPagePersistence;
698     @BeanReference(type = WikiPageResourcePersistence.class)
699     protected WikiPageResourcePersistence wikiPageResourcePersistence;
700     @BeanReference(type = ResourcePersistence.class)
701     protected ResourcePersistence resourcePersistence;
702     @BeanReference(type = UserPersistence.class)
703     protected UserPersistence userPersistence;
704     private static final String _SQL_SELECT_WIKIPAGERESOURCE = "SELECT wikiPageResource FROM WikiPageResource wikiPageResource";
705     private static final String _SQL_SELECT_WIKIPAGERESOURCE_WHERE = "SELECT wikiPageResource FROM WikiPageResource wikiPageResource WHERE ";
706     private static final String _SQL_COUNT_WIKIPAGERESOURCE = "SELECT COUNT(wikiPageResource) FROM WikiPageResource wikiPageResource";
707     private static final String _SQL_COUNT_WIKIPAGERESOURCE_WHERE = "SELECT COUNT(wikiPageResource) FROM WikiPageResource wikiPageResource WHERE ";
708     private static final String _FINDER_COLUMN_N_T_NODEID_2 = "wikiPageResource.nodeId = ? AND ";
709     private static final String _FINDER_COLUMN_N_T_TITLE_1 = "wikiPageResource.title IS NULL";
710     private static final String _FINDER_COLUMN_N_T_TITLE_2 = "wikiPageResource.title = ?";
711     private static final String _FINDER_COLUMN_N_T_TITLE_3 = "(wikiPageResource.title IS NULL OR wikiPageResource.title = ?)";
712     private static final String _ORDER_BY_ENTITY_ALIAS = "wikiPageResource.";
713     private static final String _NO_SUCH_ENTITY_WITH_PRIMARY_KEY = "No WikiPageResource exists with the primary key ";
714     private static final String _NO_SUCH_ENTITY_WITH_KEY = "No WikiPageResource exists with the key {";
715     private static Log _log = LogFactoryUtil.getLog(WikiPageResourcePersistenceImpl.class);
716 }