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.expando.service.persistence;
016    
017    import com.liferay.portal.service.persistence.BasePersistence;
018    
019    import com.liferay.portlet.expando.model.ExpandoRow;
020    
021    /**
022     * The persistence interface for the expando row service.
023     *
024     * <p>
025     * Never modify or reference this interface directly. Always use {@link ExpandoRowUtil} to access the expando row 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 ExpandoRowPersistenceImpl
034     * @see ExpandoRowUtil
035     * @generated
036     */
037    public interface ExpandoRowPersistence extends BasePersistence<ExpandoRow> {
038            /**
039            * Caches the expando row in the entity cache if it is enabled.
040            *
041            * @param expandoRow the expando row to cache
042            */
043            public void cacheResult(
044                    com.liferay.portlet.expando.model.ExpandoRow expandoRow);
045    
046            /**
047            * Caches the expando rows in the entity cache if it is enabled.
048            *
049            * @param expandoRows the expando rows to cache
050            */
051            public void cacheResult(
052                    java.util.List<com.liferay.portlet.expando.model.ExpandoRow> expandoRows);
053    
054            /**
055            * Creates a new expando row with the primary key. Does not add the expando row to the database.
056            *
057            * @param rowId the primary key for the new expando row
058            * @return the new expando row
059            */
060            public com.liferay.portlet.expando.model.ExpandoRow create(long rowId);
061    
062            /**
063            * Removes the expando row with the primary key from the database. Also notifies the appropriate model listeners.
064            *
065            * @param rowId the primary key of the expando row to remove
066            * @return the expando row that was removed
067            * @throws com.liferay.portlet.expando.NoSuchRowException if a expando row with the primary key could not be found
068            * @throws SystemException if a system exception occurred
069            */
070            public com.liferay.portlet.expando.model.ExpandoRow remove(long rowId)
071                    throws com.liferay.portal.kernel.exception.SystemException,
072                            com.liferay.portlet.expando.NoSuchRowException;
073    
074            public com.liferay.portlet.expando.model.ExpandoRow updateImpl(
075                    com.liferay.portlet.expando.model.ExpandoRow expandoRow, boolean merge)
076                    throws com.liferay.portal.kernel.exception.SystemException;
077    
078            /**
079            * Finds the expando row with the primary key or throws a {@link com.liferay.portlet.expando.NoSuchRowException} if it could not be found.
080            *
081            * @param rowId the primary key of the expando row to find
082            * @return the expando row
083            * @throws com.liferay.portlet.expando.NoSuchRowException if a expando row with the primary key could not be found
084            * @throws SystemException if a system exception occurred
085            */
086            public com.liferay.portlet.expando.model.ExpandoRow findByPrimaryKey(
087                    long rowId)
088                    throws com.liferay.portal.kernel.exception.SystemException,
089                            com.liferay.portlet.expando.NoSuchRowException;
090    
091            /**
092            * Finds the expando row with the primary key or returns <code>null</code> if it could not be found.
093            *
094            * @param rowId the primary key of the expando row to find
095            * @return the expando row, or <code>null</code> if a expando row with the primary key could not be found
096            * @throws SystemException if a system exception occurred
097            */
098            public com.liferay.portlet.expando.model.ExpandoRow fetchByPrimaryKey(
099                    long rowId) throws com.liferay.portal.kernel.exception.SystemException;
100    
101            /**
102            * Finds all the expando rows where tableId = &#63;.
103            *
104            * @param tableId the table id to search with
105            * @return the matching expando rows
106            * @throws SystemException if a system exception occurred
107            */
108            public java.util.List<com.liferay.portlet.expando.model.ExpandoRow> findByTableId(
109                    long tableId)
110                    throws com.liferay.portal.kernel.exception.SystemException;
111    
112            /**
113            * Finds a range of all the expando rows where tableId = &#63;.
114            *
115            * <p>
116            * 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.
117            * </p>
118            *
119            * @param tableId the table id to search with
120            * @param start the lower bound of the range of expando rows to return
121            * @param end the upper bound of the range of expando rows to return (not inclusive)
122            * @return the range of matching expando rows
123            * @throws SystemException if a system exception occurred
124            */
125            public java.util.List<com.liferay.portlet.expando.model.ExpandoRow> findByTableId(
126                    long tableId, int start, int end)
127                    throws com.liferay.portal.kernel.exception.SystemException;
128    
129            /**
130            * Finds an ordered range of all the expando rows where tableId = &#63;.
131            *
132            * <p>
133            * 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.
134            * </p>
135            *
136            * @param tableId the table id to search with
137            * @param start the lower bound of the range of expando rows to return
138            * @param end the upper bound of the range of expando rows to return (not inclusive)
139            * @param orderByComparator the comparator to order the results by
140            * @return the ordered range of matching expando rows
141            * @throws SystemException if a system exception occurred
142            */
143            public java.util.List<com.liferay.portlet.expando.model.ExpandoRow> findByTableId(
144                    long tableId, int start, int end,
145                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
146                    throws com.liferay.portal.kernel.exception.SystemException;
147    
148            /**
149            * Finds the first expando row in the ordered set where tableId = &#63;.
150            *
151            * <p>
152            * 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.
153            * </p>
154            *
155            * @param tableId the table id to search with
156            * @param orderByComparator the comparator to order the set by
157            * @return the first matching expando row
158            * @throws com.liferay.portlet.expando.NoSuchRowException if a matching expando row could not be found
159            * @throws SystemException if a system exception occurred
160            */
161            public com.liferay.portlet.expando.model.ExpandoRow findByTableId_First(
162                    long tableId,
163                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
164                    throws com.liferay.portal.kernel.exception.SystemException,
165                            com.liferay.portlet.expando.NoSuchRowException;
166    
167            /**
168            * Finds the last expando row in the ordered set where tableId = &#63;.
169            *
170            * <p>
171            * 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.
172            * </p>
173            *
174            * @param tableId the table id to search with
175            * @param orderByComparator the comparator to order the set by
176            * @return the last matching expando row
177            * @throws com.liferay.portlet.expando.NoSuchRowException if a matching expando row could not be found
178            * @throws SystemException if a system exception occurred
179            */
180            public com.liferay.portlet.expando.model.ExpandoRow findByTableId_Last(
181                    long tableId,
182                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
183                    throws com.liferay.portal.kernel.exception.SystemException,
184                            com.liferay.portlet.expando.NoSuchRowException;
185    
186            /**
187            * Finds the expando rows before and after the current expando row in the ordered set where tableId = &#63;.
188            *
189            * <p>
190            * 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.
191            * </p>
192            *
193            * @param rowId the primary key of the current expando row
194            * @param tableId the table id to search with
195            * @param orderByComparator the comparator to order the set by
196            * @return the previous, current, and next expando row
197            * @throws com.liferay.portlet.expando.NoSuchRowException if a expando row with the primary key could not be found
198            * @throws SystemException if a system exception occurred
199            */
200            public com.liferay.portlet.expando.model.ExpandoRow[] findByTableId_PrevAndNext(
201                    long rowId, long tableId,
202                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
203                    throws com.liferay.portal.kernel.exception.SystemException,
204                            com.liferay.portlet.expando.NoSuchRowException;
205    
206            /**
207            * Finds the expando row where tableId = &#63; and classPK = &#63; or throws a {@link com.liferay.portlet.expando.NoSuchRowException} if it could not be found.
208            *
209            * @param tableId the table id to search with
210            * @param classPK the class p k to search with
211            * @return the matching expando row
212            * @throws com.liferay.portlet.expando.NoSuchRowException if a matching expando row could not be found
213            * @throws SystemException if a system exception occurred
214            */
215            public com.liferay.portlet.expando.model.ExpandoRow findByT_C(
216                    long tableId, long classPK)
217                    throws com.liferay.portal.kernel.exception.SystemException,
218                            com.liferay.portlet.expando.NoSuchRowException;
219    
220            /**
221            * Finds the expando row where tableId = &#63; and classPK = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
222            *
223            * @param tableId the table id to search with
224            * @param classPK the class p k to search with
225            * @return the matching expando row, or <code>null</code> if a matching expando row could not be found
226            * @throws SystemException if a system exception occurred
227            */
228            public com.liferay.portlet.expando.model.ExpandoRow fetchByT_C(
229                    long tableId, long classPK)
230                    throws com.liferay.portal.kernel.exception.SystemException;
231    
232            /**
233            * Finds the expando row where tableId = &#63; and classPK = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
234            *
235            * @param tableId the table id to search with
236            * @param classPK the class p k to search with
237            * @return the matching expando row, or <code>null</code> if a matching expando row could not be found
238            * @throws SystemException if a system exception occurred
239            */
240            public com.liferay.portlet.expando.model.ExpandoRow fetchByT_C(
241                    long tableId, long classPK, boolean retrieveFromCache)
242                    throws com.liferay.portal.kernel.exception.SystemException;
243    
244            /**
245            * Finds all the expando rows.
246            *
247            * @return the expando rows
248            * @throws SystemException if a system exception occurred
249            */
250            public java.util.List<com.liferay.portlet.expando.model.ExpandoRow> findAll()
251                    throws com.liferay.portal.kernel.exception.SystemException;
252    
253            /**
254            * Finds a range of all the expando rows.
255            *
256            * <p>
257            * 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.
258            * </p>
259            *
260            * @param start the lower bound of the range of expando rows to return
261            * @param end the upper bound of the range of expando rows to return (not inclusive)
262            * @return the range of expando rows
263            * @throws SystemException if a system exception occurred
264            */
265            public java.util.List<com.liferay.portlet.expando.model.ExpandoRow> findAll(
266                    int start, int end)
267                    throws com.liferay.portal.kernel.exception.SystemException;
268    
269            /**
270            * Finds an ordered range of all the expando rows.
271            *
272            * <p>
273            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
274            * </p>
275            *
276            * @param start the lower bound of the range of expando rows to return
277            * @param end the upper bound of the range of expando rows to return (not inclusive)
278            * @param orderByComparator the comparator to order the results by
279            * @return the ordered range of expando rows
280            * @throws SystemException if a system exception occurred
281            */
282            public java.util.List<com.liferay.portlet.expando.model.ExpandoRow> findAll(
283                    int start, int end,
284                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
285                    throws com.liferay.portal.kernel.exception.SystemException;
286    
287            /**
288            * Removes all the expando rows where tableId = &#63; from the database.
289            *
290            * @param tableId the table id to search with
291            * @throws SystemException if a system exception occurred
292            */
293            public void removeByTableId(long tableId)
294                    throws com.liferay.portal.kernel.exception.SystemException;
295    
296            /**
297            * Removes the expando row where tableId = &#63; and classPK = &#63; from the database.
298            *
299            * @param tableId the table id to search with
300            * @param classPK the class p k to search with
301            * @throws SystemException if a system exception occurred
302            */
303            public void removeByT_C(long tableId, long classPK)
304                    throws com.liferay.portal.kernel.exception.SystemException,
305                            com.liferay.portlet.expando.NoSuchRowException;
306    
307            /**
308            * Removes all the expando rows from the database.
309            *
310            * @throws SystemException if a system exception occurred
311            */
312            public void removeAll()
313                    throws com.liferay.portal.kernel.exception.SystemException;
314    
315            /**
316            * Counts all the expando rows where tableId = &#63;.
317            *
318            * @param tableId the table id to search with
319            * @return the number of matching expando rows
320            * @throws SystemException if a system exception occurred
321            */
322            public int countByTableId(long tableId)
323                    throws com.liferay.portal.kernel.exception.SystemException;
324    
325            /**
326            * Counts all the expando rows where tableId = &#63; and classPK = &#63;.
327            *
328            * @param tableId the table id to search with
329            * @param classPK the class p k to search with
330            * @return the number of matching expando rows
331            * @throws SystemException if a system exception occurred
332            */
333            public int countByT_C(long tableId, long classPK)
334                    throws com.liferay.portal.kernel.exception.SystemException;
335    
336            /**
337            * Counts all the expando rows.
338            *
339            * @return the number of expando rows
340            * @throws SystemException if a system exception occurred
341            */
342            public int countAll()
343                    throws com.liferay.portal.kernel.exception.SystemException;
344    }