001    /**
002     * Copyright (c) 2000-present 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 aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.service.persistence.BasePersistence;
020    
021    import com.liferay.portlet.expando.model.ExpandoRow;
022    
023    /**
024     * The persistence interface for the expando row service.
025     *
026     * <p>
027     * Caching information and settings can be found in <code>portal.properties</code>
028     * </p>
029     *
030     * @author Brian Wing Shun Chan
031     * @see ExpandoRowPersistenceImpl
032     * @see ExpandoRowUtil
033     * @generated
034     */
035    @ProviderType
036    public interface ExpandoRowPersistence extends BasePersistence<ExpandoRow> {
037            /*
038             * NOTE FOR DEVELOPERS:
039             *
040             * 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.
041             */
042    
043            /**
044            * Returns all the expando rows where tableId = &#63;.
045            *
046            * @param tableId the table ID
047            * @return the matching expando rows
048            */
049            public java.util.List<com.liferay.portlet.expando.model.ExpandoRow> findByTableId(
050                    long tableId);
051    
052            /**
053            * Returns a range of all the expando rows where tableId = &#63;.
054            *
055            * <p>
056            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.expando.model.impl.ExpandoRowModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
057            * </p>
058            *
059            * @param tableId the table ID
060            * @param start the lower bound of the range of expando rows
061            * @param end the upper bound of the range of expando rows (not inclusive)
062            * @return the range of matching expando rows
063            */
064            public java.util.List<com.liferay.portlet.expando.model.ExpandoRow> findByTableId(
065                    long tableId, int start, int end);
066    
067            /**
068            * Returns an ordered range of all the expando rows where tableId = &#63;.
069            *
070            * <p>
071            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.expando.model.impl.ExpandoRowModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
072            * </p>
073            *
074            * @param tableId the table ID
075            * @param start the lower bound of the range of expando rows
076            * @param end the upper bound of the range of expando rows (not inclusive)
077            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
078            * @return the ordered range of matching expando rows
079            */
080            public java.util.List<com.liferay.portlet.expando.model.ExpandoRow> findByTableId(
081                    long tableId, int start, int end,
082                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.expando.model.ExpandoRow> orderByComparator);
083    
084            /**
085            * Returns the first expando row in the ordered set where tableId = &#63;.
086            *
087            * @param tableId the table ID
088            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
089            * @return the first matching expando row
090            * @throws com.liferay.portlet.expando.NoSuchRowException if a matching expando row could not be found
091            */
092            public com.liferay.portlet.expando.model.ExpandoRow findByTableId_First(
093                    long tableId,
094                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.expando.model.ExpandoRow> orderByComparator)
095                    throws com.liferay.portlet.expando.NoSuchRowException;
096    
097            /**
098            * Returns the first expando row in the ordered set where tableId = &#63;.
099            *
100            * @param tableId the table ID
101            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
102            * @return the first matching expando row, or <code>null</code> if a matching expando row could not be found
103            */
104            public com.liferay.portlet.expando.model.ExpandoRow fetchByTableId_First(
105                    long tableId,
106                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.expando.model.ExpandoRow> orderByComparator);
107    
108            /**
109            * Returns the last expando row in the ordered set where tableId = &#63;.
110            *
111            * @param tableId the table ID
112            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
113            * @return the last matching expando row
114            * @throws com.liferay.portlet.expando.NoSuchRowException if a matching expando row could not be found
115            */
116            public com.liferay.portlet.expando.model.ExpandoRow findByTableId_Last(
117                    long tableId,
118                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.expando.model.ExpandoRow> orderByComparator)
119                    throws com.liferay.portlet.expando.NoSuchRowException;
120    
121            /**
122            * Returns the last expando row in the ordered set where tableId = &#63;.
123            *
124            * @param tableId the table ID
125            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
126            * @return the last matching expando row, or <code>null</code> if a matching expando row could not be found
127            */
128            public com.liferay.portlet.expando.model.ExpandoRow fetchByTableId_Last(
129                    long tableId,
130                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.expando.model.ExpandoRow> orderByComparator);
131    
132            /**
133            * Returns the expando rows before and after the current expando row in the ordered set where tableId = &#63;.
134            *
135            * @param rowId the primary key of the current expando row
136            * @param tableId the table ID
137            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
138            * @return the previous, current, and next expando row
139            * @throws com.liferay.portlet.expando.NoSuchRowException if a expando row with the primary key could not be found
140            */
141            public com.liferay.portlet.expando.model.ExpandoRow[] findByTableId_PrevAndNext(
142                    long rowId, long tableId,
143                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.expando.model.ExpandoRow> orderByComparator)
144                    throws com.liferay.portlet.expando.NoSuchRowException;
145    
146            /**
147            * Removes all the expando rows where tableId = &#63; from the database.
148            *
149            * @param tableId the table ID
150            */
151            public void removeByTableId(long tableId);
152    
153            /**
154            * Returns the number of expando rows where tableId = &#63;.
155            *
156            * @param tableId the table ID
157            * @return the number of matching expando rows
158            */
159            public int countByTableId(long tableId);
160    
161            /**
162            * Returns all the expando rows where classPK = &#63;.
163            *
164            * @param classPK the class p k
165            * @return the matching expando rows
166            */
167            public java.util.List<com.liferay.portlet.expando.model.ExpandoRow> findByClassPK(
168                    long classPK);
169    
170            /**
171            * Returns a range of all the expando rows where classPK = &#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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.expando.model.impl.ExpandoRowModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
175            * </p>
176            *
177            * @param classPK the class p k
178            * @param start the lower bound of the range of expando rows
179            * @param end the upper bound of the range of expando rows (not inclusive)
180            * @return the range of matching expando rows
181            */
182            public java.util.List<com.liferay.portlet.expando.model.ExpandoRow> findByClassPK(
183                    long classPK, int start, int end);
184    
185            /**
186            * Returns an ordered range of all the expando rows where classPK = &#63;.
187            *
188            * <p>
189            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.expando.model.impl.ExpandoRowModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
190            * </p>
191            *
192            * @param classPK the class p k
193            * @param start the lower bound of the range of expando rows
194            * @param end the upper bound of the range of expando rows (not inclusive)
195            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
196            * @return the ordered range of matching expando rows
197            */
198            public java.util.List<com.liferay.portlet.expando.model.ExpandoRow> findByClassPK(
199                    long classPK, int start, int end,
200                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.expando.model.ExpandoRow> orderByComparator);
201    
202            /**
203            * Returns the first expando row in the ordered set where classPK = &#63;.
204            *
205            * @param classPK the class p k
206            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
207            * @return the first matching expando row
208            * @throws com.liferay.portlet.expando.NoSuchRowException if a matching expando row could not be found
209            */
210            public com.liferay.portlet.expando.model.ExpandoRow findByClassPK_First(
211                    long classPK,
212                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.expando.model.ExpandoRow> orderByComparator)
213                    throws com.liferay.portlet.expando.NoSuchRowException;
214    
215            /**
216            * Returns the first expando row in the ordered set where classPK = &#63;.
217            *
218            * @param classPK the class p k
219            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
220            * @return the first matching expando row, or <code>null</code> if a matching expando row could not be found
221            */
222            public com.liferay.portlet.expando.model.ExpandoRow fetchByClassPK_First(
223                    long classPK,
224                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.expando.model.ExpandoRow> orderByComparator);
225    
226            /**
227            * Returns the last expando row in the ordered set where classPK = &#63;.
228            *
229            * @param classPK the class p k
230            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
231            * @return the last matching expando row
232            * @throws com.liferay.portlet.expando.NoSuchRowException if a matching expando row could not be found
233            */
234            public com.liferay.portlet.expando.model.ExpandoRow findByClassPK_Last(
235                    long classPK,
236                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.expando.model.ExpandoRow> orderByComparator)
237                    throws com.liferay.portlet.expando.NoSuchRowException;
238    
239            /**
240            * Returns the last expando row in the ordered set where classPK = &#63;.
241            *
242            * @param classPK the class p k
243            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
244            * @return the last matching expando row, or <code>null</code> if a matching expando row could not be found
245            */
246            public com.liferay.portlet.expando.model.ExpandoRow fetchByClassPK_Last(
247                    long classPK,
248                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.expando.model.ExpandoRow> orderByComparator);
249    
250            /**
251            * Returns the expando rows before and after the current expando row in the ordered set where classPK = &#63;.
252            *
253            * @param rowId the primary key of the current expando row
254            * @param classPK the class p k
255            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
256            * @return the previous, current, and next expando row
257            * @throws com.liferay.portlet.expando.NoSuchRowException if a expando row with the primary key could not be found
258            */
259            public com.liferay.portlet.expando.model.ExpandoRow[] findByClassPK_PrevAndNext(
260                    long rowId, long classPK,
261                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.expando.model.ExpandoRow> orderByComparator)
262                    throws com.liferay.portlet.expando.NoSuchRowException;
263    
264            /**
265            * Removes all the expando rows where classPK = &#63; from the database.
266            *
267            * @param classPK the class p k
268            */
269            public void removeByClassPK(long classPK);
270    
271            /**
272            * Returns the number of expando rows where classPK = &#63;.
273            *
274            * @param classPK the class p k
275            * @return the number of matching expando rows
276            */
277            public int countByClassPK(long classPK);
278    
279            /**
280            * 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.
281            *
282            * @param tableId the table ID
283            * @param classPK the class p k
284            * @return the matching expando row
285            * @throws com.liferay.portlet.expando.NoSuchRowException if a matching expando row could not be found
286            */
287            public com.liferay.portlet.expando.model.ExpandoRow findByT_C(
288                    long tableId, long classPK)
289                    throws com.liferay.portlet.expando.NoSuchRowException;
290    
291            /**
292            * 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.
293            *
294            * @param tableId the table ID
295            * @param classPK the class p k
296            * @return the matching expando row, or <code>null</code> if a matching expando row could not be found
297            */
298            public com.liferay.portlet.expando.model.ExpandoRow fetchByT_C(
299                    long tableId, long classPK);
300    
301            /**
302            * 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.
303            *
304            * @param tableId the table ID
305            * @param classPK the class p k
306            * @param retrieveFromCache whether to use the finder cache
307            * @return the matching expando row, or <code>null</code> if a matching expando row could not be found
308            */
309            public com.liferay.portlet.expando.model.ExpandoRow fetchByT_C(
310                    long tableId, long classPK, boolean retrieveFromCache);
311    
312            /**
313            * Removes the expando row where tableId = &#63; and classPK = &#63; from the database.
314            *
315            * @param tableId the table ID
316            * @param classPK the class p k
317            * @return the expando row that was removed
318            */
319            public com.liferay.portlet.expando.model.ExpandoRow removeByT_C(
320                    long tableId, long classPK)
321                    throws com.liferay.portlet.expando.NoSuchRowException;
322    
323            /**
324            * Returns the number of expando rows where tableId = &#63; and classPK = &#63;.
325            *
326            * @param tableId the table ID
327            * @param classPK the class p k
328            * @return the number of matching expando rows
329            */
330            public int countByT_C(long tableId, long classPK);
331    
332            /**
333            * Caches the expando row in the entity cache if it is enabled.
334            *
335            * @param expandoRow the expando row
336            */
337            public void cacheResult(
338                    com.liferay.portlet.expando.model.ExpandoRow expandoRow);
339    
340            /**
341            * Caches the expando rows in the entity cache if it is enabled.
342            *
343            * @param expandoRows the expando rows
344            */
345            public void cacheResult(
346                    java.util.List<com.liferay.portlet.expando.model.ExpandoRow> expandoRows);
347    
348            /**
349            * Creates a new expando row with the primary key. Does not add the expando row to the database.
350            *
351            * @param rowId the primary key for the new expando row
352            * @return the new expando row
353            */
354            public com.liferay.portlet.expando.model.ExpandoRow create(long rowId);
355    
356            /**
357            * Removes the expando row with the primary key from the database. Also notifies the appropriate model listeners.
358            *
359            * @param rowId the primary key of the expando row
360            * @return the expando row that was removed
361            * @throws com.liferay.portlet.expando.NoSuchRowException if a expando row with the primary key could not be found
362            */
363            public com.liferay.portlet.expando.model.ExpandoRow remove(long rowId)
364                    throws com.liferay.portlet.expando.NoSuchRowException;
365    
366            public com.liferay.portlet.expando.model.ExpandoRow updateImpl(
367                    com.liferay.portlet.expando.model.ExpandoRow expandoRow);
368    
369            /**
370            * Returns the expando row with the primary key or throws a {@link com.liferay.portlet.expando.NoSuchRowException} if it could not be found.
371            *
372            * @param rowId the primary key of the expando row
373            * @return the expando row
374            * @throws com.liferay.portlet.expando.NoSuchRowException if a expando row with the primary key could not be found
375            */
376            public com.liferay.portlet.expando.model.ExpandoRow findByPrimaryKey(
377                    long rowId) throws com.liferay.portlet.expando.NoSuchRowException;
378    
379            /**
380            * Returns the expando row with the primary key or returns <code>null</code> if it could not be found.
381            *
382            * @param rowId the primary key of the expando row
383            * @return the expando row, or <code>null</code> if a expando row with the primary key could not be found
384            */
385            public com.liferay.portlet.expando.model.ExpandoRow fetchByPrimaryKey(
386                    long rowId);
387    
388            @Override
389            public java.util.Map<java.io.Serializable, com.liferay.portlet.expando.model.ExpandoRow> fetchByPrimaryKeys(
390                    java.util.Set<java.io.Serializable> primaryKeys);
391    
392            /**
393            * Returns all the expando rows.
394            *
395            * @return the expando rows
396            */
397            public java.util.List<com.liferay.portlet.expando.model.ExpandoRow> findAll();
398    
399            /**
400            * Returns a range of all the expando rows.
401            *
402            * <p>
403            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.expando.model.impl.ExpandoRowModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
404            * </p>
405            *
406            * @param start the lower bound of the range of expando rows
407            * @param end the upper bound of the range of expando rows (not inclusive)
408            * @return the range of expando rows
409            */
410            public java.util.List<com.liferay.portlet.expando.model.ExpandoRow> findAll(
411                    int start, int end);
412    
413            /**
414            * Returns an ordered range of all the expando rows.
415            *
416            * <p>
417            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.expando.model.impl.ExpandoRowModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
418            * </p>
419            *
420            * @param start the lower bound of the range of expando rows
421            * @param end the upper bound of the range of expando rows (not inclusive)
422            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
423            * @return the ordered range of expando rows
424            */
425            public java.util.List<com.liferay.portlet.expando.model.ExpandoRow> findAll(
426                    int start, int end,
427                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.expando.model.ExpandoRow> orderByComparator);
428    
429            /**
430            * Removes all the expando rows from the database.
431            */
432            public void removeAll();
433    
434            /**
435            * Returns the number of expando rows.
436            *
437            * @return the number of expando rows
438            */
439            public int countAll();
440    }