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