001    /**
002     * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
013     */
014    
015    package com.liferay.portlet.expando.service.persistence;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
019    import com.liferay.portal.kernel.exception.SystemException;
020    import com.liferay.portal.kernel.util.OrderByComparator;
021    import com.liferay.portal.kernel.util.ReferenceRegistry;
022    import com.liferay.portal.service.ServiceContext;
023    
024    import com.liferay.portlet.expando.model.ExpandoColumn;
025    
026    import java.util.List;
027    
028    /**
029     * The persistence utility for the expando column service. This utility wraps {@link 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.
030     *
031     * <p>
032     * Caching information and settings can be found in <code>portal.properties</code>
033     * </p>
034     *
035     * @author Brian Wing Shun Chan
036     * @see ExpandoColumnPersistence
037     * @see ExpandoColumnPersistenceImpl
038     * @generated
039     */
040    public class ExpandoColumnUtil {
041            /*
042             * NOTE FOR DEVELOPERS:
043             *
044             * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class.
045             */
046    
047            /**
048             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
049             */
050            public static void clearCache() {
051                    getPersistence().clearCache();
052            }
053    
054            /**
055             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
056             */
057            public static void clearCache(ExpandoColumn expandoColumn) {
058                    getPersistence().clearCache(expandoColumn);
059            }
060    
061            /**
062             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
063             */
064            public long countWithDynamicQuery(DynamicQuery dynamicQuery)
065                    throws SystemException {
066                    return getPersistence().countWithDynamicQuery(dynamicQuery);
067            }
068    
069            /**
070             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
071             */
072            public static List<ExpandoColumn> findWithDynamicQuery(
073                    DynamicQuery dynamicQuery) throws SystemException {
074                    return getPersistence().findWithDynamicQuery(dynamicQuery);
075            }
076    
077            /**
078             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
079             */
080            public static List<ExpandoColumn> findWithDynamicQuery(
081                    DynamicQuery dynamicQuery, int start, int end)
082                    throws SystemException {
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 orderByComparator) throws SystemException {
092                    return getPersistence()
093                                       .findWithDynamicQuery(dynamicQuery, start, end,
094                            orderByComparator);
095            }
096    
097            /**
098             * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
099             */
100            public static ExpandoColumn remove(ExpandoColumn expandoColumn)
101                    throws SystemException {
102                    return getPersistence().remove(expandoColumn);
103            }
104    
105            /**
106             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
107             */
108            public static ExpandoColumn update(ExpandoColumn expandoColumn,
109                    boolean merge) throws SystemException {
110                    return getPersistence().update(expandoColumn, merge);
111            }
112    
113            /**
114             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
115             */
116            public static ExpandoColumn update(ExpandoColumn expandoColumn,
117                    boolean merge, ServiceContext serviceContext) throws SystemException {
118                    return getPersistence().update(expandoColumn, merge, serviceContext);
119            }
120    
121            /**
122            * Caches the expando column in the entity cache if it is enabled.
123            *
124            * @param expandoColumn the expando column to cache
125            */
126            public static void cacheResult(
127                    com.liferay.portlet.expando.model.ExpandoColumn expandoColumn) {
128                    getPersistence().cacheResult(expandoColumn);
129            }
130    
131            /**
132            * Caches the expando columns in the entity cache if it is enabled.
133            *
134            * @param expandoColumns the expando columns to cache
135            */
136            public static void cacheResult(
137                    java.util.List<com.liferay.portlet.expando.model.ExpandoColumn> expandoColumns) {
138                    getPersistence().cacheResult(expandoColumns);
139            }
140    
141            /**
142            * Creates a new expando column with the primary key. Does not add the expando column to the database.
143            *
144            * @param columnId the primary key for the new expando column
145            * @return the new expando column
146            */
147            public static com.liferay.portlet.expando.model.ExpandoColumn create(
148                    long columnId) {
149                    return getPersistence().create(columnId);
150            }
151    
152            /**
153            * Removes the expando column with the primary key from the database. Also notifies the appropriate model listeners.
154            *
155            * @param columnId the primary key of the expando column to remove
156            * @return the expando column that was removed
157            * @throws com.liferay.portlet.expando.NoSuchColumnException if a expando column with the primary key could not be found
158            * @throws SystemException if a system exception occurred
159            */
160            public static com.liferay.portlet.expando.model.ExpandoColumn remove(
161                    long columnId)
162                    throws com.liferay.portal.kernel.exception.SystemException,
163                            com.liferay.portlet.expando.NoSuchColumnException {
164                    return getPersistence().remove(columnId);
165            }
166    
167            public static com.liferay.portlet.expando.model.ExpandoColumn updateImpl(
168                    com.liferay.portlet.expando.model.ExpandoColumn expandoColumn,
169                    boolean merge)
170                    throws com.liferay.portal.kernel.exception.SystemException {
171                    return getPersistence().updateImpl(expandoColumn, merge);
172            }
173    
174            /**
175            * Finds the expando column with the primary key or throws a {@link com.liferay.portlet.expando.NoSuchColumnException} if it could not be found.
176            *
177            * @param columnId the primary key of the expando column to find
178            * @return the expando column
179            * @throws com.liferay.portlet.expando.NoSuchColumnException if a expando column with the primary key could not be found
180            * @throws SystemException if a system exception occurred
181            */
182            public static com.liferay.portlet.expando.model.ExpandoColumn findByPrimaryKey(
183                    long columnId)
184                    throws com.liferay.portal.kernel.exception.SystemException,
185                            com.liferay.portlet.expando.NoSuchColumnException {
186                    return getPersistence().findByPrimaryKey(columnId);
187            }
188    
189            /**
190            * Finds the expando column with the primary key or returns <code>null</code> if it could not be found.
191            *
192            * @param columnId the primary key of the expando column to find
193            * @return the expando column, or <code>null</code> if a expando column with the primary key could not be found
194            * @throws SystemException if a system exception occurred
195            */
196            public static com.liferay.portlet.expando.model.ExpandoColumn fetchByPrimaryKey(
197                    long columnId)
198                    throws com.liferay.portal.kernel.exception.SystemException {
199                    return getPersistence().fetchByPrimaryKey(columnId);
200            }
201    
202            /**
203            * Finds all the expando columns where tableId = &#63;.
204            *
205            * @param tableId the table ID to search with
206            * @return the matching expando columns
207            * @throws SystemException if a system exception occurred
208            */
209            public static java.util.List<com.liferay.portlet.expando.model.ExpandoColumn> findByTableId(
210                    long tableId)
211                    throws com.liferay.portal.kernel.exception.SystemException {
212                    return getPersistence().findByTableId(tableId);
213            }
214    
215            /**
216            * Finds a range of all the expando columns where tableId = &#63;.
217            *
218            * <p>
219            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
220            * </p>
221            *
222            * @param tableId the table ID to search with
223            * @param start the lower bound of the range of expando columns to return
224            * @param end the upper bound of the range of expando columns to return (not inclusive)
225            * @return the range of matching expando columns
226            * @throws SystemException if a system exception occurred
227            */
228            public static java.util.List<com.liferay.portlet.expando.model.ExpandoColumn> findByTableId(
229                    long tableId, int start, int end)
230                    throws com.liferay.portal.kernel.exception.SystemException {
231                    return getPersistence().findByTableId(tableId, start, end);
232            }
233    
234            /**
235            * Finds an ordered range of all the expando columns where tableId = &#63;.
236            *
237            * <p>
238            * 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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
239            * </p>
240            *
241            * @param tableId the table ID to search with
242            * @param start the lower bound of the range of expando columns to return
243            * @param end the upper bound of the range of expando columns to return (not inclusive)
244            * @param orderByComparator the comparator to order the results by
245            * @return the ordered range of matching expando columns
246            * @throws SystemException if a system exception occurred
247            */
248            public static java.util.List<com.liferay.portlet.expando.model.ExpandoColumn> findByTableId(
249                    long tableId, int start, int end,
250                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
251                    throws com.liferay.portal.kernel.exception.SystemException {
252                    return getPersistence()
253                                       .findByTableId(tableId, start, end, orderByComparator);
254            }
255    
256            /**
257            * Finds the first expando column in the ordered set where tableId = &#63;.
258            *
259            * <p>
260            * 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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
261            * </p>
262            *
263            * @param tableId the table ID to search with
264            * @param orderByComparator the comparator to order the set by
265            * @return the first matching expando column
266            * @throws com.liferay.portlet.expando.NoSuchColumnException if a matching expando column could not be found
267            * @throws SystemException if a system exception occurred
268            */
269            public static com.liferay.portlet.expando.model.ExpandoColumn findByTableId_First(
270                    long tableId,
271                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
272                    throws com.liferay.portal.kernel.exception.SystemException,
273                            com.liferay.portlet.expando.NoSuchColumnException {
274                    return getPersistence().findByTableId_First(tableId, orderByComparator);
275            }
276    
277            /**
278            * Finds the last expando column in the ordered set where tableId = &#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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
282            * </p>
283            *
284            * @param tableId the table ID to search with
285            * @param orderByComparator the comparator to order the set by
286            * @return the last matching expando column
287            * @throws com.liferay.portlet.expando.NoSuchColumnException if a matching expando column could not be found
288            * @throws SystemException if a system exception occurred
289            */
290            public static com.liferay.portlet.expando.model.ExpandoColumn findByTableId_Last(
291                    long tableId,
292                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
293                    throws com.liferay.portal.kernel.exception.SystemException,
294                            com.liferay.portlet.expando.NoSuchColumnException {
295                    return getPersistence().findByTableId_Last(tableId, orderByComparator);
296            }
297    
298            /**
299            * Finds the expando columns before and after the current expando column in the ordered set where tableId = &#63;.
300            *
301            * <p>
302            * 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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
303            * </p>
304            *
305            * @param columnId the primary key of the current expando column
306            * @param tableId the table ID to search with
307            * @param orderByComparator the comparator to order the set by
308            * @return the previous, current, and next expando column
309            * @throws com.liferay.portlet.expando.NoSuchColumnException if a expando column with the primary key could not be found
310            * @throws SystemException if a system exception occurred
311            */
312            public static com.liferay.portlet.expando.model.ExpandoColumn[] findByTableId_PrevAndNext(
313                    long columnId, long tableId,
314                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
315                    throws com.liferay.portal.kernel.exception.SystemException,
316                            com.liferay.portlet.expando.NoSuchColumnException {
317                    return getPersistence()
318                                       .findByTableId_PrevAndNext(columnId, tableId,
319                            orderByComparator);
320            }
321    
322            /**
323            * Filters by the user's permissions and finds all the expando columns where tableId = &#63;.
324            *
325            * @param tableId the table ID to search with
326            * @return the matching expando columns that the user has permission to view
327            * @throws SystemException if a system exception occurred
328            */
329            public static java.util.List<com.liferay.portlet.expando.model.ExpandoColumn> filterFindByTableId(
330                    long tableId)
331                    throws com.liferay.portal.kernel.exception.SystemException {
332                    return getPersistence().filterFindByTableId(tableId);
333            }
334    
335            /**
336            * Filters by the user's permissions and finds a range of all the expando columns where tableId = &#63;.
337            *
338            * <p>
339            * 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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
340            * </p>
341            *
342            * @param tableId the table ID to search with
343            * @param start the lower bound of the range of expando columns to return
344            * @param end the upper bound of the range of expando columns to return (not inclusive)
345            * @return the range of matching expando columns that the user has permission to view
346            * @throws SystemException if a system exception occurred
347            */
348            public static java.util.List<com.liferay.portlet.expando.model.ExpandoColumn> filterFindByTableId(
349                    long tableId, int start, int end)
350                    throws com.liferay.portal.kernel.exception.SystemException {
351                    return getPersistence().filterFindByTableId(tableId, start, end);
352            }
353    
354            /**
355            * Filters by the user's permissions and finds an ordered range of all the expando columns where tableId = &#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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
359            * </p>
360            *
361            * @param tableId the table ID to search with
362            * @param start the lower bound of the range of expando columns to return
363            * @param end the upper bound of the range of expando columns to return (not inclusive)
364            * @param orderByComparator the comparator to order the results by
365            * @return the ordered range of matching expando columns that the user has permission to view
366            * @throws SystemException if a system exception occurred
367            */
368            public static java.util.List<com.liferay.portlet.expando.model.ExpandoColumn> filterFindByTableId(
369                    long tableId, int start, int end,
370                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
371                    throws com.liferay.portal.kernel.exception.SystemException {
372                    return getPersistence()
373                                       .filterFindByTableId(tableId, start, end, orderByComparator);
374            }
375    
376            /**
377            * Filters the expando columns before and after the current expando column in the ordered set where tableId = &#63;.
378            *
379            * <p>
380            * 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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
381            * </p>
382            *
383            * @param columnId the primary key of the current expando column
384            * @param tableId the table ID to search with
385            * @param orderByComparator the comparator to order the set by
386            * @return the previous, current, and next expando column
387            * @throws com.liferay.portlet.expando.NoSuchColumnException if a expando column with the primary key could not be found
388            * @throws SystemException if a system exception occurred
389            */
390            public static com.liferay.portlet.expando.model.ExpandoColumn[] filterFindByTableId_PrevAndNext(
391                    long columnId, long tableId,
392                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
393                    throws com.liferay.portal.kernel.exception.SystemException,
394                            com.liferay.portlet.expando.NoSuchColumnException {
395                    return getPersistence()
396                                       .filterFindByTableId_PrevAndNext(columnId, tableId,
397                            orderByComparator);
398            }
399    
400            /**
401            * Finds the expando column where tableId = &#63; and name = &#63; or throws a {@link com.liferay.portlet.expando.NoSuchColumnException} if it could not be found.
402            *
403            * @param tableId the table ID to search with
404            * @param name the name to search with
405            * @return the matching expando column
406            * @throws com.liferay.portlet.expando.NoSuchColumnException if a matching expando column could not be found
407            * @throws SystemException if a system exception occurred
408            */
409            public static com.liferay.portlet.expando.model.ExpandoColumn findByT_N(
410                    long tableId, java.lang.String name)
411                    throws com.liferay.portal.kernel.exception.SystemException,
412                            com.liferay.portlet.expando.NoSuchColumnException {
413                    return getPersistence().findByT_N(tableId, name);
414            }
415    
416            /**
417            * Finds the expando column where tableId = &#63; and name = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
418            *
419            * @param tableId the table ID to search with
420            * @param name the name to search with
421            * @return the matching expando column, or <code>null</code> if a matching expando column could not be found
422            * @throws SystemException if a system exception occurred
423            */
424            public static com.liferay.portlet.expando.model.ExpandoColumn fetchByT_N(
425                    long tableId, java.lang.String name)
426                    throws com.liferay.portal.kernel.exception.SystemException {
427                    return getPersistence().fetchByT_N(tableId, name);
428            }
429    
430            /**
431            * Finds 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.
432            *
433            * @param tableId the table ID to search with
434            * @param name the name to search with
435            * @return the matching expando column, or <code>null</code> if a matching expando column could not be found
436            * @throws SystemException if a system exception occurred
437            */
438            public static com.liferay.portlet.expando.model.ExpandoColumn fetchByT_N(
439                    long tableId, java.lang.String name, boolean retrieveFromCache)
440                    throws com.liferay.portal.kernel.exception.SystemException {
441                    return getPersistence().fetchByT_N(tableId, name, retrieveFromCache);
442            }
443    
444            /**
445            * Finds all the expando columns.
446            *
447            * @return the expando columns
448            * @throws SystemException if a system exception occurred
449            */
450            public static java.util.List<com.liferay.portlet.expando.model.ExpandoColumn> findAll()
451                    throws com.liferay.portal.kernel.exception.SystemException {
452                    return getPersistence().findAll();
453            }
454    
455            /**
456            * Finds a range of all the expando columns.
457            *
458            * <p>
459            * 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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
460            * </p>
461            *
462            * @param start the lower bound of the range of expando columns to return
463            * @param end the upper bound of the range of expando columns to return (not inclusive)
464            * @return the range of expando columns
465            * @throws SystemException if a system exception occurred
466            */
467            public static java.util.List<com.liferay.portlet.expando.model.ExpandoColumn> findAll(
468                    int start, int end)
469                    throws com.liferay.portal.kernel.exception.SystemException {
470                    return getPersistence().findAll(start, end);
471            }
472    
473            /**
474            * Finds an ordered range of all the expando columns.
475            *
476            * <p>
477            * 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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
478            * </p>
479            *
480            * @param start the lower bound of the range of expando columns to return
481            * @param end the upper bound of the range of expando columns to return (not inclusive)
482            * @param orderByComparator the comparator to order the results by
483            * @return the ordered range of expando columns
484            * @throws SystemException if a system exception occurred
485            */
486            public static java.util.List<com.liferay.portlet.expando.model.ExpandoColumn> findAll(
487                    int start, int end,
488                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
489                    throws com.liferay.portal.kernel.exception.SystemException {
490                    return getPersistence().findAll(start, end, orderByComparator);
491            }
492    
493            /**
494            * Removes all the expando columns where tableId = &#63; from the database.
495            *
496            * @param tableId the table ID to search with
497            * @throws SystemException if a system exception occurred
498            */
499            public static void removeByTableId(long tableId)
500                    throws com.liferay.portal.kernel.exception.SystemException {
501                    getPersistence().removeByTableId(tableId);
502            }
503    
504            /**
505            * Removes the expando column where tableId = &#63; and name = &#63; from the database.
506            *
507            * @param tableId the table ID to search with
508            * @param name the name to search with
509            * @throws SystemException if a system exception occurred
510            */
511            public static void removeByT_N(long tableId, java.lang.String name)
512                    throws com.liferay.portal.kernel.exception.SystemException,
513                            com.liferay.portlet.expando.NoSuchColumnException {
514                    getPersistence().removeByT_N(tableId, name);
515            }
516    
517            /**
518            * Removes all the expando columns from the database.
519            *
520            * @throws SystemException if a system exception occurred
521            */
522            public static void removeAll()
523                    throws com.liferay.portal.kernel.exception.SystemException {
524                    getPersistence().removeAll();
525            }
526    
527            /**
528            * Counts all the expando columns where tableId = &#63;.
529            *
530            * @param tableId the table ID to search with
531            * @return the number of matching expando columns
532            * @throws SystemException if a system exception occurred
533            */
534            public static int countByTableId(long tableId)
535                    throws com.liferay.portal.kernel.exception.SystemException {
536                    return getPersistence().countByTableId(tableId);
537            }
538    
539            /**
540            * Filters by the user's permissions and counts all the expando columns where tableId = &#63;.
541            *
542            * @param tableId the table ID to search with
543            * @return the number of matching expando columns that the user has permission to view
544            * @throws SystemException if a system exception occurred
545            */
546            public static int filterCountByTableId(long tableId)
547                    throws com.liferay.portal.kernel.exception.SystemException {
548                    return getPersistence().filterCountByTableId(tableId);
549            }
550    
551            /**
552            * Counts all the expando columns where tableId = &#63; and name = &#63;.
553            *
554            * @param tableId the table ID to search with
555            * @param name the name to search with
556            * @return the number of matching expando columns
557            * @throws SystemException if a system exception occurred
558            */
559            public static int countByT_N(long tableId, java.lang.String name)
560                    throws com.liferay.portal.kernel.exception.SystemException {
561                    return getPersistence().countByT_N(tableId, name);
562            }
563    
564            /**
565            * Counts all the expando columns.
566            *
567            * @return the number of expando columns
568            * @throws SystemException if a system exception occurred
569            */
570            public static int countAll()
571                    throws com.liferay.portal.kernel.exception.SystemException {
572                    return getPersistence().countAll();
573            }
574    
575            public static ExpandoColumnPersistence getPersistence() {
576                    if (_persistence == null) {
577                            _persistence = (ExpandoColumnPersistence)PortalBeanLocatorUtil.locate(ExpandoColumnPersistence.class.getName());
578    
579                            ReferenceRegistry.registerReference(ExpandoColumnUtil.class,
580                                    "_persistence");
581                    }
582    
583                    return _persistence;
584            }
585    
586            public void setPersistence(ExpandoColumnPersistence persistence) {
587                    _persistence = persistence;
588    
589                    ReferenceRegistry.registerReference(ExpandoColumnUtil.class,
590                            "_persistence");
591            }
592    
593            private static ExpandoColumnPersistence _persistence;
594    }