001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.wiki.service.persistence;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
019    import com.liferay.portal.kernel.exception.SystemException;
020    import com.liferay.portal.kernel.util.OrderByComparator;
021    import com.liferay.portal.service.ServiceContext;
022    
023    import com.liferay.portlet.wiki.model.WikiPageResource;
024    
025    import java.util.List;
026    
027    /**
028     * The persistence utility for the wiki page resource service.
029     *
030     * <p>
031     * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regnerate this class.
032     * </p>
033     *
034     * @author Brian Wing Shun Chan
035     * @see WikiPageResourcePersistence
036     * @see WikiPageResourcePersistenceImpl
037     * @generated
038     */
039    public class WikiPageResourceUtil {
040            /**
041             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
042             */
043            public static void clearCache() {
044                    getPersistence().clearCache();
045            }
046    
047            /**
048             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
049             */
050            public static void clearCache(WikiPageResource wikiPageResource) {
051                    getPersistence().clearCache(wikiPageResource);
052            }
053    
054            /**
055             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
056             */
057            public long countWithDynamicQuery(DynamicQuery dynamicQuery)
058                    throws SystemException {
059                    return getPersistence().countWithDynamicQuery(dynamicQuery);
060            }
061    
062            /**
063             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
064             */
065            public static List<WikiPageResource> findWithDynamicQuery(
066                    DynamicQuery dynamicQuery) throws SystemException {
067                    return getPersistence().findWithDynamicQuery(dynamicQuery);
068            }
069    
070            /**
071             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
072             */
073            public static List<WikiPageResource> findWithDynamicQuery(
074                    DynamicQuery dynamicQuery, int start, int end)
075                    throws SystemException {
076                    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
077            }
078    
079            /**
080             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
081             */
082            public static List<WikiPageResource> findWithDynamicQuery(
083                    DynamicQuery dynamicQuery, int start, int end,
084                    OrderByComparator orderByComparator) throws SystemException {
085                    return getPersistence()
086                                       .findWithDynamicQuery(dynamicQuery, start, end,
087                            orderByComparator);
088            }
089    
090            /**
091             * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
092             */
093            public static WikiPageResource remove(WikiPageResource wikiPageResource)
094                    throws SystemException {
095                    return getPersistence().remove(wikiPageResource);
096            }
097    
098            /**
099             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
100             */
101            public static WikiPageResource update(WikiPageResource wikiPageResource,
102                    boolean merge) throws SystemException {
103                    return getPersistence().update(wikiPageResource, merge);
104            }
105    
106            /**
107             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
108             */
109            public static WikiPageResource update(WikiPageResource wikiPageResource,
110                    boolean merge, ServiceContext serviceContext) throws SystemException {
111                    return getPersistence().update(wikiPageResource, merge, serviceContext);
112            }
113    
114            /**
115            * Caches the wiki page resource in the entity cache if it is enabled.
116            *
117            * @param wikiPageResource the wiki page resource to cache
118            */
119            public static void cacheResult(
120                    com.liferay.portlet.wiki.model.WikiPageResource wikiPageResource) {
121                    getPersistence().cacheResult(wikiPageResource);
122            }
123    
124            /**
125            * Caches the wiki page resources in the entity cache if it is enabled.
126            *
127            * @param wikiPageResources the wiki page resources to cache
128            */
129            public static void cacheResult(
130                    java.util.List<com.liferay.portlet.wiki.model.WikiPageResource> wikiPageResources) {
131                    getPersistence().cacheResult(wikiPageResources);
132            }
133    
134            /**
135            * Creates a new wiki page resource with the primary key.
136            *
137            * @param resourcePrimKey the primary key for the new wiki page resource
138            * @return the new wiki page resource
139            */
140            public static com.liferay.portlet.wiki.model.WikiPageResource create(
141                    long resourcePrimKey) {
142                    return getPersistence().create(resourcePrimKey);
143            }
144    
145            /**
146            * Removes the wiki page resource with the primary key from the database. Also notifies the appropriate model listeners.
147            *
148            * @param resourcePrimKey the primary key of the wiki page resource to remove
149            * @return the wiki page resource that was removed
150            * @throws com.liferay.portlet.wiki.NoSuchPageResourceException if a wiki page resource with the primary key could not be found
151            * @throws SystemException if a system exception occurred
152            */
153            public static com.liferay.portlet.wiki.model.WikiPageResource remove(
154                    long resourcePrimKey)
155                    throws com.liferay.portal.kernel.exception.SystemException,
156                            com.liferay.portlet.wiki.NoSuchPageResourceException {
157                    return getPersistence().remove(resourcePrimKey);
158            }
159    
160            public static com.liferay.portlet.wiki.model.WikiPageResource updateImpl(
161                    com.liferay.portlet.wiki.model.WikiPageResource wikiPageResource,
162                    boolean merge)
163                    throws com.liferay.portal.kernel.exception.SystemException {
164                    return getPersistence().updateImpl(wikiPageResource, merge);
165            }
166    
167            /**
168            * Finds the wiki page resource with the primary key or throws a {@link com.liferay.portlet.wiki.NoSuchPageResourceException} if it could not be found.
169            *
170            * @param resourcePrimKey the primary key of the wiki page resource to find
171            * @return the wiki page resource
172            * @throws com.liferay.portlet.wiki.NoSuchPageResourceException if a wiki page resource with the primary key could not be found
173            * @throws SystemException if a system exception occurred
174            */
175            public static com.liferay.portlet.wiki.model.WikiPageResource findByPrimaryKey(
176                    long resourcePrimKey)
177                    throws com.liferay.portal.kernel.exception.SystemException,
178                            com.liferay.portlet.wiki.NoSuchPageResourceException {
179                    return getPersistence().findByPrimaryKey(resourcePrimKey);
180            }
181    
182            /**
183            * Finds the wiki page resource with the primary key or returns <code>null</code> if it could not be found.
184            *
185            * @param resourcePrimKey the primary key of the wiki page resource to find
186            * @return the wiki page resource, or <code>null</code> if a wiki page resource with the primary key could not be found
187            * @throws SystemException if a system exception occurred
188            */
189            public static com.liferay.portlet.wiki.model.WikiPageResource fetchByPrimaryKey(
190                    long resourcePrimKey)
191                    throws com.liferay.portal.kernel.exception.SystemException {
192                    return getPersistence().fetchByPrimaryKey(resourcePrimKey);
193            }
194    
195            /**
196            * Finds all the wiki page resources where uuid = &#63;.
197            *
198            * @param uuid the uuid to search with
199            * @return the matching wiki page resources
200            * @throws SystemException if a system exception occurred
201            */
202            public static java.util.List<com.liferay.portlet.wiki.model.WikiPageResource> findByUuid(
203                    java.lang.String uuid)
204                    throws com.liferay.portal.kernel.exception.SystemException {
205                    return getPersistence().findByUuid(uuid);
206            }
207    
208            /**
209            * Finds a range of all the wiki page resources where uuid = &#63;.
210            *
211            * <p>
212            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
213            * </p>
214            *
215            * @param uuid the uuid to search with
216            * @param start the lower bound of the range of wiki page resources to return
217            * @param end the upper bound of the range of wiki page resources to return (not inclusive)
218            * @return the range of matching wiki page resources
219            * @throws SystemException if a system exception occurred
220            */
221            public static java.util.List<com.liferay.portlet.wiki.model.WikiPageResource> findByUuid(
222                    java.lang.String uuid, int start, int end)
223                    throws com.liferay.portal.kernel.exception.SystemException {
224                    return getPersistence().findByUuid(uuid, start, end);
225            }
226    
227            /**
228            * Finds an ordered range of all the wiki page resources where uuid = &#63;.
229            *
230            * <p>
231            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
232            * </p>
233            *
234            * @param uuid the uuid to search with
235            * @param start the lower bound of the range of wiki page resources to return
236            * @param end the upper bound of the range of wiki page resources to return (not inclusive)
237            * @param orderByComparator the comparator to order the results by
238            * @return the ordered range of matching wiki page resources
239            * @throws SystemException if a system exception occurred
240            */
241            public static java.util.List<com.liferay.portlet.wiki.model.WikiPageResource> findByUuid(
242                    java.lang.String uuid, int start, int end,
243                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
244                    throws com.liferay.portal.kernel.exception.SystemException {
245                    return getPersistence().findByUuid(uuid, start, end, orderByComparator);
246            }
247    
248            /**
249            * Finds the first wiki page resource in the ordered set where uuid = &#63;.
250            *
251            * <p>
252            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
253            * </p>
254            *
255            * @param uuid the uuid to search with
256            * @param orderByComparator the comparator to order the set by
257            * @return the first matching wiki page resource
258            * @throws com.liferay.portlet.wiki.NoSuchPageResourceException if a matching wiki page resource could not be found
259            * @throws SystemException if a system exception occurred
260            */
261            public static com.liferay.portlet.wiki.model.WikiPageResource findByUuid_First(
262                    java.lang.String uuid,
263                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
264                    throws com.liferay.portal.kernel.exception.SystemException,
265                            com.liferay.portlet.wiki.NoSuchPageResourceException {
266                    return getPersistence().findByUuid_First(uuid, orderByComparator);
267            }
268    
269            /**
270            * Finds the last wiki page resource in the ordered set where uuid = &#63;.
271            *
272            * <p>
273            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
274            * </p>
275            *
276            * @param uuid the uuid to search with
277            * @param orderByComparator the comparator to order the set by
278            * @return the last matching wiki page resource
279            * @throws com.liferay.portlet.wiki.NoSuchPageResourceException if a matching wiki page resource could not be found
280            * @throws SystemException if a system exception occurred
281            */
282            public static com.liferay.portlet.wiki.model.WikiPageResource findByUuid_Last(
283                    java.lang.String uuid,
284                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
285                    throws com.liferay.portal.kernel.exception.SystemException,
286                            com.liferay.portlet.wiki.NoSuchPageResourceException {
287                    return getPersistence().findByUuid_Last(uuid, orderByComparator);
288            }
289    
290            /**
291            * Finds the wiki page resources before and after the current wiki page resource in the ordered set where uuid = &#63;.
292            *
293            * <p>
294            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
295            * </p>
296            *
297            * @param resourcePrimKey the primary key of the current wiki page resource
298            * @param uuid the uuid to search with
299            * @param orderByComparator the comparator to order the set by
300            * @return the previous, current, and next wiki page resource
301            * @throws com.liferay.portlet.wiki.NoSuchPageResourceException if a wiki page resource with the primary key could not be found
302            * @throws SystemException if a system exception occurred
303            */
304            public static com.liferay.portlet.wiki.model.WikiPageResource[] findByUuid_PrevAndNext(
305                    long resourcePrimKey, java.lang.String uuid,
306                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
307                    throws com.liferay.portal.kernel.exception.SystemException,
308                            com.liferay.portlet.wiki.NoSuchPageResourceException {
309                    return getPersistence()
310                                       .findByUuid_PrevAndNext(resourcePrimKey, uuid,
311                            orderByComparator);
312            }
313    
314            /**
315            * Finds the wiki page resource where nodeId = &#63; and title = &#63; or throws a {@link com.liferay.portlet.wiki.NoSuchPageResourceException} if it could not be found.
316            *
317            * @param nodeId the node id to search with
318            * @param title the title to search with
319            * @return the matching wiki page resource
320            * @throws com.liferay.portlet.wiki.NoSuchPageResourceException if a matching wiki page resource could not be found
321            * @throws SystemException if a system exception occurred
322            */
323            public static com.liferay.portlet.wiki.model.WikiPageResource findByN_T(
324                    long nodeId, java.lang.String title)
325                    throws com.liferay.portal.kernel.exception.SystemException,
326                            com.liferay.portlet.wiki.NoSuchPageResourceException {
327                    return getPersistence().findByN_T(nodeId, title);
328            }
329    
330            /**
331            * Finds the wiki page resource where nodeId = &#63; and title = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
332            *
333            * @param nodeId the node id to search with
334            * @param title the title to search with
335            * @return the matching wiki page resource, or <code>null</code> if a matching wiki page resource could not be found
336            * @throws SystemException if a system exception occurred
337            */
338            public static com.liferay.portlet.wiki.model.WikiPageResource fetchByN_T(
339                    long nodeId, java.lang.String title)
340                    throws com.liferay.portal.kernel.exception.SystemException {
341                    return getPersistence().fetchByN_T(nodeId, title);
342            }
343    
344            /**
345            * Finds the wiki page resource where nodeId = &#63; and title = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
346            *
347            * @param nodeId the node id to search with
348            * @param title the title to search with
349            * @return the matching wiki page resource, or <code>null</code> if a matching wiki page resource could not be found
350            * @throws SystemException if a system exception occurred
351            */
352            public static com.liferay.portlet.wiki.model.WikiPageResource fetchByN_T(
353                    long nodeId, java.lang.String title, boolean retrieveFromCache)
354                    throws com.liferay.portal.kernel.exception.SystemException {
355                    return getPersistence().fetchByN_T(nodeId, title, retrieveFromCache);
356            }
357    
358            /**
359            * Finds all the wiki page resources.
360            *
361            * @return the wiki page resources
362            * @throws SystemException if a system exception occurred
363            */
364            public static java.util.List<com.liferay.portlet.wiki.model.WikiPageResource> findAll()
365                    throws com.liferay.portal.kernel.exception.SystemException {
366                    return getPersistence().findAll();
367            }
368    
369            /**
370            * Finds a range of all the wiki page resources.
371            *
372            * <p>
373            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
374            * </p>
375            *
376            * @param start the lower bound of the range of wiki page resources to return
377            * @param end the upper bound of the range of wiki page resources to return (not inclusive)
378            * @return the range of wiki page resources
379            * @throws SystemException if a system exception occurred
380            */
381            public static java.util.List<com.liferay.portlet.wiki.model.WikiPageResource> findAll(
382                    int start, int end)
383                    throws com.liferay.portal.kernel.exception.SystemException {
384                    return getPersistence().findAll(start, end);
385            }
386    
387            /**
388            * Finds an ordered range of all the wiki page resources.
389            *
390            * <p>
391            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
392            * </p>
393            *
394            * @param start the lower bound of the range of wiki page resources to return
395            * @param end the upper bound of the range of wiki page resources to return (not inclusive)
396            * @param orderByComparator the comparator to order the results by
397            * @return the ordered range of wiki page resources
398            * @throws SystemException if a system exception occurred
399            */
400            public static java.util.List<com.liferay.portlet.wiki.model.WikiPageResource> findAll(
401                    int start, int end,
402                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
403                    throws com.liferay.portal.kernel.exception.SystemException {
404                    return getPersistence().findAll(start, end, orderByComparator);
405            }
406    
407            /**
408            * Removes all the wiki page resources where uuid = &#63; from the database.
409            *
410            * @param uuid the uuid to search with
411            * @throws SystemException if a system exception occurred
412            */
413            public static void removeByUuid(java.lang.String uuid)
414                    throws com.liferay.portal.kernel.exception.SystemException {
415                    getPersistence().removeByUuid(uuid);
416            }
417    
418            /**
419            * Removes the wiki page resource where nodeId = &#63; and title = &#63; from the database.
420            *
421            * @param nodeId the node id to search with
422            * @param title the title to search with
423            * @throws SystemException if a system exception occurred
424            */
425            public static void removeByN_T(long nodeId, java.lang.String title)
426                    throws com.liferay.portal.kernel.exception.SystemException,
427                            com.liferay.portlet.wiki.NoSuchPageResourceException {
428                    getPersistence().removeByN_T(nodeId, title);
429            }
430    
431            /**
432            * Removes all the wiki page resources from the database.
433            *
434            * @throws SystemException if a system exception occurred
435            */
436            public static void removeAll()
437                    throws com.liferay.portal.kernel.exception.SystemException {
438                    getPersistence().removeAll();
439            }
440    
441            /**
442            * Counts all the wiki page resources where uuid = &#63;.
443            *
444            * @param uuid the uuid to search with
445            * @return the number of matching wiki page resources
446            * @throws SystemException if a system exception occurred
447            */
448            public static int countByUuid(java.lang.String uuid)
449                    throws com.liferay.portal.kernel.exception.SystemException {
450                    return getPersistence().countByUuid(uuid);
451            }
452    
453            /**
454            * Counts all the wiki page resources where nodeId = &#63; and title = &#63;.
455            *
456            * @param nodeId the node id to search with
457            * @param title the title to search with
458            * @return the number of matching wiki page resources
459            * @throws SystemException if a system exception occurred
460            */
461            public static int countByN_T(long nodeId, java.lang.String title)
462                    throws com.liferay.portal.kernel.exception.SystemException {
463                    return getPersistence().countByN_T(nodeId, title);
464            }
465    
466            /**
467            * Counts all the wiki page resources.
468            *
469            * @return the number of wiki page resources
470            * @throws SystemException if a system exception occurred
471            */
472            public static int countAll()
473                    throws com.liferay.portal.kernel.exception.SystemException {
474                    return getPersistence().countAll();
475            }
476    
477            public static WikiPageResourcePersistence getPersistence() {
478                    if (_persistence == null) {
479                            _persistence = (WikiPageResourcePersistence)PortalBeanLocatorUtil.locate(WikiPageResourcePersistence.class.getName());
480                    }
481    
482                    return _persistence;
483            }
484    
485            public void setPersistence(WikiPageResourcePersistence persistence) {
486                    _persistence = persistence;
487            }
488    
489            private static WikiPageResourcePersistence _persistence;
490    }