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="ExpandoColumnServiceUtil.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.ExpandoColumnService</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.ExpandoColumnServiceFactory</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.ExpandoColumnService
50   * @see com.liferay.portlet.expando.service.ExpandoColumnServiceFactory
51   *
52   */
53  public class ExpandoColumnServiceUtil {
54      public static com.liferay.portlet.expando.model.ExpandoColumn addColumn(
55          long tableId, java.lang.String name, int type)
56          throws com.liferay.portal.PortalException,
57              com.liferay.portal.SystemException, java.rmi.RemoteException {
58          ExpandoColumnService expandoColumnService = ExpandoColumnServiceFactory.getService();
59  
60          return expandoColumnService.addColumn(tableId, name, type);
61      }
62  
63      public static void deleteColumn(long columnId)
64          throws com.liferay.portal.PortalException,
65              com.liferay.portal.SystemException, java.rmi.RemoteException {
66          ExpandoColumnService expandoColumnService = ExpandoColumnServiceFactory.getService();
67  
68          expandoColumnService.deleteColumn(columnId);
69      }
70  
71      public static void deleteColumns(long tableId)
72          throws com.liferay.portal.PortalException,
73              com.liferay.portal.SystemException, java.rmi.RemoteException {
74          ExpandoColumnService expandoColumnService = ExpandoColumnServiceFactory.getService();
75  
76          expandoColumnService.deleteColumns(tableId);
77      }
78  
79      public static void deleteColumns(java.lang.String className,
80          java.lang.String tableName)
81          throws com.liferay.portal.PortalException,
82              com.liferay.portal.SystemException, java.rmi.RemoteException {
83          ExpandoColumnService expandoColumnService = ExpandoColumnServiceFactory.getService();
84  
85          expandoColumnService.deleteColumns(className, tableName);
86      }
87  
88      public static void deleteColumns(long classNameId,
89          java.lang.String tableName)
90          throws com.liferay.portal.PortalException,
91              com.liferay.portal.SystemException, java.rmi.RemoteException {
92          ExpandoColumnService expandoColumnService = ExpandoColumnServiceFactory.getService();
93  
94          expandoColumnService.deleteColumns(classNameId, tableName);
95      }
96  
97      public static com.liferay.portlet.expando.model.ExpandoColumn getColumn(
98          long columnId)
99          throws com.liferay.portal.PortalException,
100             com.liferay.portal.SystemException, java.rmi.RemoteException {
101         ExpandoColumnService expandoColumnService = ExpandoColumnServiceFactory.getService();
102 
103         return expandoColumnService.getColumn(columnId);
104     }
105 
106     public static com.liferay.portlet.expando.model.ExpandoColumn getColumn(
107         long tableId, java.lang.String name)
108         throws com.liferay.portal.PortalException,
109             com.liferay.portal.SystemException, java.rmi.RemoteException {
110         ExpandoColumnService expandoColumnService = ExpandoColumnServiceFactory.getService();
111 
112         return expandoColumnService.getColumn(tableId, name);
113     }
114 
115     public static com.liferay.portlet.expando.model.ExpandoColumn getColumn(
116         java.lang.String className, java.lang.String tableName,
117         java.lang.String name)
118         throws com.liferay.portal.PortalException,
119             com.liferay.portal.SystemException, java.rmi.RemoteException {
120         ExpandoColumnService expandoColumnService = ExpandoColumnServiceFactory.getService();
121 
122         return expandoColumnService.getColumn(className, tableName, name);
123     }
124 
125     public static com.liferay.portlet.expando.model.ExpandoColumn getColumn(
126         long classNameId, java.lang.String tableName, java.lang.String name)
127         throws com.liferay.portal.PortalException,
128             com.liferay.portal.SystemException, java.rmi.RemoteException {
129         ExpandoColumnService expandoColumnService = ExpandoColumnServiceFactory.getService();
130 
131         return expandoColumnService.getColumn(classNameId, tableName, name);
132     }
133 
134     public static java.util.List<com.liferay.portlet.expando.model.ExpandoColumn> getColumns(
135         long tableId)
136         throws com.liferay.portal.SystemException, java.rmi.RemoteException {
137         ExpandoColumnService expandoColumnService = ExpandoColumnServiceFactory.getService();
138 
139         return expandoColumnService.getColumns(tableId);
140     }
141 
142     public static java.util.List<com.liferay.portlet.expando.model.ExpandoColumn> getColumns(
143         java.lang.String className, java.lang.String tableName)
144         throws com.liferay.portal.SystemException, java.rmi.RemoteException {
145         ExpandoColumnService expandoColumnService = ExpandoColumnServiceFactory.getService();
146 
147         return expandoColumnService.getColumns(className, tableName);
148     }
149 
150     public static java.util.List<com.liferay.portlet.expando.model.ExpandoColumn> getColumns(
151         long classNameId, java.lang.String tableName)
152         throws com.liferay.portal.SystemException, java.rmi.RemoteException {
153         ExpandoColumnService expandoColumnService = ExpandoColumnServiceFactory.getService();
154 
155         return expandoColumnService.getColumns(classNameId, tableName);
156     }
157 
158     public static int getColumnsCount(long tableId)
159         throws com.liferay.portal.SystemException, java.rmi.RemoteException {
160         ExpandoColumnService expandoColumnService = ExpandoColumnServiceFactory.getService();
161 
162         return expandoColumnService.getColumnsCount(tableId);
163     }
164 
165     public static int getColumnsCount(java.lang.String className,
166         java.lang.String tableName)
167         throws com.liferay.portal.SystemException, java.rmi.RemoteException {
168         ExpandoColumnService expandoColumnService = ExpandoColumnServiceFactory.getService();
169 
170         return expandoColumnService.getColumnsCount(className, tableName);
171     }
172 
173     public static int getColumnsCount(long classNameId,
174         java.lang.String tableName)
175         throws com.liferay.portal.SystemException, java.rmi.RemoteException {
176         ExpandoColumnService expandoColumnService = ExpandoColumnServiceFactory.getService();
177 
178         return expandoColumnService.getColumnsCount(classNameId, tableName);
179     }
180 
181     public static com.liferay.portlet.expando.model.ExpandoColumn getDefaultTableColumn(
182         java.lang.String className, java.lang.String name)
183         throws com.liferay.portal.PortalException,
184             com.liferay.portal.SystemException, java.rmi.RemoteException {
185         ExpandoColumnService expandoColumnService = ExpandoColumnServiceFactory.getService();
186 
187         return expandoColumnService.getDefaultTableColumn(className, name);
188     }
189 
190     public static com.liferay.portlet.expando.model.ExpandoColumn getDefaultTableColumn(
191         long classNameId, java.lang.String name)
192         throws com.liferay.portal.PortalException,
193             com.liferay.portal.SystemException, java.rmi.RemoteException {
194         ExpandoColumnService expandoColumnService = ExpandoColumnServiceFactory.getService();
195 
196         return expandoColumnService.getDefaultTableColumn(classNameId, name);
197     }
198 
199     public static java.util.List<com.liferay.portlet.expando.model.ExpandoColumn> getDefaultTableColumns(
200         java.lang.String className)
201         throws com.liferay.portal.SystemException, java.rmi.RemoteException {
202         ExpandoColumnService expandoColumnService = ExpandoColumnServiceFactory.getService();
203 
204         return expandoColumnService.getDefaultTableColumns(className);
205     }
206 
207     public static java.util.List<com.liferay.portlet.expando.model.ExpandoColumn> getDefaultTableColumns(
208         long classNameId)
209         throws com.liferay.portal.SystemException, java.rmi.RemoteException {
210         ExpandoColumnService expandoColumnService = ExpandoColumnServiceFactory.getService();
211 
212         return expandoColumnService.getDefaultTableColumns(classNameId);
213     }
214 
215     public static int getDefaultTableColumnsCount(java.lang.String className)
216         throws com.liferay.portal.SystemException, java.rmi.RemoteException {
217         ExpandoColumnService expandoColumnService = ExpandoColumnServiceFactory.getService();
218 
219         return expandoColumnService.getDefaultTableColumnsCount(className);
220     }
221 
222     public static int getDefaultTableColumnsCount(long classNameId)
223         throws com.liferay.portal.SystemException, java.rmi.RemoteException {
224         ExpandoColumnService expandoColumnService = ExpandoColumnServiceFactory.getService();
225 
226         return expandoColumnService.getDefaultTableColumnsCount(classNameId);
227     }
228 
229     public static com.liferay.portlet.expando.model.ExpandoColumn updateColumn(
230         long columnId, java.lang.String name, int type)
231         throws com.liferay.portal.PortalException,
232             com.liferay.portal.SystemException, java.rmi.RemoteException {
233         ExpandoColumnService expandoColumnService = ExpandoColumnServiceFactory.getService();
234 
235         return expandoColumnService.updateColumn(columnId, name, type);
236     }
237 }