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