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