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