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