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