1
22
23 package com.liferay.portlet.expando.service.http;
24
25 import com.liferay.portlet.expando.service.ExpandoColumnServiceUtil;
26
27 import org.json.JSONArray;
28 import org.json.JSONObject;
29
30
74 public class ExpandoColumnServiceJSON {
75 public static JSONObject addColumn(long tableId, java.lang.String name,
76 int type)
77 throws java.rmi.RemoteException, com.liferay.portal.SystemException,
78 com.liferay.portal.PortalException {
79 com.liferay.portlet.expando.model.ExpandoColumn returnValue = ExpandoColumnServiceUtil.addColumn(tableId,
80 name, type);
81
82 return ExpandoColumnJSONSerializer.toJSONObject(returnValue);
83 }
84
85 public static void deleteColumn(long columnId)
86 throws java.rmi.RemoteException, com.liferay.portal.SystemException,
87 com.liferay.portal.PortalException {
88 ExpandoColumnServiceUtil.deleteColumn(columnId);
89 }
90
91 public static void deleteColumns(long tableId)
92 throws java.rmi.RemoteException, com.liferay.portal.SystemException,
93 com.liferay.portal.PortalException {
94 ExpandoColumnServiceUtil.deleteColumns(tableId);
95 }
96
97 public static void deleteColumns(java.lang.String className,
98 java.lang.String tableName)
99 throws java.rmi.RemoteException, com.liferay.portal.SystemException,
100 com.liferay.portal.PortalException {
101 ExpandoColumnServiceUtil.deleteColumns(className, tableName);
102 }
103
104 public static void deleteColumns(long classNameId,
105 java.lang.String tableName)
106 throws java.rmi.RemoteException, com.liferay.portal.SystemException,
107 com.liferay.portal.PortalException {
108 ExpandoColumnServiceUtil.deleteColumns(classNameId, tableName);
109 }
110
111 public static JSONObject getColumn(long columnId)
112 throws java.rmi.RemoteException, com.liferay.portal.SystemException,
113 com.liferay.portal.PortalException {
114 com.liferay.portlet.expando.model.ExpandoColumn returnValue = ExpandoColumnServiceUtil.getColumn(columnId);
115
116 return ExpandoColumnJSONSerializer.toJSONObject(returnValue);
117 }
118
119 public static JSONObject getColumn(long tableId, java.lang.String name)
120 throws java.rmi.RemoteException, com.liferay.portal.SystemException,
121 com.liferay.portal.PortalException {
122 com.liferay.portlet.expando.model.ExpandoColumn returnValue = ExpandoColumnServiceUtil.getColumn(tableId,
123 name);
124
125 return ExpandoColumnJSONSerializer.toJSONObject(returnValue);
126 }
127
128 public static JSONObject getColumn(java.lang.String className,
129 java.lang.String tableName, java.lang.String name)
130 throws java.rmi.RemoteException, com.liferay.portal.SystemException,
131 com.liferay.portal.PortalException {
132 com.liferay.portlet.expando.model.ExpandoColumn returnValue = ExpandoColumnServiceUtil.getColumn(className,
133 tableName, name);
134
135 return ExpandoColumnJSONSerializer.toJSONObject(returnValue);
136 }
137
138 public static JSONObject getColumn(long classNameId,
139 java.lang.String tableName, java.lang.String name)
140 throws java.rmi.RemoteException, com.liferay.portal.SystemException,
141 com.liferay.portal.PortalException {
142 com.liferay.portlet.expando.model.ExpandoColumn returnValue = ExpandoColumnServiceUtil.getColumn(classNameId,
143 tableName, name);
144
145 return ExpandoColumnJSONSerializer.toJSONObject(returnValue);
146 }
147
148 public static JSONArray getColumns(long tableId)
149 throws java.rmi.RemoteException, com.liferay.portal.SystemException {
150 java.util.List<com.liferay.portlet.expando.model.ExpandoColumn> returnValue =
151 ExpandoColumnServiceUtil.getColumns(tableId);
152
153 return ExpandoColumnJSONSerializer.toJSONArray(returnValue);
154 }
155
156 public static JSONArray getColumns(java.lang.String className,
157 java.lang.String tableName)
158 throws java.rmi.RemoteException, com.liferay.portal.SystemException {
159 java.util.List<com.liferay.portlet.expando.model.ExpandoColumn> returnValue =
160 ExpandoColumnServiceUtil.getColumns(className, tableName);
161
162 return ExpandoColumnJSONSerializer.toJSONArray(returnValue);
163 }
164
165 public static JSONArray getColumns(long classNameId,
166 java.lang.String tableName)
167 throws java.rmi.RemoteException, com.liferay.portal.SystemException {
168 java.util.List<com.liferay.portlet.expando.model.ExpandoColumn> returnValue =
169 ExpandoColumnServiceUtil.getColumns(classNameId, tableName);
170
171 return ExpandoColumnJSONSerializer.toJSONArray(returnValue);
172 }
173
174 public static int getColumnsCount(long tableId)
175 throws java.rmi.RemoteException, com.liferay.portal.SystemException {
176 int returnValue = ExpandoColumnServiceUtil.getColumnsCount(tableId);
177
178 return returnValue;
179 }
180
181 public static int getColumnsCount(java.lang.String className,
182 java.lang.String tableName)
183 throws java.rmi.RemoteException, com.liferay.portal.SystemException {
184 int returnValue = ExpandoColumnServiceUtil.getColumnsCount(className,
185 tableName);
186
187 return returnValue;
188 }
189
190 public static int getColumnsCount(long classNameId,
191 java.lang.String tableName)
192 throws java.rmi.RemoteException, com.liferay.portal.SystemException {
193 int returnValue = ExpandoColumnServiceUtil.getColumnsCount(classNameId,
194 tableName);
195
196 return returnValue;
197 }
198
199 public static JSONObject getDefaultTableColumn(java.lang.String className,
200 java.lang.String name)
201 throws java.rmi.RemoteException, com.liferay.portal.SystemException,
202 com.liferay.portal.PortalException {
203 com.liferay.portlet.expando.model.ExpandoColumn returnValue = ExpandoColumnServiceUtil.getDefaultTableColumn(className,
204 name);
205
206 return ExpandoColumnJSONSerializer.toJSONObject(returnValue);
207 }
208
209 public static JSONObject getDefaultTableColumn(long classNameId,
210 java.lang.String name)
211 throws java.rmi.RemoteException, com.liferay.portal.SystemException,
212 com.liferay.portal.PortalException {
213 com.liferay.portlet.expando.model.ExpandoColumn returnValue = ExpandoColumnServiceUtil.getDefaultTableColumn(classNameId,
214 name);
215
216 return ExpandoColumnJSONSerializer.toJSONObject(returnValue);
217 }
218
219 public static JSONArray getDefaultTableColumns(java.lang.String className)
220 throws java.rmi.RemoteException, com.liferay.portal.SystemException {
221 java.util.List<com.liferay.portlet.expando.model.ExpandoColumn> returnValue =
222 ExpandoColumnServiceUtil.getDefaultTableColumns(className);
223
224 return ExpandoColumnJSONSerializer.toJSONArray(returnValue);
225 }
226
227 public static JSONArray getDefaultTableColumns(long classNameId)
228 throws java.rmi.RemoteException, com.liferay.portal.SystemException {
229 java.util.List<com.liferay.portlet.expando.model.ExpandoColumn> returnValue =
230 ExpandoColumnServiceUtil.getDefaultTableColumns(classNameId);
231
232 return ExpandoColumnJSONSerializer.toJSONArray(returnValue);
233 }
234
235 public static int getDefaultTableColumnsCount(java.lang.String className)
236 throws java.rmi.RemoteException, com.liferay.portal.SystemException {
237 int returnValue = ExpandoColumnServiceUtil.getDefaultTableColumnsCount(className);
238
239 return returnValue;
240 }
241
242 public static int getDefaultTableColumnsCount(long classNameId)
243 throws java.rmi.RemoteException, com.liferay.portal.SystemException {
244 int returnValue = ExpandoColumnServiceUtil.getDefaultTableColumnsCount(classNameId);
245
246 return returnValue;
247 }
248
249 public static JSONObject updateColumn(long columnId, java.lang.String name,
250 int type)
251 throws java.rmi.RemoteException, com.liferay.portal.SystemException,
252 com.liferay.portal.PortalException {
253 com.liferay.portlet.expando.model.ExpandoColumn returnValue = ExpandoColumnServiceUtil.updateColumn(columnId,
254 name, type);
255
256 return ExpandoColumnJSONSerializer.toJSONObject(returnValue);
257 }
258 }