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