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            public static com.liferay.portlet.expando.model.ExpandoColumn getColumn(
241                    long columnId)
242                    throws com.liferay.portal.kernel.exception.PortalException {
243                    return getService().getColumn(columnId);
244            }
245    
246            public static com.liferay.portlet.expando.model.ExpandoColumn getColumn(
247                    long companyId, java.lang.String className, java.lang.String tableName,
248                    java.lang.String name) {
249                    return getService().getColumn(companyId, className, tableName, name);
250            }
251    
252            public static com.liferay.portlet.expando.model.ExpandoColumn getColumn(
253                    long companyId, long classNameId, java.lang.String tableName,
254                    java.lang.String name) {
255                    return getService().getColumn(companyId, classNameId, tableName, name);
256            }
257    
258            public static com.liferay.portlet.expando.model.ExpandoColumn getColumn(
259                    long tableId, java.lang.String name) {
260                    return getService().getColumn(tableId, name);
261            }
262    
263            public static java.util.List<com.liferay.portlet.expando.model.ExpandoColumn> getColumns(
264                    long companyId, java.lang.String className, java.lang.String tableName) {
265                    return getService().getColumns(companyId, className, tableName);
266            }
267    
268            public static java.util.List<com.liferay.portlet.expando.model.ExpandoColumn> getColumns(
269                    long companyId, java.lang.String className, java.lang.String tableName,
270                    java.util.Collection<java.lang.String> columnNames) {
271                    return getService()
272                                       .getColumns(companyId, className, tableName, columnNames);
273            }
274    
275            public static java.util.List<com.liferay.portlet.expando.model.ExpandoColumn> getColumns(
276                    long companyId, long classNameId, java.lang.String tableName) {
277                    return getService().getColumns(companyId, classNameId, tableName);
278            }
279    
280            public static java.util.List<com.liferay.portlet.expando.model.ExpandoColumn> getColumns(
281                    long companyId, long classNameId, java.lang.String tableName,
282                    java.util.Collection<java.lang.String> names) {
283                    return getService().getColumns(companyId, classNameId, tableName, names);
284            }
285    
286            public static java.util.List<com.liferay.portlet.expando.model.ExpandoColumn> getColumns(
287                    long tableId) {
288                    return getService().getColumns(tableId);
289            }
290    
291            public static java.util.List<com.liferay.portlet.expando.model.ExpandoColumn> getColumns(
292                    long tableId, java.util.Collection<java.lang.String> names) {
293                    return getService().getColumns(tableId, names);
294            }
295    
296            public static int getColumnsCount(long companyId,
297                    java.lang.String className, java.lang.String tableName) {
298                    return getService().getColumnsCount(companyId, className, tableName);
299            }
300    
301            public static int getColumnsCount(long companyId, long classNameId,
302                    java.lang.String tableName) {
303                    return getService().getColumnsCount(companyId, classNameId, tableName);
304            }
305    
306            public static int getColumnsCount(long tableId) {
307                    return getService().getColumnsCount(tableId);
308            }
309    
310            public static com.liferay.portlet.expando.model.ExpandoColumn getDefaultTableColumn(
311                    long companyId, java.lang.String className, java.lang.String name) {
312                    return getService().getDefaultTableColumn(companyId, className, name);
313            }
314    
315            public static com.liferay.portlet.expando.model.ExpandoColumn getDefaultTableColumn(
316                    long companyId, long classNameId, java.lang.String name) {
317                    return getService().getDefaultTableColumn(companyId, classNameId, name);
318            }
319    
320            public static java.util.List<com.liferay.portlet.expando.model.ExpandoColumn> getDefaultTableColumns(
321                    long companyId, java.lang.String className) {
322                    return getService().getDefaultTableColumns(companyId, className);
323            }
324    
325            public static java.util.List<com.liferay.portlet.expando.model.ExpandoColumn> getDefaultTableColumns(
326                    long companyId, long classNameId) {
327                    return getService().getDefaultTableColumns(companyId, classNameId);
328            }
329    
330            public static int getDefaultTableColumnsCount(long companyId,
331                    java.lang.String className) {
332                    return getService().getDefaultTableColumnsCount(companyId, className);
333            }
334    
335            public static int getDefaultTableColumnsCount(long companyId,
336                    long classNameId) {
337                    return getService().getDefaultTableColumnsCount(companyId, classNameId);
338            }
339    
340            /**
341            * Returns the expando column with the primary key.
342            *
343            * @param columnId the primary key of the expando column
344            * @return the expando column
345            * @throws PortalException if a expando column with the primary key could not be found
346            */
347            public static com.liferay.portlet.expando.model.ExpandoColumn getExpandoColumn(
348                    long columnId)
349                    throws com.liferay.portal.kernel.exception.PortalException {
350                    return getService().getExpandoColumn(columnId);
351            }
352    
353            /**
354            * Returns a range of all the expando columns.
355            *
356            * <p>
357            * 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.
358            * </p>
359            *
360            * @param start the lower bound of the range of expando columns
361            * @param end the upper bound of the range of expando columns (not inclusive)
362            * @return the range of expando columns
363            */
364            public static java.util.List<com.liferay.portlet.expando.model.ExpandoColumn> getExpandoColumns(
365                    int start, int end) {
366                    return getService().getExpandoColumns(start, end);
367            }
368    
369            /**
370            * Returns the number of expando columns.
371            *
372            * @return the number of expando columns
373            */
374            public static int getExpandoColumnsCount() {
375                    return getService().getExpandoColumnsCount();
376            }
377    
378            public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() {
379                    return getService().getIndexableActionableDynamicQuery();
380            }
381    
382            /**
383            * Returns the OSGi service identifier.
384            *
385            * @return the OSGi service identifier
386            */
387            public static java.lang.String getOSGiServiceIdentifier() {
388                    return getService().getOSGiServiceIdentifier();
389            }
390    
391            public static com.liferay.portal.model.PersistedModel getPersistedModel(
392                    java.io.Serializable primaryKeyObj)
393                    throws com.liferay.portal.kernel.exception.PortalException {
394                    return getService().getPersistedModel(primaryKeyObj);
395            }
396    
397            public static com.liferay.portlet.expando.model.ExpandoColumn updateColumn(
398                    long columnId, java.lang.String name, int type)
399                    throws com.liferay.portal.kernel.exception.PortalException {
400                    return getService().updateColumn(columnId, name, type);
401            }
402    
403            public static com.liferay.portlet.expando.model.ExpandoColumn updateColumn(
404                    long columnId, java.lang.String name, int type,
405                    java.lang.Object defaultData)
406                    throws com.liferay.portal.kernel.exception.PortalException {
407                    return getService().updateColumn(columnId, name, type, defaultData);
408            }
409    
410            /**
411            * Updates the expando column in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
412            *
413            * @param expandoColumn the expando column
414            * @return the expando column that was updated
415            */
416            public static com.liferay.portlet.expando.model.ExpandoColumn updateExpandoColumn(
417                    com.liferay.portlet.expando.model.ExpandoColumn expandoColumn) {
418                    return getService().updateExpandoColumn(expandoColumn);
419            }
420    
421            public static com.liferay.portlet.expando.model.ExpandoColumn updateTypeSettings(
422                    long columnId, java.lang.String typeSettings)
423                    throws com.liferay.portal.kernel.exception.PortalException {
424                    return getService().updateTypeSettings(columnId, typeSettings);
425            }
426    
427            public static ExpandoColumnLocalService getService() {
428                    if (_service == null) {
429                            _service = (ExpandoColumnLocalService)PortalBeanLocatorUtil.locate(ExpandoColumnLocalService.class.getName());
430    
431                            ReferenceRegistry.registerReference(ExpandoColumnLocalServiceUtil.class,
432                                    "_service");
433                    }
434    
435                    return _service;
436            }
437    
438            private static ExpandoColumnLocalService _service;
439    }