1   /**
2    * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portlet.expando.service;
24  
25  
26  /**
27   * <a href="ExpandoColumnLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
28   *
29   * <p>
30   * ServiceBuilder generated this class. Modifications in this class will be
31   * overwritten the next time is generated.
32   * </p>
33   *
34   * <p>
35   * This class provides static methods for the
36   * <code>com.liferay.portlet.expando.service.ExpandoColumnLocalService</code>
37   * bean. The static methods of this class calls the same methods of the bean
38   * instance. It's convenient to be able to just write one line to call a method
39   * on a bean instead of writing a lookup call and a method call.
40   * </p>
41   *
42   * <p>
43   * <code>com.liferay.portlet.expando.service.ExpandoColumnLocalServiceFactory</code>
44   * is responsible for the lookup of the bean.
45   * </p>
46   *
47   * @author Brian Wing Shun Chan
48   *
49   * @see com.liferay.portlet.expando.service.ExpandoColumnLocalService
50   * @see com.liferay.portlet.expando.service.ExpandoColumnLocalServiceFactory
51   *
52   */
53  public class ExpandoColumnLocalServiceUtil {
54      public static com.liferay.portlet.expando.model.ExpandoColumn addExpandoColumn(
55          com.liferay.portlet.expando.model.ExpandoColumn expandoColumn)
56          throws com.liferay.portal.SystemException {
57          ExpandoColumnLocalService expandoColumnLocalService = ExpandoColumnLocalServiceFactory.getService();
58  
59          return expandoColumnLocalService.addExpandoColumn(expandoColumn);
60      }
61  
62      public static void deleteExpandoColumn(long columnId)
63          throws com.liferay.portal.PortalException,
64              com.liferay.portal.SystemException {
65          ExpandoColumnLocalService expandoColumnLocalService = ExpandoColumnLocalServiceFactory.getService();
66  
67          expandoColumnLocalService.deleteExpandoColumn(columnId);
68      }
69  
70      public static void deleteExpandoColumn(
71          com.liferay.portlet.expando.model.ExpandoColumn expandoColumn)
72          throws com.liferay.portal.PortalException,
73              com.liferay.portal.SystemException {
74          ExpandoColumnLocalService expandoColumnLocalService = ExpandoColumnLocalServiceFactory.getService();
75  
76          expandoColumnLocalService.deleteExpandoColumn(expandoColumn);
77      }
78  
79      public static java.util.List<com.liferay.portlet.expando.model.ExpandoColumn> dynamicQuery(
80          com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
81          throws com.liferay.portal.SystemException {
82          ExpandoColumnLocalService expandoColumnLocalService = ExpandoColumnLocalServiceFactory.getService();
83  
84          return expandoColumnLocalService.dynamicQuery(queryInitializer);
85      }
86  
87      public static java.util.List<com.liferay.portlet.expando.model.ExpandoColumn> dynamicQuery(
88          com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
89          int begin, int end) throws com.liferay.portal.SystemException {
90          ExpandoColumnLocalService expandoColumnLocalService = ExpandoColumnLocalServiceFactory.getService();
91  
92          return expandoColumnLocalService.dynamicQuery(queryInitializer, begin,
93              end);
94      }
95  
96      public static com.liferay.portlet.expando.model.ExpandoColumn updateExpandoColumn(
97          com.liferay.portlet.expando.model.ExpandoColumn expandoColumn)
98          throws com.liferay.portal.SystemException {
99          ExpandoColumnLocalService expandoColumnLocalService = ExpandoColumnLocalServiceFactory.getService();
100 
101         return expandoColumnLocalService.updateExpandoColumn(expandoColumn);
102     }
103 
104     public static com.liferay.portlet.expando.model.ExpandoColumn addColumn(
105         long tableId, java.lang.String name, int type)
106         throws com.liferay.portal.PortalException,
107             com.liferay.portal.SystemException {
108         ExpandoColumnLocalService expandoColumnLocalService = ExpandoColumnLocalServiceFactory.getService();
109 
110         return expandoColumnLocalService.addColumn(tableId, name, type);
111     }
112 
113     public static void deleteColumn(long columnId)
114         throws com.liferay.portal.PortalException,
115             com.liferay.portal.SystemException {
116         ExpandoColumnLocalService expandoColumnLocalService = ExpandoColumnLocalServiceFactory.getService();
117 
118         expandoColumnLocalService.deleteColumn(columnId);
119     }
120 
121     public static void deleteColumns(long tableId)
122         throws com.liferay.portal.PortalException,
123             com.liferay.portal.SystemException {
124         ExpandoColumnLocalService expandoColumnLocalService = ExpandoColumnLocalServiceFactory.getService();
125 
126         expandoColumnLocalService.deleteColumns(tableId);
127     }
128 
129     public static void deleteColumns(java.lang.String className,
130         java.lang.String tableName)
131         throws com.liferay.portal.PortalException,
132             com.liferay.portal.SystemException {
133         ExpandoColumnLocalService expandoColumnLocalService = ExpandoColumnLocalServiceFactory.getService();
134 
135         expandoColumnLocalService.deleteColumns(className, tableName);
136     }
137 
138     public static void deleteColumns(long classNameId,
139         java.lang.String tableName)
140         throws com.liferay.portal.PortalException,
141             com.liferay.portal.SystemException {
142         ExpandoColumnLocalService expandoColumnLocalService = ExpandoColumnLocalServiceFactory.getService();
143 
144         expandoColumnLocalService.deleteColumns(classNameId, tableName);
145     }
146 
147     public static com.liferay.portlet.expando.model.ExpandoColumn getColumn(
148         long columnId)
149         throws com.liferay.portal.PortalException,
150             com.liferay.portal.SystemException {
151         ExpandoColumnLocalService expandoColumnLocalService = ExpandoColumnLocalServiceFactory.getService();
152 
153         return expandoColumnLocalService.getColumn(columnId);
154     }
155 
156     public static com.liferay.portlet.expando.model.ExpandoColumn getColumn(
157         long tableId, java.lang.String name)
158         throws com.liferay.portal.PortalException,
159             com.liferay.portal.SystemException {
160         ExpandoColumnLocalService expandoColumnLocalService = ExpandoColumnLocalServiceFactory.getService();
161 
162         return expandoColumnLocalService.getColumn(tableId, name);
163     }
164 
165     public static com.liferay.portlet.expando.model.ExpandoColumn getColumn(
166         java.lang.String className, java.lang.String tableName,
167         java.lang.String name)
168         throws com.liferay.portal.PortalException,
169             com.liferay.portal.SystemException {
170         ExpandoColumnLocalService expandoColumnLocalService = ExpandoColumnLocalServiceFactory.getService();
171 
172         return expandoColumnLocalService.getColumn(className, tableName, name);
173     }
174 
175     public static com.liferay.portlet.expando.model.ExpandoColumn getColumn(
176         long classNameId, java.lang.String tableName, java.lang.String name)
177         throws com.liferay.portal.PortalException,
178             com.liferay.portal.SystemException {
179         ExpandoColumnLocalService expandoColumnLocalService = ExpandoColumnLocalServiceFactory.getService();
180 
181         return expandoColumnLocalService.getColumn(classNameId, tableName, name);
182     }
183 
184     public static java.util.List<com.liferay.portlet.expando.model.ExpandoColumn> getColumns(
185         long tableId) throws com.liferay.portal.SystemException {
186         ExpandoColumnLocalService expandoColumnLocalService = ExpandoColumnLocalServiceFactory.getService();
187 
188         return expandoColumnLocalService.getColumns(tableId);
189     }
190 
191     public static java.util.List<com.liferay.portlet.expando.model.ExpandoColumn> getColumns(
192         java.lang.String className, java.lang.String tableName)
193         throws com.liferay.portal.SystemException {
194         ExpandoColumnLocalService expandoColumnLocalService = ExpandoColumnLocalServiceFactory.getService();
195 
196         return expandoColumnLocalService.getColumns(className, tableName);
197     }
198 
199     public static java.util.List<com.liferay.portlet.expando.model.ExpandoColumn> getColumns(
200         long classNameId, java.lang.String tableName)
201         throws com.liferay.portal.SystemException {
202         ExpandoColumnLocalService expandoColumnLocalService = ExpandoColumnLocalServiceFactory.getService();
203 
204         return expandoColumnLocalService.getColumns(classNameId, tableName);
205     }
206 
207     public static int getColumnsCount(long tableId)
208         throws com.liferay.portal.SystemException {
209         ExpandoColumnLocalService expandoColumnLocalService = ExpandoColumnLocalServiceFactory.getService();
210 
211         return expandoColumnLocalService.getColumnsCount(tableId);
212     }
213 
214     public static int getColumnsCount(java.lang.String className,
215         java.lang.String tableName) throws com.liferay.portal.SystemException {
216         ExpandoColumnLocalService expandoColumnLocalService = ExpandoColumnLocalServiceFactory.getService();
217 
218         return expandoColumnLocalService.getColumnsCount(className, tableName);
219     }
220 
221     public static int getColumnsCount(long classNameId,
222         java.lang.String tableName) throws com.liferay.portal.SystemException {
223         ExpandoColumnLocalService expandoColumnLocalService = ExpandoColumnLocalServiceFactory.getService();
224 
225         return expandoColumnLocalService.getColumnsCount(classNameId, tableName);
226     }
227 
228     public static com.liferay.portlet.expando.model.ExpandoColumn getDefaultTableColumn(
229         java.lang.String className, java.lang.String name)
230         throws com.liferay.portal.PortalException,
231             com.liferay.portal.SystemException {
232         ExpandoColumnLocalService expandoColumnLocalService = ExpandoColumnLocalServiceFactory.getService();
233 
234         return expandoColumnLocalService.getDefaultTableColumn(className, name);
235     }
236 
237     public static com.liferay.portlet.expando.model.ExpandoColumn getDefaultTableColumn(
238         long classNameId, java.lang.String name)
239         throws com.liferay.portal.PortalException,
240             com.liferay.portal.SystemException {
241         ExpandoColumnLocalService expandoColumnLocalService = ExpandoColumnLocalServiceFactory.getService();
242 
243         return expandoColumnLocalService.getDefaultTableColumn(classNameId, name);
244     }
245 
246     public static java.util.List<com.liferay.portlet.expando.model.ExpandoColumn> getDefaultTableColumns(
247         java.lang.String className) throws com.liferay.portal.SystemException {
248         ExpandoColumnLocalService expandoColumnLocalService = ExpandoColumnLocalServiceFactory.getService();
249 
250         return expandoColumnLocalService.getDefaultTableColumns(className);
251     }
252 
253     public static java.util.List<com.liferay.portlet.expando.model.ExpandoColumn> getDefaultTableColumns(
254         long classNameId) throws com.liferay.portal.SystemException {
255         ExpandoColumnLocalService expandoColumnLocalService = ExpandoColumnLocalServiceFactory.getService();
256 
257         return expandoColumnLocalService.getDefaultTableColumns(classNameId);
258     }
259 
260     public static int getDefaultTableColumnsCount(java.lang.String className)
261         throws com.liferay.portal.SystemException {
262         ExpandoColumnLocalService expandoColumnLocalService = ExpandoColumnLocalServiceFactory.getService();
263 
264         return expandoColumnLocalService.getDefaultTableColumnsCount(className);
265     }
266 
267     public static int getDefaultTableColumnsCount(long classNameId)
268         throws com.liferay.portal.SystemException {
269         ExpandoColumnLocalService expandoColumnLocalService = ExpandoColumnLocalServiceFactory.getService();
270 
271         return expandoColumnLocalService.getDefaultTableColumnsCount(classNameId);
272     }
273 
274     public static com.liferay.portlet.expando.model.ExpandoColumn updateColumn(
275         long columnId, java.lang.String name, int type)
276         throws com.liferay.portal.PortalException,
277             com.liferay.portal.SystemException {
278         ExpandoColumnLocalService expandoColumnLocalService = ExpandoColumnLocalServiceFactory.getService();
279 
280         return expandoColumnLocalService.updateColumn(columnId, name, type);
281     }
282 }