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.expando.kernel.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.expando.kernel.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.expando.kernel.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.expando.kernel.model.ExpandoColumn addExpandoColumn(
063                    com.liferay.expando.kernel.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.expando.kernel.model.ExpandoColumn createExpandoColumn(
074                    long columnId) {
075                    return getService().createExpandoColumn(columnId);
076            }
077    
078            /**
079            * Deletes the expando column from the database. Also notifies the appropriate model listeners.
080            *
081            * @param expandoColumn the expando column
082            * @return the expando column that was removed
083            */
084            public static com.liferay.expando.kernel.model.ExpandoColumn deleteExpandoColumn(
085                    com.liferay.expando.kernel.model.ExpandoColumn expandoColumn) {
086                    return getService().deleteExpandoColumn(expandoColumn);
087            }
088    
089            /**
090            * Deletes the expando column with the primary key from the database. Also notifies the appropriate model listeners.
091            *
092            * @param columnId the primary key of the expando column
093            * @return the expando column that was removed
094            * @throws PortalException if a expando column with the primary key could not be found
095            */
096            public static com.liferay.expando.kernel.model.ExpandoColumn deleteExpandoColumn(
097                    long columnId)
098                    throws com.liferay.portal.kernel.exception.PortalException {
099                    return getService().deleteExpandoColumn(columnId);
100            }
101    
102            public static com.liferay.expando.kernel.model.ExpandoColumn fetchExpandoColumn(
103                    long columnId) {
104                    return getService().fetchExpandoColumn(columnId);
105            }
106    
107            public static com.liferay.expando.kernel.model.ExpandoColumn getColumn(
108                    long columnId)
109                    throws com.liferay.portal.kernel.exception.PortalException {
110                    return getService().getColumn(columnId);
111            }
112    
113            public static com.liferay.expando.kernel.model.ExpandoColumn getColumn(
114                    long companyId, java.lang.String className, java.lang.String tableName,
115                    java.lang.String name) {
116                    return getService().getColumn(companyId, className, tableName, name);
117            }
118    
119            public static com.liferay.expando.kernel.model.ExpandoColumn getColumn(
120                    long companyId, long classNameId, java.lang.String tableName,
121                    java.lang.String name) {
122                    return getService().getColumn(companyId, classNameId, tableName, name);
123            }
124    
125            public static com.liferay.expando.kernel.model.ExpandoColumn getColumn(
126                    long tableId, java.lang.String name) {
127                    return getService().getColumn(tableId, name);
128            }
129    
130            public static com.liferay.expando.kernel.model.ExpandoColumn getDefaultTableColumn(
131                    long companyId, java.lang.String className, java.lang.String name) {
132                    return getService().getDefaultTableColumn(companyId, className, name);
133            }
134    
135            public static com.liferay.expando.kernel.model.ExpandoColumn getDefaultTableColumn(
136                    long companyId, long classNameId, java.lang.String name) {
137                    return getService().getDefaultTableColumn(companyId, classNameId, name);
138            }
139    
140            /**
141            * Returns the expando column with the primary key.
142            *
143            * @param columnId the primary key of the expando column
144            * @return the expando column
145            * @throws PortalException if a expando column with the primary key could not be found
146            */
147            public static com.liferay.expando.kernel.model.ExpandoColumn getExpandoColumn(
148                    long columnId)
149                    throws com.liferay.portal.kernel.exception.PortalException {
150                    return getService().getExpandoColumn(columnId);
151            }
152    
153            public static com.liferay.expando.kernel.model.ExpandoColumn updateColumn(
154                    long columnId, java.lang.String name, int type)
155                    throws com.liferay.portal.kernel.exception.PortalException {
156                    return getService().updateColumn(columnId, name, type);
157            }
158    
159            public static com.liferay.expando.kernel.model.ExpandoColumn updateColumn(
160                    long columnId, java.lang.String name, int type,
161                    java.lang.Object defaultData)
162                    throws com.liferay.portal.kernel.exception.PortalException {
163                    return getService().updateColumn(columnId, name, type, defaultData);
164            }
165    
166            /**
167            * Updates the expando column in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
168            *
169            * @param expandoColumn the expando column
170            * @return the expando column that was updated
171            */
172            public static com.liferay.expando.kernel.model.ExpandoColumn updateExpandoColumn(
173                    com.liferay.expando.kernel.model.ExpandoColumn expandoColumn) {
174                    return getService().updateExpandoColumn(expandoColumn);
175            }
176    
177            public static com.liferay.expando.kernel.model.ExpandoColumn updateTypeSettings(
178                    long columnId, java.lang.String typeSettings)
179                    throws com.liferay.portal.kernel.exception.PortalException {
180                    return getService().updateTypeSettings(columnId, typeSettings);
181            }
182    
183            public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() {
184                    return getService().getActionableDynamicQuery();
185            }
186    
187            public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
188                    return getService().dynamicQuery();
189            }
190    
191            public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() {
192                    return getService().getIndexableActionableDynamicQuery();
193            }
194    
195            /**
196            * @throws PortalException
197            */
198            public static com.liferay.portal.kernel.model.PersistedModel deletePersistedModel(
199                    com.liferay.portal.kernel.model.PersistedModel persistedModel)
200                    throws com.liferay.portal.kernel.exception.PortalException {
201                    return getService().deletePersistedModel(persistedModel);
202            }
203    
204            public static com.liferay.portal.kernel.model.PersistedModel getPersistedModel(
205                    java.io.Serializable primaryKeyObj)
206                    throws com.liferay.portal.kernel.exception.PortalException {
207                    return getService().getPersistedModel(primaryKeyObj);
208            }
209    
210            public static int getColumnsCount(long companyId,
211                    java.lang.String className, java.lang.String tableName) {
212                    return getService().getColumnsCount(companyId, className, tableName);
213            }
214    
215            public static int getColumnsCount(long companyId, long classNameId,
216                    java.lang.String tableName) {
217                    return getService().getColumnsCount(companyId, classNameId, tableName);
218            }
219    
220            public static int getColumnsCount(long tableId) {
221                    return getService().getColumnsCount(tableId);
222            }
223    
224            public static int getDefaultTableColumnsCount(long companyId,
225                    java.lang.String className) {
226                    return getService().getDefaultTableColumnsCount(companyId, className);
227            }
228    
229            public static int getDefaultTableColumnsCount(long companyId,
230                    long classNameId) {
231                    return getService().getDefaultTableColumnsCount(companyId, classNameId);
232            }
233    
234            /**
235            * Returns the number of expando columns.
236            *
237            * @return the number of expando columns
238            */
239            public static int getExpandoColumnsCount() {
240                    return getService().getExpandoColumnsCount();
241            }
242    
243            /**
244            * Returns the OSGi service identifier.
245            *
246            * @return the OSGi service identifier
247            */
248            public static java.lang.String getOSGiServiceIdentifier() {
249                    return getService().getOSGiServiceIdentifier();
250            }
251    
252            /**
253            * Performs a dynamic query on the database and returns the matching rows.
254            *
255            * @param dynamicQuery the dynamic query
256            * @return the matching rows
257            */
258            public static <T> java.util.List<T> dynamicQuery(
259                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
260                    return getService().dynamicQuery(dynamicQuery);
261            }
262    
263            /**
264            * Performs a dynamic query on the database and returns a range of the matching rows.
265            *
266            * <p>
267            * 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.
268            * </p>
269            *
270            * @param dynamicQuery the dynamic query
271            * @param start the lower bound of the range of model instances
272            * @param end the upper bound of the range of model instances (not inclusive)
273            * @return the range of matching rows
274            */
275            public static <T> java.util.List<T> dynamicQuery(
276                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
277                    int end) {
278                    return getService().dynamicQuery(dynamicQuery, start, end);
279            }
280    
281            /**
282            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
283            *
284            * <p>
285            * 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.
286            * </p>
287            *
288            * @param dynamicQuery the dynamic query
289            * @param start the lower bound of the range of model instances
290            * @param end the upper bound of the range of model instances (not inclusive)
291            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
292            * @return the ordered range of matching rows
293            */
294            public static <T> java.util.List<T> dynamicQuery(
295                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
296                    int end,
297                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) {
298                    return getService()
299                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
300            }
301    
302            public static java.util.List<com.liferay.expando.kernel.model.ExpandoColumn> getColumns(
303                    long companyId, java.lang.String className, java.lang.String tableName) {
304                    return getService().getColumns(companyId, className, tableName);
305            }
306    
307            public static java.util.List<com.liferay.expando.kernel.model.ExpandoColumn> getColumns(
308                    long companyId, java.lang.String className, java.lang.String tableName,
309                    java.util.Collection<java.lang.String> columnNames) {
310                    return getService()
311                                       .getColumns(companyId, className, tableName, columnNames);
312            }
313    
314            public static java.util.List<com.liferay.expando.kernel.model.ExpandoColumn> getColumns(
315                    long companyId, long classNameId, java.lang.String tableName) {
316                    return getService().getColumns(companyId, classNameId, tableName);
317            }
318    
319            public static java.util.List<com.liferay.expando.kernel.model.ExpandoColumn> getColumns(
320                    long companyId, long classNameId, java.lang.String tableName,
321                    java.util.Collection<java.lang.String> names) {
322                    return getService().getColumns(companyId, classNameId, tableName, names);
323            }
324    
325            public static java.util.List<com.liferay.expando.kernel.model.ExpandoColumn> getColumns(
326                    long tableId) {
327                    return getService().getColumns(tableId);
328            }
329    
330            public static java.util.List<com.liferay.expando.kernel.model.ExpandoColumn> getColumns(
331                    long tableId, java.util.Collection<java.lang.String> names) {
332                    return getService().getColumns(tableId, names);
333            }
334    
335            public static java.util.List<com.liferay.expando.kernel.model.ExpandoColumn> getDefaultTableColumns(
336                    long companyId, java.lang.String className) {
337                    return getService().getDefaultTableColumns(companyId, className);
338            }
339    
340            public static java.util.List<com.liferay.expando.kernel.model.ExpandoColumn> getDefaultTableColumns(
341                    long companyId, long classNameId) {
342                    return getService().getDefaultTableColumns(companyId, classNameId);
343            }
344    
345            /**
346            * Returns a range of all the expando columns.
347            *
348            * <p>
349            * 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.
350            * </p>
351            *
352            * @param start the lower bound of the range of expando columns
353            * @param end the upper bound of the range of expando columns (not inclusive)
354            * @return the range of expando columns
355            */
356            public static java.util.List<com.liferay.expando.kernel.model.ExpandoColumn> getExpandoColumns(
357                    int start, int end) {
358                    return getService().getExpandoColumns(start, end);
359            }
360    
361            /**
362            * Returns the number of rows matching the dynamic query.
363            *
364            * @param dynamicQuery the dynamic query
365            * @return the number of rows matching the dynamic query
366            */
367            public static long dynamicQueryCount(
368                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
369                    return getService().dynamicQueryCount(dynamicQuery);
370            }
371    
372            /**
373            * Returns the number of rows matching the dynamic query.
374            *
375            * @param dynamicQuery the dynamic query
376            * @param projection the projection to apply to the query
377            * @return the number of rows matching the dynamic query
378            */
379            public static long dynamicQueryCount(
380                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
381                    com.liferay.portal.kernel.dao.orm.Projection projection) {
382                    return getService().dynamicQueryCount(dynamicQuery, projection);
383            }
384    
385            public static void deleteColumn(
386                    com.liferay.expando.kernel.model.ExpandoColumn column) {
387                    getService().deleteColumn(column);
388            }
389    
390            public static void deleteColumn(long columnId)
391                    throws com.liferay.portal.kernel.exception.PortalException {
392                    getService().deleteColumn(columnId);
393            }
394    
395            public static void deleteColumn(long companyId, java.lang.String className,
396                    java.lang.String tableName, java.lang.String name)
397                    throws com.liferay.portal.kernel.exception.PortalException {
398                    getService().deleteColumn(companyId, className, tableName, name);
399            }
400    
401            public static void deleteColumn(long companyId, long classNameId,
402                    java.lang.String tableName, java.lang.String name)
403                    throws com.liferay.portal.kernel.exception.PortalException {
404                    getService().deleteColumn(companyId, classNameId, tableName, name);
405            }
406    
407            public static void deleteColumn(long tableId, java.lang.String name) {
408                    getService().deleteColumn(tableId, name);
409            }
410    
411            public static void deleteColumns(long companyId,
412                    java.lang.String className, java.lang.String tableName)
413                    throws com.liferay.portal.kernel.exception.PortalException {
414                    getService().deleteColumns(companyId, className, tableName);
415            }
416    
417            public static void deleteColumns(long companyId, long classNameId,
418                    java.lang.String tableName)
419                    throws com.liferay.portal.kernel.exception.PortalException {
420                    getService().deleteColumns(companyId, classNameId, tableName);
421            }
422    
423            public static void deleteColumns(long tableId) {
424                    getService().deleteColumns(tableId);
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    }