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.ExpandoColumn;
026    
027    import java.util.List;
028    
029    /**
030     * The persistence utility for the expando column service. This utility wraps {@link com.liferay.portlet.expando.service.persistence.impl.ExpandoColumnPersistenceImpl} 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 ExpandoColumnPersistence
038     * @see com.liferay.portlet.expando.service.persistence.impl.ExpandoColumnPersistenceImpl
039     * @generated
040     */
041    @ProviderType
042    public class ExpandoColumnUtil {
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(ExpandoColumn expandoColumn) {
060                    getPersistence().clearCache(expandoColumn);
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<ExpandoColumn> 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<ExpandoColumn> 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<ExpandoColumn> findWithDynamicQuery(
090                    DynamicQuery dynamicQuery, int start, int end,
091                    OrderByComparator<ExpandoColumn> 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 ExpandoColumn update(ExpandoColumn expandoColumn) {
101                    return getPersistence().update(expandoColumn);
102            }
103    
104            /**
105             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext)
106             */
107            public static ExpandoColumn update(ExpandoColumn expandoColumn,
108                    ServiceContext serviceContext) {
109                    return getPersistence().update(expandoColumn, serviceContext);
110            }
111    
112            /**
113            * Returns all the expando columns where tableId = &#63;.
114            *
115            * @param tableId the table ID
116            * @return the matching expando columns
117            */
118            public static List<ExpandoColumn> findByTableId(long tableId) {
119                    return getPersistence().findByTableId(tableId);
120            }
121    
122            /**
123            * Returns a range of all the expando columns 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 ExpandoColumnModelImpl}. 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 columns
131            * @param end the upper bound of the range of expando columns (not inclusive)
132            * @return the range of matching expando columns
133            */
134            public static List<ExpandoColumn> 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 columns 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 ExpandoColumnModelImpl}. 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 columns
148            * @param end the upper bound of the range of expando columns (not inclusive)
149            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
150            * @return the ordered range of matching expando columns
151            */
152            public static List<ExpandoColumn> findByTableId(long tableId, int start,
153                    int end, OrderByComparator<ExpandoColumn> orderByComparator) {
154                    return getPersistence()
155                                       .findByTableId(tableId, start, end, orderByComparator);
156            }
157    
158            /**
159            * Returns the first expando column in the ordered set where tableId = &#63;.
160            *
161            * @param tableId the table ID
162            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
163            * @return the first matching expando column
164            * @throws NoSuchColumnException if a matching expando column could not be found
165            */
166            public static ExpandoColumn findByTableId_First(long tableId,
167                    OrderByComparator<ExpandoColumn> orderByComparator)
168                    throws com.liferay.portlet.expando.NoSuchColumnException {
169                    return getPersistence().findByTableId_First(tableId, orderByComparator);
170            }
171    
172            /**
173            * Returns the first expando column in the ordered set where tableId = &#63;.
174            *
175            * @param tableId the table ID
176            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
177            * @return the first matching expando column, or <code>null</code> if a matching expando column could not be found
178            */
179            public static ExpandoColumn fetchByTableId_First(long tableId,
180                    OrderByComparator<ExpandoColumn> orderByComparator) {
181                    return getPersistence().fetchByTableId_First(tableId, orderByComparator);
182            }
183    
184            /**
185            * Returns the last expando column in the ordered set where tableId = &#63;.
186            *
187            * @param tableId the table ID
188            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
189            * @return the last matching expando column
190            * @throws NoSuchColumnException if a matching expando column could not be found
191            */
192            public static ExpandoColumn findByTableId_Last(long tableId,
193                    OrderByComparator<ExpandoColumn> orderByComparator)
194                    throws com.liferay.portlet.expando.NoSuchColumnException {
195                    return getPersistence().findByTableId_Last(tableId, orderByComparator);
196            }
197    
198            /**
199            * Returns the last expando column in the ordered set where tableId = &#63;.
200            *
201            * @param tableId the table ID
202            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
203            * @return the last matching expando column, or <code>null</code> if a matching expando column could not be found
204            */
205            public static ExpandoColumn fetchByTableId_Last(long tableId,
206                    OrderByComparator<ExpandoColumn> orderByComparator) {
207                    return getPersistence().fetchByTableId_Last(tableId, orderByComparator);
208            }
209    
210            /**
211            * Returns the expando columns before and after the current expando column in the ordered set where tableId = &#63;.
212            *
213            * @param columnId the primary key of the current expando column
214            * @param tableId the table ID
215            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
216            * @return the previous, current, and next expando column
217            * @throws NoSuchColumnException if a expando column with the primary key could not be found
218            */
219            public static ExpandoColumn[] findByTableId_PrevAndNext(long columnId,
220                    long tableId, OrderByComparator<ExpandoColumn> orderByComparator)
221                    throws com.liferay.portlet.expando.NoSuchColumnException {
222                    return getPersistence()
223                                       .findByTableId_PrevAndNext(columnId, tableId,
224                            orderByComparator);
225            }
226    
227            /**
228            * Returns all the expando columns that the user has permission to view where tableId = &#63;.
229            *
230            * @param tableId the table ID
231            * @return the matching expando columns that the user has permission to view
232            */
233            public static List<ExpandoColumn> filterFindByTableId(long tableId) {
234                    return getPersistence().filterFindByTableId(tableId);
235            }
236    
237            /**
238            * Returns a range of all the expando columns that the user has permission to view where tableId = &#63;.
239            *
240            * <p>
241            * 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 ExpandoColumnModelImpl}. 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.
242            * </p>
243            *
244            * @param tableId the table ID
245            * @param start the lower bound of the range of expando columns
246            * @param end the upper bound of the range of expando columns (not inclusive)
247            * @return the range of matching expando columns that the user has permission to view
248            */
249            public static List<ExpandoColumn> filterFindByTableId(long tableId,
250                    int start, int end) {
251                    return getPersistence().filterFindByTableId(tableId, start, end);
252            }
253    
254            /**
255            * Returns an ordered range of all the expando columns that the user has permissions to view where tableId = &#63;.
256            *
257            * <p>
258            * 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 ExpandoColumnModelImpl}. 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.
259            * </p>
260            *
261            * @param tableId the table ID
262            * @param start the lower bound of the range of expando columns
263            * @param end the upper bound of the range of expando columns (not inclusive)
264            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
265            * @return the ordered range of matching expando columns that the user has permission to view
266            */
267            public static List<ExpandoColumn> filterFindByTableId(long tableId,
268                    int start, int end, OrderByComparator<ExpandoColumn> orderByComparator) {
269                    return getPersistence()
270                                       .filterFindByTableId(tableId, start, end, orderByComparator);
271            }
272    
273            /**
274            * Returns the expando columns before and after the current expando column in the ordered set of expando columns that the user has permission to view where tableId = &#63;.
275            *
276            * @param columnId the primary key of the current expando column
277            * @param tableId the table ID
278            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
279            * @return the previous, current, and next expando column
280            * @throws NoSuchColumnException if a expando column with the primary key could not be found
281            */
282            public static ExpandoColumn[] filterFindByTableId_PrevAndNext(
283                    long columnId, long tableId,
284                    OrderByComparator<ExpandoColumn> orderByComparator)
285                    throws com.liferay.portlet.expando.NoSuchColumnException {
286                    return getPersistence()
287                                       .filterFindByTableId_PrevAndNext(columnId, tableId,
288                            orderByComparator);
289            }
290    
291            /**
292            * Removes all the expando columns where tableId = &#63; from the database.
293            *
294            * @param tableId the table ID
295            */
296            public static void removeByTableId(long tableId) {
297                    getPersistence().removeByTableId(tableId);
298            }
299    
300            /**
301            * Returns the number of expando columns where tableId = &#63;.
302            *
303            * @param tableId the table ID
304            * @return the number of matching expando columns
305            */
306            public static int countByTableId(long tableId) {
307                    return getPersistence().countByTableId(tableId);
308            }
309    
310            /**
311            * Returns the number of expando columns that the user has permission to view where tableId = &#63;.
312            *
313            * @param tableId the table ID
314            * @return the number of matching expando columns that the user has permission to view
315            */
316            public static int filterCountByTableId(long tableId) {
317                    return getPersistence().filterCountByTableId(tableId);
318            }
319    
320            /**
321            * Returns all the expando columns where tableId = &#63; and name = any &#63;.
322            *
323            * <p>
324            * 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 ExpandoColumnModelImpl}. 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.
325            * </p>
326            *
327            * @param tableId the table ID
328            * @param names the names
329            * @return the matching expando columns
330            */
331            public static List<ExpandoColumn> findByT_N(long tableId,
332                    java.lang.String[] names) {
333                    return getPersistence().findByT_N(tableId, names);
334            }
335    
336            /**
337            * Returns a range of all the expando columns where tableId = &#63; and name = any &#63;.
338            *
339            * <p>
340            * 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 ExpandoColumnModelImpl}. 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.
341            * </p>
342            *
343            * @param tableId the table ID
344            * @param names the names
345            * @param start the lower bound of the range of expando columns
346            * @param end the upper bound of the range of expando columns (not inclusive)
347            * @return the range of matching expando columns
348            */
349            public static List<ExpandoColumn> findByT_N(long tableId,
350                    java.lang.String[] names, int start, int end) {
351                    return getPersistence().findByT_N(tableId, names, start, end);
352            }
353    
354            /**
355            * Returns an ordered range of all the expando columns where tableId = &#63; and name = any &#63;.
356            *
357            * <p>
358            * 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 ExpandoColumnModelImpl}. 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.
359            * </p>
360            *
361            * @param tableId the table ID
362            * @param names the names
363            * @param start the lower bound of the range of expando columns
364            * @param end the upper bound of the range of expando columns (not inclusive)
365            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
366            * @return the ordered range of matching expando columns
367            */
368            public static List<ExpandoColumn> findByT_N(long tableId,
369                    java.lang.String[] names, int start, int end,
370                    OrderByComparator<ExpandoColumn> orderByComparator) {
371                    return getPersistence()
372                                       .findByT_N(tableId, names, start, end, orderByComparator);
373            }
374    
375            /**
376            * Returns the expando column where tableId = &#63; and name = &#63; or throws a {@link NoSuchColumnException} if it could not be found.
377            *
378            * @param tableId the table ID
379            * @param name the name
380            * @return the matching expando column
381            * @throws NoSuchColumnException if a matching expando column could not be found
382            */
383            public static ExpandoColumn findByT_N(long tableId, java.lang.String name)
384                    throws com.liferay.portlet.expando.NoSuchColumnException {
385                    return getPersistence().findByT_N(tableId, name);
386            }
387    
388            /**
389            * Returns the expando column where tableId = &#63; and name = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
390            *
391            * @param tableId the table ID
392            * @param name the name
393            * @return the matching expando column, or <code>null</code> if a matching expando column could not be found
394            */
395            public static ExpandoColumn fetchByT_N(long tableId, java.lang.String name) {
396                    return getPersistence().fetchByT_N(tableId, name);
397            }
398    
399            /**
400            * Returns the expando column where tableId = &#63; and name = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
401            *
402            * @param tableId the table ID
403            * @param name the name
404            * @param retrieveFromCache whether to use the finder cache
405            * @return the matching expando column, or <code>null</code> if a matching expando column could not be found
406            */
407            public static ExpandoColumn fetchByT_N(long tableId, java.lang.String name,
408                    boolean retrieveFromCache) {
409                    return getPersistence().fetchByT_N(tableId, name, retrieveFromCache);
410            }
411    
412            /**
413            * Removes the expando column where tableId = &#63; and name = &#63; from the database.
414            *
415            * @param tableId the table ID
416            * @param name the name
417            * @return the expando column that was removed
418            */
419            public static ExpandoColumn removeByT_N(long tableId, java.lang.String name)
420                    throws com.liferay.portlet.expando.NoSuchColumnException {
421                    return getPersistence().removeByT_N(tableId, name);
422            }
423    
424            /**
425            * Returns the number of expando columns where tableId = &#63; and name = &#63;.
426            *
427            * @param tableId the table ID
428            * @param name the name
429            * @return the number of matching expando columns
430            */
431            public static int countByT_N(long tableId, java.lang.String name) {
432                    return getPersistence().countByT_N(tableId, name);
433            }
434    
435            /**
436            * Returns the number of expando columns where tableId = &#63; and name = any &#63;.
437            *
438            * @param tableId the table ID
439            * @param names the names
440            * @return the number of matching expando columns
441            */
442            public static int countByT_N(long tableId, java.lang.String[] names) {
443                    return getPersistence().countByT_N(tableId, names);
444            }
445    
446            /**
447            * Returns the number of expando columns that the user has permission to view where tableId = &#63; and name = &#63;.
448            *
449            * @param tableId the table ID
450            * @param name the name
451            * @return the number of matching expando columns that the user has permission to view
452            */
453            public static int filterCountByT_N(long tableId, java.lang.String name) {
454                    return getPersistence().filterCountByT_N(tableId, name);
455            }
456    
457            /**
458            * Returns the number of expando columns that the user has permission to view where tableId = &#63; and name = any &#63;.
459            *
460            * @param tableId the table ID
461            * @param names the names
462            * @return the number of matching expando columns that the user has permission to view
463            */
464            public static int filterCountByT_N(long tableId, java.lang.String[] names) {
465                    return getPersistence().filterCountByT_N(tableId, names);
466            }
467    
468            /**
469            * Caches the expando column in the entity cache if it is enabled.
470            *
471            * @param expandoColumn the expando column
472            */
473            public static void cacheResult(ExpandoColumn expandoColumn) {
474                    getPersistence().cacheResult(expandoColumn);
475            }
476    
477            /**
478            * Caches the expando columns in the entity cache if it is enabled.
479            *
480            * @param expandoColumns the expando columns
481            */
482            public static void cacheResult(List<ExpandoColumn> expandoColumns) {
483                    getPersistence().cacheResult(expandoColumns);
484            }
485    
486            /**
487            * Creates a new expando column with the primary key. Does not add the expando column to the database.
488            *
489            * @param columnId the primary key for the new expando column
490            * @return the new expando column
491            */
492            public static ExpandoColumn create(long columnId) {
493                    return getPersistence().create(columnId);
494            }
495    
496            /**
497            * Removes the expando column with the primary key from the database. Also notifies the appropriate model listeners.
498            *
499            * @param columnId the primary key of the expando column
500            * @return the expando column that was removed
501            * @throws NoSuchColumnException if a expando column with the primary key could not be found
502            */
503            public static ExpandoColumn remove(long columnId)
504                    throws com.liferay.portlet.expando.NoSuchColumnException {
505                    return getPersistence().remove(columnId);
506            }
507    
508            public static ExpandoColumn updateImpl(ExpandoColumn expandoColumn) {
509                    return getPersistence().updateImpl(expandoColumn);
510            }
511    
512            /**
513            * Returns the expando column with the primary key or throws a {@link NoSuchColumnException} if it could not be found.
514            *
515            * @param columnId the primary key of the expando column
516            * @return the expando column
517            * @throws NoSuchColumnException if a expando column with the primary key could not be found
518            */
519            public static ExpandoColumn findByPrimaryKey(long columnId)
520                    throws com.liferay.portlet.expando.NoSuchColumnException {
521                    return getPersistence().findByPrimaryKey(columnId);
522            }
523    
524            /**
525            * Returns the expando column with the primary key or returns <code>null</code> if it could not be found.
526            *
527            * @param columnId the primary key of the expando column
528            * @return the expando column, or <code>null</code> if a expando column with the primary key could not be found
529            */
530            public static ExpandoColumn fetchByPrimaryKey(long columnId) {
531                    return getPersistence().fetchByPrimaryKey(columnId);
532            }
533    
534            public static java.util.Map<java.io.Serializable, ExpandoColumn> fetchByPrimaryKeys(
535                    java.util.Set<java.io.Serializable> primaryKeys) {
536                    return getPersistence().fetchByPrimaryKeys(primaryKeys);
537            }
538    
539            /**
540            * Returns all the expando columns.
541            *
542            * @return the expando columns
543            */
544            public static List<ExpandoColumn> findAll() {
545                    return getPersistence().findAll();
546            }
547    
548            /**
549            * Returns a range of all the expando columns.
550            *
551            * <p>
552            * 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 ExpandoColumnModelImpl}. 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.
553            * </p>
554            *
555            * @param start the lower bound of the range of expando columns
556            * @param end the upper bound of the range of expando columns (not inclusive)
557            * @return the range of expando columns
558            */
559            public static List<ExpandoColumn> findAll(int start, int end) {
560                    return getPersistence().findAll(start, end);
561            }
562    
563            /**
564            * Returns an ordered range of all the expando columns.
565            *
566            * <p>
567            * 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 ExpandoColumnModelImpl}. 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.
568            * </p>
569            *
570            * @param start the lower bound of the range of expando columns
571            * @param end the upper bound of the range of expando columns (not inclusive)
572            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
573            * @return the ordered range of expando columns
574            */
575            public static List<ExpandoColumn> findAll(int start, int end,
576                    OrderByComparator<ExpandoColumn> orderByComparator) {
577                    return getPersistence().findAll(start, end, orderByComparator);
578            }
579    
580            /**
581            * Removes all the expando columns from the database.
582            */
583            public static void removeAll() {
584                    getPersistence().removeAll();
585            }
586    
587            /**
588            * Returns the number of expando columns.
589            *
590            * @return the number of expando columns
591            */
592            public static int countAll() {
593                    return getPersistence().countAll();
594            }
595    
596            public static ExpandoColumnPersistence getPersistence() {
597                    if (_persistence == null) {
598                            _persistence = (ExpandoColumnPersistence)PortalBeanLocatorUtil.locate(ExpandoColumnPersistence.class.getName());
599    
600                            ReferenceRegistry.registerReference(ExpandoColumnUtil.class,
601                                    "_persistence");
602                    }
603    
604                    return _persistence;
605            }
606    
607            /**
608             * @deprecated As of 6.2.0
609             */
610            @Deprecated
611            public void setPersistence(ExpandoColumnPersistence persistence) {
612            }
613    
614            private static ExpandoColumnPersistence _persistence;
615    }