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