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;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
020    import com.liferay.portal.kernel.util.ReferenceRegistry;
021    
022    /**
023     * Provides the local service utility for ExpandoColumn. This utility wraps
024     * {@link com.liferay.portlet.expando.service.impl.ExpandoColumnLocalServiceImpl} and is the
025     * primary access point for service operations in application layer code running
026     * on the local server. Methods of this service will not have security checks
027     * based on the propagated JAAS credentials because this service can only be
028     * accessed from within the same VM.
029     *
030     * @author Brian Wing Shun Chan
031     * @see ExpandoColumnLocalService
032     * @see com.liferay.portlet.expando.service.base.ExpandoColumnLocalServiceBaseImpl
033     * @see com.liferay.portlet.expando.service.impl.ExpandoColumnLocalServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class ExpandoColumnLocalServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.expando.service.impl.ExpandoColumnLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
042             */
043            public static com.liferay.portlet.expando.model.ExpandoColumn addColumn(
044                    long tableId, java.lang.String name, int type)
045                    throws com.liferay.portal.kernel.exception.PortalException {
046                    return getService().addColumn(tableId, name, type);
047            }
048    
049            public static com.liferay.portlet.expando.model.ExpandoColumn addColumn(
050                    long tableId, java.lang.String name, int type,
051                    java.lang.Object defaultData)
052                    throws com.liferay.portal.kernel.exception.PortalException {
053                    return getService().addColumn(tableId, name, type, defaultData);
054            }
055    
056            /**
057            * Adds the expando column to the database. Also notifies the appropriate model listeners.
058            *
059            * @param expandoColumn the expando column
060            * @return the expando column that was added
061            */
062            public static com.liferay.portlet.expando.model.ExpandoColumn addExpandoColumn(
063                    com.liferay.portlet.expando.model.ExpandoColumn expandoColumn) {
064                    return getService().addExpandoColumn(expandoColumn);
065            }
066    
067            /**
068            * Creates a new expando column with the primary key. Does not add the expando column to the database.
069            *
070            * @param columnId the primary key for the new expando column
071            * @return the new expando column
072            */
073            public static com.liferay.portlet.expando.model.ExpandoColumn createExpandoColumn(
074                    long columnId) {
075                    return getService().createExpandoColumn(columnId);
076            }
077    
078            public static void deleteColumn(
079                    com.liferay.portlet.expando.model.ExpandoColumn column) {
080                    getService().deleteColumn(column);
081            }
082    
083            public static void deleteColumn(long columnId)
084                    throws com.liferay.portal.kernel.exception.PortalException {
085                    getService().deleteColumn(columnId);
086            }
087    
088            public static void deleteColumn(long companyId, java.lang.String className,
089                    java.lang.String tableName, java.lang.String name)
090                    throws com.liferay.portal.kernel.exception.PortalException {
091                    getService().deleteColumn(companyId, className, tableName, name);
092            }
093    
094            public static void deleteColumn(long companyId, long classNameId,
095                    java.lang.String tableName, java.lang.String name)
096                    throws com.liferay.portal.kernel.exception.PortalException {
097                    getService().deleteColumn(companyId, classNameId, tableName, name);
098            }
099    
100            public static void deleteColumn(long tableId, java.lang.String name) {
101                    getService().deleteColumn(tableId, name);
102            }
103    
104            public static void deleteColumns(long companyId,
105                    java.lang.String className, java.lang.String tableName)
106                    throws com.liferay.portal.kernel.exception.PortalException {
107                    getService().deleteColumns(companyId, className, tableName);
108            }
109    
110            public static void deleteColumns(long companyId, long classNameId,
111                    java.lang.String tableName)
112                    throws com.liferay.portal.kernel.exception.PortalException {
113                    getService().deleteColumns(companyId, classNameId, tableName);
114            }
115    
116            public static void deleteColumns(long tableId) {
117                    getService().deleteColumns(tableId);
118            }
119    
120            /**
121            * Deletes the expando column with the primary key from the database. Also notifies the appropriate model listeners.
122            *
123            * @param columnId the primary key of the expando column
124            * @return the expando column that was removed
125            * @throws PortalException if a expando column with the primary key could not be found
126            */
127            public static com.liferay.portlet.expando.model.ExpandoColumn deleteExpandoColumn(
128                    long columnId)
129                    throws com.liferay.portal.kernel.exception.PortalException {
130                    return getService().deleteExpandoColumn(columnId);
131            }
132    
133            /**
134            * Deletes the expando column from the database. Also notifies the appropriate model listeners.
135            *
136            * @param expandoColumn the expando column
137            * @return the expando column that was removed
138            */
139            public static com.liferay.portlet.expando.model.ExpandoColumn deleteExpandoColumn(
140                    com.liferay.portlet.expando.model.ExpandoColumn expandoColumn) {
141                    return getService().deleteExpandoColumn(expandoColumn);
142            }
143    
144            /**
145            * @throws PortalException
146            */
147            public static com.liferay.portal.model.PersistedModel deletePersistedModel(
148                    com.liferay.portal.model.PersistedModel persistedModel)
149                    throws com.liferay.portal.kernel.exception.PortalException {
150                    return getService().deletePersistedModel(persistedModel);
151            }
152    
153            public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
154                    return getService().dynamicQuery();
155            }
156    
157            /**
158            * Performs a dynamic query on the database and returns the matching rows.
159            *
160            * @param dynamicQuery the dynamic query
161            * @return the matching rows
162            */
163            public static <T> java.util.List<T> dynamicQuery(
164                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
165                    return getService().dynamicQuery(dynamicQuery);
166            }
167    
168            /**
169            * Performs a dynamic query on the database and returns a range of the matching rows.
170            *
171            * <p>
172            * 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. 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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.expando.model.impl.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.
173            * </p>
174            *
175            * @param dynamicQuery the dynamic query
176            * @param start the lower bound of the range of model instances
177            * @param end the upper bound of the range of model instances (not inclusive)
178            * @return the range of matching rows
179            */
180            public static <T> java.util.List<T> dynamicQuery(
181                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
182                    int end) {
183                    return getService().dynamicQuery(dynamicQuery, start, end);
184            }
185    
186            /**
187            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
188            *
189            * <p>
190            * 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. 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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.expando.model.impl.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.
191            * </p>
192            *
193            * @param dynamicQuery the dynamic query
194            * @param start the lower bound of the range of model instances
195            * @param end the upper bound of the range of model instances (not inclusive)
196            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
197            * @return the ordered range of matching rows
198            */
199            public static <T> java.util.List<T> dynamicQuery(
200                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
201                    int end,
202                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) {
203                    return getService()
204                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
205            }
206    
207            /**
208            * Returns the number of rows matching the dynamic query.
209            *
210            * @param dynamicQuery the dynamic query
211            * @return the number of rows matching the dynamic query
212            */
213            public static long dynamicQueryCount(
214                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
215                    return getService().dynamicQueryCount(dynamicQuery);
216            }
217    
218            /**
219            * Returns the number of rows matching the dynamic query.
220            *
221            * @param dynamicQuery the dynamic query
222            * @param projection the projection to apply to the query
223            * @return the number of rows matching the dynamic query
224            */
225            public static long dynamicQueryCount(
226                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
227                    com.liferay.portal.kernel.dao.orm.Projection projection) {
228                    return getService().dynamicQueryCount(dynamicQuery, projection);
229            }
230    
231            public static com.liferay.portlet.expando.model.ExpandoColumn fetchExpandoColumn(
232                    long columnId) {
233                    return getService().fetchExpandoColumn(columnId);
234            }
235    
236            public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() {
237                    return getService().getActionableDynamicQuery();
238            }
239    
240            /**
241            * Returns the Spring bean ID for this bean.
242            *
243            * @return the Spring bean ID for this bean
244            */
245            public static java.lang.String getBeanIdentifier() {
246                    return getService().getBeanIdentifier();
247            }
248    
249            public static com.liferay.portlet.expando.model.ExpandoColumn getColumn(
250                    long columnId)
251                    throws com.liferay.portal.kernel.exception.PortalException {
252                    return getService().getColumn(columnId);
253            }
254    
255            public static com.liferay.portlet.expando.model.ExpandoColumn getColumn(
256                    long companyId, java.lang.String className, java.lang.String tableName,
257                    java.lang.String name) {
258                    return getService().getColumn(companyId, className, tableName, name);
259            }
260    
261            public static com.liferay.portlet.expando.model.ExpandoColumn getColumn(
262                    long companyId, long classNameId, java.lang.String tableName,
263                    java.lang.String name) {
264                    return getService().getColumn(companyId, classNameId, tableName, name);
265            }
266    
267            public static com.liferay.portlet.expando.model.ExpandoColumn getColumn(
268                    long tableId, java.lang.String name) {
269                    return getService().getColumn(tableId, name);
270            }
271    
272            public static java.util.List<com.liferay.portlet.expando.model.ExpandoColumn> getColumns(
273                    long companyId, java.lang.String className, java.lang.String tableName) {
274                    return getService().getColumns(companyId, className, tableName);
275            }
276    
277            public static java.util.List<com.liferay.portlet.expando.model.ExpandoColumn> getColumns(
278                    long companyId, java.lang.String className, java.lang.String tableName,
279                    java.util.Collection<java.lang.String> columnNames) {
280                    return getService()
281                                       .getColumns(companyId, className, tableName, columnNames);
282            }
283    
284            public static java.util.List<com.liferay.portlet.expando.model.ExpandoColumn> getColumns(
285                    long companyId, long classNameId, java.lang.String tableName) {
286                    return getService().getColumns(companyId, classNameId, tableName);
287            }
288    
289            public static java.util.List<com.liferay.portlet.expando.model.ExpandoColumn> getColumns(
290                    long companyId, long classNameId, java.lang.String tableName,
291                    java.util.Collection<java.lang.String> names) {
292                    return getService().getColumns(companyId, classNameId, tableName, names);
293            }
294    
295            public static java.util.List<com.liferay.portlet.expando.model.ExpandoColumn> getColumns(
296                    long tableId) {
297                    return getService().getColumns(tableId);
298            }
299    
300            public static java.util.List<com.liferay.portlet.expando.model.ExpandoColumn> getColumns(
301                    long tableId, java.util.Collection<java.lang.String> names) {
302                    return getService().getColumns(tableId, names);
303            }
304    
305            public static int getColumnsCount(long companyId,
306                    java.lang.String className, java.lang.String tableName) {
307                    return getService().getColumnsCount(companyId, className, tableName);
308            }
309    
310            public static int getColumnsCount(long companyId, long classNameId,
311                    java.lang.String tableName) {
312                    return getService().getColumnsCount(companyId, classNameId, tableName);
313            }
314    
315            public static int getColumnsCount(long tableId) {
316                    return getService().getColumnsCount(tableId);
317            }
318    
319            public static com.liferay.portlet.expando.model.ExpandoColumn getDefaultTableColumn(
320                    long companyId, java.lang.String className, java.lang.String name) {
321                    return getService().getDefaultTableColumn(companyId, className, name);
322            }
323    
324            public static com.liferay.portlet.expando.model.ExpandoColumn getDefaultTableColumn(
325                    long companyId, long classNameId, java.lang.String name) {
326                    return getService().getDefaultTableColumn(companyId, classNameId, name);
327            }
328    
329            public static java.util.List<com.liferay.portlet.expando.model.ExpandoColumn> getDefaultTableColumns(
330                    long companyId, java.lang.String className) {
331                    return getService().getDefaultTableColumns(companyId, className);
332            }
333    
334            public static java.util.List<com.liferay.portlet.expando.model.ExpandoColumn> getDefaultTableColumns(
335                    long companyId, long classNameId) {
336                    return getService().getDefaultTableColumns(companyId, classNameId);
337            }
338    
339            public static int getDefaultTableColumnsCount(long companyId,
340                    java.lang.String className) {
341                    return getService().getDefaultTableColumnsCount(companyId, className);
342            }
343    
344            public static int getDefaultTableColumnsCount(long companyId,
345                    long classNameId) {
346                    return getService().getDefaultTableColumnsCount(companyId, classNameId);
347            }
348    
349            /**
350            * Returns the expando column with the primary key.
351            *
352            * @param columnId the primary key of the expando column
353            * @return the expando column
354            * @throws PortalException if a expando column with the primary key could not be found
355            */
356            public static com.liferay.portlet.expando.model.ExpandoColumn getExpandoColumn(
357                    long columnId)
358                    throws com.liferay.portal.kernel.exception.PortalException {
359                    return getService().getExpandoColumn(columnId);
360            }
361    
362            /**
363            * Returns a range of all the expando columns.
364            *
365            * <p>
366            * 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. 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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.expando.model.impl.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.
367            * </p>
368            *
369            * @param start the lower bound of the range of expando columns
370            * @param end the upper bound of the range of expando columns (not inclusive)
371            * @return the range of expando columns
372            */
373            public static java.util.List<com.liferay.portlet.expando.model.ExpandoColumn> getExpandoColumns(
374                    int start, int end) {
375                    return getService().getExpandoColumns(start, end);
376            }
377    
378            /**
379            * Returns the number of expando columns.
380            *
381            * @return the number of expando columns
382            */
383            public static int getExpandoColumnsCount() {
384                    return getService().getExpandoColumnsCount();
385            }
386    
387            public static com.liferay.portal.model.PersistedModel getPersistedModel(
388                    java.io.Serializable primaryKeyObj)
389                    throws com.liferay.portal.kernel.exception.PortalException {
390                    return getService().getPersistedModel(primaryKeyObj);
391            }
392    
393            /**
394            * Sets the Spring bean ID for this bean.
395            *
396            * @param beanIdentifier the Spring bean ID for this bean
397            */
398            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
399                    getService().setBeanIdentifier(beanIdentifier);
400            }
401    
402            public static com.liferay.portlet.expando.model.ExpandoColumn updateColumn(
403                    long columnId, java.lang.String name, int type)
404                    throws com.liferay.portal.kernel.exception.PortalException {
405                    return getService().updateColumn(columnId, name, type);
406            }
407    
408            public static com.liferay.portlet.expando.model.ExpandoColumn updateColumn(
409                    long columnId, java.lang.String name, int type,
410                    java.lang.Object defaultData)
411                    throws com.liferay.portal.kernel.exception.PortalException {
412                    return getService().updateColumn(columnId, name, type, defaultData);
413            }
414    
415            /**
416            * Updates the expando column in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
417            *
418            * @param expandoColumn the expando column
419            * @return the expando column that was updated
420            */
421            public static com.liferay.portlet.expando.model.ExpandoColumn updateExpandoColumn(
422                    com.liferay.portlet.expando.model.ExpandoColumn expandoColumn) {
423                    return getService().updateExpandoColumn(expandoColumn);
424            }
425    
426            public static com.liferay.portlet.expando.model.ExpandoColumn updateTypeSettings(
427                    long columnId, java.lang.String typeSettings)
428                    throws com.liferay.portal.kernel.exception.PortalException {
429                    return getService().updateTypeSettings(columnId, typeSettings);
430            }
431    
432            public static ExpandoColumnLocalService getService() {
433                    if (_service == null) {
434                            _service = (ExpandoColumnLocalService)PortalBeanLocatorUtil.locate(ExpandoColumnLocalService.class.getName());
435    
436                            ReferenceRegistry.registerReference(ExpandoColumnLocalServiceUtil.class,
437                                    "_service");
438                    }
439    
440                    return _service;
441            }
442    
443            /**
444             * @deprecated As of 6.2.0
445             */
446            @Deprecated
447            public void setService(ExpandoColumnLocalService service) {
448            }
449    
450            private static ExpandoColumnLocalService _service;
451    }