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.kernel.bean.PortalBeanLocatorUtil;
020    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
021    import com.liferay.portal.kernel.util.OrderByComparator;
022    import com.liferay.portal.kernel.util.ReferenceRegistry;
023    import com.liferay.portal.service.ServiceContext;
024    
025    import com.liferay.portlet.expando.model.ExpandoRow;
026    
027    import java.util.List;
028    
029    /**
030     * The persistence utility for the expando row service. This utility wraps {@link com.liferay.portlet.expando.service.persistence.impl.ExpandoRowPersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class.
031     *
032     * <p>
033     * Caching information and settings can be found in <code>portal.properties</code>
034     * </p>
035     *
036     * @author Brian Wing Shun Chan
037     * @see ExpandoRowPersistence
038     * @see com.liferay.portlet.expando.service.persistence.impl.ExpandoRowPersistenceImpl
039     * @generated
040     */
041    @ProviderType
042    public class ExpandoRowUtil {
043            /*
044             * NOTE FOR DEVELOPERS:
045             *
046             * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class.
047             */
048    
049            /**
050             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
051             */
052            public static void clearCache() {
053                    getPersistence().clearCache();
054            }
055    
056            /**
057             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
058             */
059            public static void clearCache(ExpandoRow expandoRow) {
060                    getPersistence().clearCache(expandoRow);
061            }
062    
063            /**
064             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
065             */
066            public static long countWithDynamicQuery(DynamicQuery dynamicQuery) {
067                    return getPersistence().countWithDynamicQuery(dynamicQuery);
068            }
069    
070            /**
071             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
072             */
073            public static List<ExpandoRow> findWithDynamicQuery(
074                    DynamicQuery dynamicQuery) {
075                    return getPersistence().findWithDynamicQuery(dynamicQuery);
076            }
077    
078            /**
079             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
080             */
081            public static List<ExpandoRow> findWithDynamicQuery(
082                    DynamicQuery dynamicQuery, int start, int end) {
083                    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
084            }
085    
086            /**
087             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
088             */
089            public static List<ExpandoRow> findWithDynamicQuery(
090                    DynamicQuery dynamicQuery, int start, int end,
091                    OrderByComparator<ExpandoRow> orderByComparator) {
092                    return getPersistence()
093                                       .findWithDynamicQuery(dynamicQuery, start, end,
094                            orderByComparator);
095            }
096    
097            /**
098             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel)
099             */
100            public static ExpandoRow update(ExpandoRow expandoRow) {
101                    return getPersistence().update(expandoRow);
102            }
103    
104            /**
105             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext)
106             */
107            public static ExpandoRow update(ExpandoRow expandoRow,
108                    ServiceContext serviceContext) {
109                    return getPersistence().update(expandoRow, serviceContext);
110            }
111    
112            /**
113            * Returns all the expando rows where tableId = &#63;.
114            *
115            * @param tableId the table ID
116            * @return the matching expando rows
117            */
118            public static List<ExpandoRow> findByTableId(long tableId) {
119                    return getPersistence().findByTableId(tableId);
120            }
121    
122            /**
123            * Returns a range of all the expando rows where tableId = &#63;.
124            *
125            * <p>
126            * 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.
127            * </p>
128            *
129            * @param tableId the table ID
130            * @param start the lower bound of the range of expando rows
131            * @param end the upper bound of the range of expando rows (not inclusive)
132            * @return the range of matching expando rows
133            */
134            public static List<ExpandoRow> findByTableId(long tableId, int start,
135                    int end) {
136                    return getPersistence().findByTableId(tableId, start, end);
137            }
138    
139            /**
140            * Returns an ordered range of all the expando rows where tableId = &#63;.
141            *
142            * <p>
143            * 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.
144            * </p>
145            *
146            * @param tableId the table ID
147            * @param start the lower bound of the range of expando rows
148            * @param end the upper bound of the range of expando rows (not inclusive)
149            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
150            * @return the ordered range of matching expando rows
151            */
152            public static List<ExpandoRow> findByTableId(long tableId, int start,
153                    int end, OrderByComparator<ExpandoRow> orderByComparator) {
154                    return getPersistence()
155                                       .findByTableId(tableId, start, end, orderByComparator);
156            }
157    
158            /**
159            * Returns an ordered range of all the expando rows where tableId = &#63;.
160            *
161            * <p>
162            * 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.
163            * </p>
164            *
165            * @param tableId the table ID
166            * @param start the lower bound of the range of expando rows
167            * @param end the upper bound of the range of expando rows (not inclusive)
168            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
169            * @param retrieveFromCache whether to retrieve from the finder cache
170            * @return the ordered range of matching expando rows
171            */
172            public static List<ExpandoRow> findByTableId(long tableId, int start,
173                    int end, OrderByComparator<ExpandoRow> orderByComparator,
174                    boolean retrieveFromCache) {
175                    return getPersistence()
176                                       .findByTableId(tableId, start, end, orderByComparator,
177                            retrieveFromCache);
178            }
179    
180            /**
181            * Returns the first expando row in the ordered set where tableId = &#63;.
182            *
183            * @param tableId the table ID
184            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
185            * @return the first matching expando row
186            * @throws NoSuchRowException if a matching expando row could not be found
187            */
188            public static ExpandoRow findByTableId_First(long tableId,
189                    OrderByComparator<ExpandoRow> orderByComparator)
190                    throws com.liferay.portlet.expando.exception.NoSuchRowException {
191                    return getPersistence().findByTableId_First(tableId, orderByComparator);
192            }
193    
194            /**
195            * Returns the first expando row in the ordered set where tableId = &#63;.
196            *
197            * @param tableId the table ID
198            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
199            * @return the first matching expando row, or <code>null</code> if a matching expando row could not be found
200            */
201            public static ExpandoRow fetchByTableId_First(long tableId,
202                    OrderByComparator<ExpandoRow> orderByComparator) {
203                    return getPersistence().fetchByTableId_First(tableId, orderByComparator);
204            }
205    
206            /**
207            * Returns the last expando row in the ordered set where tableId = &#63;.
208            *
209            * @param tableId the table ID
210            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
211            * @return the last matching expando row
212            * @throws NoSuchRowException if a matching expando row could not be found
213            */
214            public static ExpandoRow findByTableId_Last(long tableId,
215                    OrderByComparator<ExpandoRow> orderByComparator)
216                    throws com.liferay.portlet.expando.exception.NoSuchRowException {
217                    return getPersistence().findByTableId_Last(tableId, orderByComparator);
218            }
219    
220            /**
221            * Returns the last expando row in the ordered set where tableId = &#63;.
222            *
223            * @param tableId the table ID
224            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
225            * @return the last matching expando row, or <code>null</code> if a matching expando row could not be found
226            */
227            public static ExpandoRow fetchByTableId_Last(long tableId,
228                    OrderByComparator<ExpandoRow> orderByComparator) {
229                    return getPersistence().fetchByTableId_Last(tableId, orderByComparator);
230            }
231    
232            /**
233            * Returns the expando rows before and after the current expando row in the ordered set where tableId = &#63;.
234            *
235            * @param rowId the primary key of the current expando row
236            * @param tableId the table ID
237            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
238            * @return the previous, current, and next expando row
239            * @throws NoSuchRowException if a expando row with the primary key could not be found
240            */
241            public static ExpandoRow[] findByTableId_PrevAndNext(long rowId,
242                    long tableId, OrderByComparator<ExpandoRow> orderByComparator)
243                    throws com.liferay.portlet.expando.exception.NoSuchRowException {
244                    return getPersistence()
245                                       .findByTableId_PrevAndNext(rowId, tableId, orderByComparator);
246            }
247    
248            /**
249            * Removes all the expando rows where tableId = &#63; from the database.
250            *
251            * @param tableId the table ID
252            */
253            public static void removeByTableId(long tableId) {
254                    getPersistence().removeByTableId(tableId);
255            }
256    
257            /**
258            * Returns the number of expando rows where tableId = &#63;.
259            *
260            * @param tableId the table ID
261            * @return the number of matching expando rows
262            */
263            public static int countByTableId(long tableId) {
264                    return getPersistence().countByTableId(tableId);
265            }
266    
267            /**
268            * Returns all the expando rows where classPK = &#63;.
269            *
270            * @param classPK the class p k
271            * @return the matching expando rows
272            */
273            public static List<ExpandoRow> findByClassPK(long classPK) {
274                    return getPersistence().findByClassPK(classPK);
275            }
276    
277            /**
278            * Returns a range of all the expando rows where classPK = &#63;.
279            *
280            * <p>
281            * 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.
282            * </p>
283            *
284            * @param classPK the class p k
285            * @param start the lower bound of the range of expando rows
286            * @param end the upper bound of the range of expando rows (not inclusive)
287            * @return the range of matching expando rows
288            */
289            public static List<ExpandoRow> findByClassPK(long classPK, int start,
290                    int end) {
291                    return getPersistence().findByClassPK(classPK, start, end);
292            }
293    
294            /**
295            * Returns an ordered range of all the expando rows where classPK = &#63;.
296            *
297            * <p>
298            * 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.
299            * </p>
300            *
301            * @param classPK the class p k
302            * @param start the lower bound of the range of expando rows
303            * @param end the upper bound of the range of expando rows (not inclusive)
304            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
305            * @return the ordered range of matching expando rows
306            */
307            public static List<ExpandoRow> findByClassPK(long classPK, int start,
308                    int end, OrderByComparator<ExpandoRow> orderByComparator) {
309                    return getPersistence()
310                                       .findByClassPK(classPK, start, end, orderByComparator);
311            }
312    
313            /**
314            * Returns an ordered range of all the expando rows where classPK = &#63;.
315            *
316            * <p>
317            * 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.
318            * </p>
319            *
320            * @param classPK the class p k
321            * @param start the lower bound of the range of expando rows
322            * @param end the upper bound of the range of expando rows (not inclusive)
323            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
324            * @param retrieveFromCache whether to retrieve from the finder cache
325            * @return the ordered range of matching expando rows
326            */
327            public static List<ExpandoRow> findByClassPK(long classPK, int start,
328                    int end, OrderByComparator<ExpandoRow> orderByComparator,
329                    boolean retrieveFromCache) {
330                    return getPersistence()
331                                       .findByClassPK(classPK, start, end, orderByComparator,
332                            retrieveFromCache);
333            }
334    
335            /**
336            * Returns the first expando row in the ordered set where classPK = &#63;.
337            *
338            * @param classPK the class p k
339            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
340            * @return the first matching expando row
341            * @throws NoSuchRowException if a matching expando row could not be found
342            */
343            public static ExpandoRow findByClassPK_First(long classPK,
344                    OrderByComparator<ExpandoRow> orderByComparator)
345                    throws com.liferay.portlet.expando.exception.NoSuchRowException {
346                    return getPersistence().findByClassPK_First(classPK, orderByComparator);
347            }
348    
349            /**
350            * Returns the first expando row in the ordered set where classPK = &#63;.
351            *
352            * @param classPK the class p k
353            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
354            * @return the first matching expando row, or <code>null</code> if a matching expando row could not be found
355            */
356            public static ExpandoRow fetchByClassPK_First(long classPK,
357                    OrderByComparator<ExpandoRow> orderByComparator) {
358                    return getPersistence().fetchByClassPK_First(classPK, orderByComparator);
359            }
360    
361            /**
362            * Returns the last expando row in the ordered set where classPK = &#63;.
363            *
364            * @param classPK the class p k
365            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
366            * @return the last matching expando row
367            * @throws NoSuchRowException if a matching expando row could not be found
368            */
369            public static ExpandoRow findByClassPK_Last(long classPK,
370                    OrderByComparator<ExpandoRow> orderByComparator)
371                    throws com.liferay.portlet.expando.exception.NoSuchRowException {
372                    return getPersistence().findByClassPK_Last(classPK, orderByComparator);
373            }
374    
375            /**
376            * Returns the last expando row in the ordered set where classPK = &#63;.
377            *
378            * @param classPK the class p k
379            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
380            * @return the last matching expando row, or <code>null</code> if a matching expando row could not be found
381            */
382            public static ExpandoRow fetchByClassPK_Last(long classPK,
383                    OrderByComparator<ExpandoRow> orderByComparator) {
384                    return getPersistence().fetchByClassPK_Last(classPK, orderByComparator);
385            }
386    
387            /**
388            * Returns the expando rows before and after the current expando row in the ordered set where classPK = &#63;.
389            *
390            * @param rowId the primary key of the current expando row
391            * @param classPK the class p k
392            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
393            * @return the previous, current, and next expando row
394            * @throws NoSuchRowException if a expando row with the primary key could not be found
395            */
396            public static ExpandoRow[] findByClassPK_PrevAndNext(long rowId,
397                    long classPK, OrderByComparator<ExpandoRow> orderByComparator)
398                    throws com.liferay.portlet.expando.exception.NoSuchRowException {
399                    return getPersistence()
400                                       .findByClassPK_PrevAndNext(rowId, classPK, orderByComparator);
401            }
402    
403            /**
404            * Removes all the expando rows where classPK = &#63; from the database.
405            *
406            * @param classPK the class p k
407            */
408            public static void removeByClassPK(long classPK) {
409                    getPersistence().removeByClassPK(classPK);
410            }
411    
412            /**
413            * Returns the number of expando rows where classPK = &#63;.
414            *
415            * @param classPK the class p k
416            * @return the number of matching expando rows
417            */
418            public static int countByClassPK(long classPK) {
419                    return getPersistence().countByClassPK(classPK);
420            }
421    
422            /**
423            * Returns the expando row where tableId = &#63; and classPK = &#63; or throws a {@link NoSuchRowException} if it could not be found.
424            *
425            * @param tableId the table ID
426            * @param classPK the class p k
427            * @return the matching expando row
428            * @throws NoSuchRowException if a matching expando row could not be found
429            */
430            public static ExpandoRow findByT_C(long tableId, long classPK)
431                    throws com.liferay.portlet.expando.exception.NoSuchRowException {
432                    return getPersistence().findByT_C(tableId, classPK);
433            }
434    
435            /**
436            * 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.
437            *
438            * @param tableId the table ID
439            * @param classPK the class p k
440            * @return the matching expando row, or <code>null</code> if a matching expando row could not be found
441            */
442            public static ExpandoRow fetchByT_C(long tableId, long classPK) {
443                    return getPersistence().fetchByT_C(tableId, classPK);
444            }
445    
446            /**
447            * 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.
448            *
449            * @param tableId the table ID
450            * @param classPK the class p k
451            * @param retrieveFromCache whether to retrieve from the finder cache
452            * @return the matching expando row, or <code>null</code> if a matching expando row could not be found
453            */
454            public static ExpandoRow fetchByT_C(long tableId, long classPK,
455                    boolean retrieveFromCache) {
456                    return getPersistence().fetchByT_C(tableId, classPK, retrieveFromCache);
457            }
458    
459            /**
460            * Removes the expando row where tableId = &#63; and classPK = &#63; from the database.
461            *
462            * @param tableId the table ID
463            * @param classPK the class p k
464            * @return the expando row that was removed
465            */
466            public static ExpandoRow removeByT_C(long tableId, long classPK)
467                    throws com.liferay.portlet.expando.exception.NoSuchRowException {
468                    return getPersistence().removeByT_C(tableId, classPK);
469            }
470    
471            /**
472            * Returns the number of expando rows where tableId = &#63; and classPK = &#63;.
473            *
474            * @param tableId the table ID
475            * @param classPK the class p k
476            * @return the number of matching expando rows
477            */
478            public static int countByT_C(long tableId, long classPK) {
479                    return getPersistence().countByT_C(tableId, classPK);
480            }
481    
482            /**
483            * Caches the expando row in the entity cache if it is enabled.
484            *
485            * @param expandoRow the expando row
486            */
487            public static void cacheResult(ExpandoRow expandoRow) {
488                    getPersistence().cacheResult(expandoRow);
489            }
490    
491            /**
492            * Caches the expando rows in the entity cache if it is enabled.
493            *
494            * @param expandoRows the expando rows
495            */
496            public static void cacheResult(List<ExpandoRow> expandoRows) {
497                    getPersistence().cacheResult(expandoRows);
498            }
499    
500            /**
501            * Creates a new expando row with the primary key. Does not add the expando row to the database.
502            *
503            * @param rowId the primary key for the new expando row
504            * @return the new expando row
505            */
506            public static ExpandoRow create(long rowId) {
507                    return getPersistence().create(rowId);
508            }
509    
510            /**
511            * Removes the expando row with the primary key from the database. Also notifies the appropriate model listeners.
512            *
513            * @param rowId the primary key of the expando row
514            * @return the expando row that was removed
515            * @throws NoSuchRowException if a expando row with the primary key could not be found
516            */
517            public static ExpandoRow remove(long rowId)
518                    throws com.liferay.portlet.expando.exception.NoSuchRowException {
519                    return getPersistence().remove(rowId);
520            }
521    
522            public static ExpandoRow updateImpl(ExpandoRow expandoRow) {
523                    return getPersistence().updateImpl(expandoRow);
524            }
525    
526            /**
527            * Returns the expando row with the primary key or throws a {@link NoSuchRowException} if it could not be found.
528            *
529            * @param rowId the primary key of the expando row
530            * @return the expando row
531            * @throws NoSuchRowException if a expando row with the primary key could not be found
532            */
533            public static ExpandoRow findByPrimaryKey(long rowId)
534                    throws com.liferay.portlet.expando.exception.NoSuchRowException {
535                    return getPersistence().findByPrimaryKey(rowId);
536            }
537    
538            /**
539            * Returns the expando row with the primary key or returns <code>null</code> if it could not be found.
540            *
541            * @param rowId the primary key of the expando row
542            * @return the expando row, or <code>null</code> if a expando row with the primary key could not be found
543            */
544            public static ExpandoRow fetchByPrimaryKey(long rowId) {
545                    return getPersistence().fetchByPrimaryKey(rowId);
546            }
547    
548            public static java.util.Map<java.io.Serializable, ExpandoRow> fetchByPrimaryKeys(
549                    java.util.Set<java.io.Serializable> primaryKeys) {
550                    return getPersistence().fetchByPrimaryKeys(primaryKeys);
551            }
552    
553            /**
554            * Returns all the expando rows.
555            *
556            * @return the expando rows
557            */
558            public static List<ExpandoRow> findAll() {
559                    return getPersistence().findAll();
560            }
561    
562            /**
563            * Returns a range of all the expando rows.
564            *
565            * <p>
566            * 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.
567            * </p>
568            *
569            * @param start the lower bound of the range of expando rows
570            * @param end the upper bound of the range of expando rows (not inclusive)
571            * @return the range of expando rows
572            */
573            public static List<ExpandoRow> findAll(int start, int end) {
574                    return getPersistence().findAll(start, end);
575            }
576    
577            /**
578            * Returns an ordered range of all the expando rows.
579            *
580            * <p>
581            * 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.
582            * </p>
583            *
584            * @param start the lower bound of the range of expando rows
585            * @param end the upper bound of the range of expando rows (not inclusive)
586            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
587            * @return the ordered range of expando rows
588            */
589            public static List<ExpandoRow> findAll(int start, int end,
590                    OrderByComparator<ExpandoRow> orderByComparator) {
591                    return getPersistence().findAll(start, end, orderByComparator);
592            }
593    
594            /**
595            * Returns an ordered range of all the expando rows.
596            *
597            * <p>
598            * 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.
599            * </p>
600            *
601            * @param start the lower bound of the range of expando rows
602            * @param end the upper bound of the range of expando rows (not inclusive)
603            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
604            * @param retrieveFromCache whether to retrieve from the finder cache
605            * @return the ordered range of expando rows
606            */
607            public static List<ExpandoRow> findAll(int start, int end,
608                    OrderByComparator<ExpandoRow> orderByComparator,
609                    boolean retrieveFromCache) {
610                    return getPersistence()
611                                       .findAll(start, end, orderByComparator, retrieveFromCache);
612            }
613    
614            /**
615            * Removes all the expando rows from the database.
616            */
617            public static void removeAll() {
618                    getPersistence().removeAll();
619            }
620    
621            /**
622            * Returns the number of expando rows.
623            *
624            * @return the number of expando rows
625            */
626            public static int countAll() {
627                    return getPersistence().countAll();
628            }
629    
630            public static java.util.Set<java.lang.String> getBadColumnNames() {
631                    return getPersistence().getBadColumnNames();
632            }
633    
634            public static ExpandoRowPersistence getPersistence() {
635                    if (_persistence == null) {
636                            _persistence = (ExpandoRowPersistence)PortalBeanLocatorUtil.locate(ExpandoRowPersistence.class.getName());
637    
638                            ReferenceRegistry.registerReference(ExpandoRowUtil.class,
639                                    "_persistence");
640                    }
641    
642                    return _persistence;
643            }
644    
645            private static ExpandoRowPersistence _persistence;
646    }