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