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.service.persistence.BasePersistence;
018    
019    import com.liferay.portlet.wiki.model.WikiPageResource;
020    
021    /**
022     * The persistence interface for the wiki page resource service.
023     *
024     * <p>
025     * Never modify or reference this interface directly. Always use {@link WikiPageResourceUtil} to access the wiki page resource persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface.
026     * </p>
027     *
028     * <p>
029     * Caching information and settings can be found in <code>portal.properties</code>
030     * </p>
031     *
032     * @author Brian Wing Shun Chan
033     * @see WikiPageResourcePersistenceImpl
034     * @see WikiPageResourceUtil
035     * @generated
036     */
037    public interface WikiPageResourcePersistence extends BasePersistence<WikiPageResource> {
038            /**
039            * Caches the wiki page resource in the entity cache if it is enabled.
040            *
041            * @param wikiPageResource the wiki page resource to cache
042            */
043            public void cacheResult(
044                    com.liferay.portlet.wiki.model.WikiPageResource wikiPageResource);
045    
046            /**
047            * Caches the wiki page resources in the entity cache if it is enabled.
048            *
049            * @param wikiPageResources the wiki page resources to cache
050            */
051            public void cacheResult(
052                    java.util.List<com.liferay.portlet.wiki.model.WikiPageResource> wikiPageResources);
053    
054            /**
055            * Creates a new wiki page resource with the primary key. Does not add the wiki page resource to the database.
056            *
057            * @param resourcePrimKey the primary key for the new wiki page resource
058            * @return the new wiki page resource
059            */
060            public com.liferay.portlet.wiki.model.WikiPageResource create(
061                    long resourcePrimKey);
062    
063            /**
064            * Removes the wiki page resource with the primary key from the database. Also notifies the appropriate model listeners.
065            *
066            * @param resourcePrimKey the primary key of the wiki page resource to remove
067            * @return the wiki page resource that was removed
068            * @throws com.liferay.portlet.wiki.NoSuchPageResourceException if a wiki page resource with the primary key could not be found
069            * @throws SystemException if a system exception occurred
070            */
071            public com.liferay.portlet.wiki.model.WikiPageResource remove(
072                    long resourcePrimKey)
073                    throws com.liferay.portal.kernel.exception.SystemException,
074                            com.liferay.portlet.wiki.NoSuchPageResourceException;
075    
076            public com.liferay.portlet.wiki.model.WikiPageResource updateImpl(
077                    com.liferay.portlet.wiki.model.WikiPageResource wikiPageResource,
078                    boolean merge)
079                    throws com.liferay.portal.kernel.exception.SystemException;
080    
081            /**
082            * Finds the wiki page resource with the primary key or throws a {@link com.liferay.portlet.wiki.NoSuchPageResourceException} if it could not be found.
083            *
084            * @param resourcePrimKey the primary key of the wiki page resource to find
085            * @return the wiki page resource
086            * @throws com.liferay.portlet.wiki.NoSuchPageResourceException if a wiki page resource with the primary key could not be found
087            * @throws SystemException if a system exception occurred
088            */
089            public com.liferay.portlet.wiki.model.WikiPageResource findByPrimaryKey(
090                    long resourcePrimKey)
091                    throws com.liferay.portal.kernel.exception.SystemException,
092                            com.liferay.portlet.wiki.NoSuchPageResourceException;
093    
094            /**
095            * Finds the wiki page resource with the primary key or returns <code>null</code> if it could not be found.
096            *
097            * @param resourcePrimKey the primary key of the wiki page resource to find
098            * @return the wiki page resource, or <code>null</code> if a wiki page resource with the primary key could not be found
099            * @throws SystemException if a system exception occurred
100            */
101            public com.liferay.portlet.wiki.model.WikiPageResource fetchByPrimaryKey(
102                    long resourcePrimKey)
103                    throws com.liferay.portal.kernel.exception.SystemException;
104    
105            /**
106            * Finds all the wiki page resources where uuid = &#63;.
107            *
108            * @param uuid the uuid to search with
109            * @return the matching wiki page resources
110            * @throws SystemException if a system exception occurred
111            */
112            public java.util.List<com.liferay.portlet.wiki.model.WikiPageResource> findByUuid(
113                    java.lang.String uuid)
114                    throws com.liferay.portal.kernel.exception.SystemException;
115    
116            /**
117            * Finds a range of all the wiki page resources where uuid = &#63;.
118            *
119            * <p>
120            * 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.
121            * </p>
122            *
123            * @param uuid the uuid to search with
124            * @param start the lower bound of the range of wiki page resources to return
125            * @param end the upper bound of the range of wiki page resources to return (not inclusive)
126            * @return the range of matching wiki page resources
127            * @throws SystemException if a system exception occurred
128            */
129            public java.util.List<com.liferay.portlet.wiki.model.WikiPageResource> findByUuid(
130                    java.lang.String uuid, int start, int end)
131                    throws com.liferay.portal.kernel.exception.SystemException;
132    
133            /**
134            * Finds an ordered range of all the wiki page resources where uuid = &#63;.
135            *
136            * <p>
137            * 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.
138            * </p>
139            *
140            * @param uuid the uuid to search with
141            * @param start the lower bound of the range of wiki page resources to return
142            * @param end the upper bound of the range of wiki page resources to return (not inclusive)
143            * @param orderByComparator the comparator to order the results by
144            * @return the ordered range of matching wiki page resources
145            * @throws SystemException if a system exception occurred
146            */
147            public java.util.List<com.liferay.portlet.wiki.model.WikiPageResource> findByUuid(
148                    java.lang.String uuid, int start, int end,
149                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
150                    throws com.liferay.portal.kernel.exception.SystemException;
151    
152            /**
153            * Finds the first wiki page resource in the ordered set where uuid = &#63;.
154            *
155            * <p>
156            * 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.
157            * </p>
158            *
159            * @param uuid the uuid to search with
160            * @param orderByComparator the comparator to order the set by
161            * @return the first matching wiki page resource
162            * @throws com.liferay.portlet.wiki.NoSuchPageResourceException if a matching wiki page resource could not be found
163            * @throws SystemException if a system exception occurred
164            */
165            public com.liferay.portlet.wiki.model.WikiPageResource findByUuid_First(
166                    java.lang.String uuid,
167                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
168                    throws com.liferay.portal.kernel.exception.SystemException,
169                            com.liferay.portlet.wiki.NoSuchPageResourceException;
170    
171            /**
172            * Finds the last wiki page resource in the ordered set where uuid = &#63;.
173            *
174            * <p>
175            * 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.
176            * </p>
177            *
178            * @param uuid the uuid to search with
179            * @param orderByComparator the comparator to order the set by
180            * @return the last matching wiki page resource
181            * @throws com.liferay.portlet.wiki.NoSuchPageResourceException if a matching wiki page resource could not be found
182            * @throws SystemException if a system exception occurred
183            */
184            public com.liferay.portlet.wiki.model.WikiPageResource findByUuid_Last(
185                    java.lang.String uuid,
186                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
187                    throws com.liferay.portal.kernel.exception.SystemException,
188                            com.liferay.portlet.wiki.NoSuchPageResourceException;
189    
190            /**
191            * Finds the wiki page resources before and after the current wiki page resource in the ordered set where uuid = &#63;.
192            *
193            * <p>
194            * 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.
195            * </p>
196            *
197            * @param resourcePrimKey the primary key of the current wiki page resource
198            * @param uuid the uuid to search with
199            * @param orderByComparator the comparator to order the set by
200            * @return the previous, current, and next wiki page resource
201            * @throws com.liferay.portlet.wiki.NoSuchPageResourceException if a wiki page resource with the primary key could not be found
202            * @throws SystemException if a system exception occurred
203            */
204            public com.liferay.portlet.wiki.model.WikiPageResource[] findByUuid_PrevAndNext(
205                    long resourcePrimKey, java.lang.String uuid,
206                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
207                    throws com.liferay.portal.kernel.exception.SystemException,
208                            com.liferay.portlet.wiki.NoSuchPageResourceException;
209    
210            /**
211            * 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.
212            *
213            * @param nodeId the node id to search with
214            * @param title the title to search with
215            * @return the matching wiki page resource
216            * @throws com.liferay.portlet.wiki.NoSuchPageResourceException if a matching wiki page resource could not be found
217            * @throws SystemException if a system exception occurred
218            */
219            public com.liferay.portlet.wiki.model.WikiPageResource findByN_T(
220                    long nodeId, java.lang.String title)
221                    throws com.liferay.portal.kernel.exception.SystemException,
222                            com.liferay.portlet.wiki.NoSuchPageResourceException;
223    
224            /**
225            * 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.
226            *
227            * @param nodeId the node id to search with
228            * @param title the title to search with
229            * @return the matching wiki page resource, or <code>null</code> if a matching wiki page resource could not be found
230            * @throws SystemException if a system exception occurred
231            */
232            public com.liferay.portlet.wiki.model.WikiPageResource fetchByN_T(
233                    long nodeId, java.lang.String title)
234                    throws com.liferay.portal.kernel.exception.SystemException;
235    
236            /**
237            * 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.
238            *
239            * @param nodeId the node id to search with
240            * @param title the title to search with
241            * @return the matching wiki page resource, or <code>null</code> if a matching wiki page resource could not be found
242            * @throws SystemException if a system exception occurred
243            */
244            public com.liferay.portlet.wiki.model.WikiPageResource fetchByN_T(
245                    long nodeId, java.lang.String title, boolean retrieveFromCache)
246                    throws com.liferay.portal.kernel.exception.SystemException;
247    
248            /**
249            * Finds all the wiki page resources.
250            *
251            * @return the wiki page resources
252            * @throws SystemException if a system exception occurred
253            */
254            public java.util.List<com.liferay.portlet.wiki.model.WikiPageResource> findAll()
255                    throws com.liferay.portal.kernel.exception.SystemException;
256    
257            /**
258            * Finds a range of all the wiki page resources.
259            *
260            * <p>
261            * 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.
262            * </p>
263            *
264            * @param start the lower bound of the range of wiki page resources to return
265            * @param end the upper bound of the range of wiki page resources to return (not inclusive)
266            * @return the range of wiki page resources
267            * @throws SystemException if a system exception occurred
268            */
269            public java.util.List<com.liferay.portlet.wiki.model.WikiPageResource> findAll(
270                    int start, int end)
271                    throws com.liferay.portal.kernel.exception.SystemException;
272    
273            /**
274            * Finds an ordered range of all the wiki page resources.
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 start the lower bound of the range of wiki page resources to return
281            * @param end the upper bound of the range of wiki page resources to return (not inclusive)
282            * @param orderByComparator the comparator to order the results by
283            * @return the ordered range of wiki page resources
284            * @throws SystemException if a system exception occurred
285            */
286            public java.util.List<com.liferay.portlet.wiki.model.WikiPageResource> findAll(
287                    int start, int end,
288                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
289                    throws com.liferay.portal.kernel.exception.SystemException;
290    
291            /**
292            * Removes all the wiki page resources where uuid = &#63; from the database.
293            *
294            * @param uuid the uuid to search with
295            * @throws SystemException if a system exception occurred
296            */
297            public void removeByUuid(java.lang.String uuid)
298                    throws com.liferay.portal.kernel.exception.SystemException;
299    
300            /**
301            * Removes the wiki page resource where nodeId = &#63; and title = &#63; from the database.
302            *
303            * @param nodeId the node id to search with
304            * @param title the title to search with
305            * @throws SystemException if a system exception occurred
306            */
307            public void removeByN_T(long nodeId, java.lang.String title)
308                    throws com.liferay.portal.kernel.exception.SystemException,
309                            com.liferay.portlet.wiki.NoSuchPageResourceException;
310    
311            /**
312            * Removes all the wiki page resources from the database.
313            *
314            * @throws SystemException if a system exception occurred
315            */
316            public void removeAll()
317                    throws com.liferay.portal.kernel.exception.SystemException;
318    
319            /**
320            * Counts all the wiki page resources where uuid = &#63;.
321            *
322            * @param uuid the uuid to search with
323            * @return the number of matching wiki page resources
324            * @throws SystemException if a system exception occurred
325            */
326            public int countByUuid(java.lang.String uuid)
327                    throws com.liferay.portal.kernel.exception.SystemException;
328    
329            /**
330            * Counts all the wiki page resources where nodeId = &#63; and title = &#63;.
331            *
332            * @param nodeId the node id to search with
333            * @param title the title to search with
334            * @return the number of matching wiki page resources
335            * @throws SystemException if a system exception occurred
336            */
337            public int countByN_T(long nodeId, java.lang.String title)
338                    throws com.liferay.portal.kernel.exception.SystemException;
339    
340            /**
341            * Counts all the wiki page resources.
342            *
343            * @return the number of wiki page resources
344            * @throws SystemException if a system exception occurred
345            */
346            public int countAll()
347                    throws com.liferay.portal.kernel.exception.SystemException;
348    }