1
22
23 package com.liferay.portlet.expando.service.http;
24
25 import com.liferay.portlet.expando.service.ExpandoRowServiceUtil;
26
27 import org.json.JSONArray;
28 import org.json.JSONObject;
29
30
74 public class ExpandoRowServiceJSON {
75 public static JSONObject addRow(long tableId)
76 throws java.rmi.RemoteException, com.liferay.portal.SystemException,
77 com.liferay.portal.PortalException {
78 com.liferay.portlet.expando.model.ExpandoRow returnValue = ExpandoRowServiceUtil.addRow(tableId);
79
80 return ExpandoRowJSONSerializer.toJSONObject(returnValue);
81 }
82
83 public static void deleteRow(long rowId)
84 throws java.rmi.RemoteException, com.liferay.portal.SystemException,
85 com.liferay.portal.PortalException {
86 ExpandoRowServiceUtil.deleteRow(rowId);
87 }
88
89 public static JSONArray getDefaultTableRows(java.lang.String className,
90 int begin, int end)
91 throws java.rmi.RemoteException, com.liferay.portal.SystemException {
92 java.util.List<com.liferay.portlet.expando.model.ExpandoRow> returnValue =
93 ExpandoRowServiceUtil.getDefaultTableRows(className, begin, end);
94
95 return ExpandoRowJSONSerializer.toJSONArray(returnValue);
96 }
97
98 public static JSONArray getDefaultTableRows(long classNameId, int begin,
99 int end)
100 throws java.rmi.RemoteException, com.liferay.portal.SystemException {
101 java.util.List<com.liferay.portlet.expando.model.ExpandoRow> returnValue =
102 ExpandoRowServiceUtil.getDefaultTableRows(classNameId, begin, end);
103
104 return ExpandoRowJSONSerializer.toJSONArray(returnValue);
105 }
106
107 public static int getDefaultTableRowsCount(java.lang.String className)
108 throws java.rmi.RemoteException, com.liferay.portal.SystemException {
109 int returnValue = ExpandoRowServiceUtil.getDefaultTableRowsCount(className);
110
111 return returnValue;
112 }
113
114 public static int getDefaultTableRowsCount(long classNameId)
115 throws java.rmi.RemoteException, com.liferay.portal.SystemException {
116 int returnValue = ExpandoRowServiceUtil.getDefaultTableRowsCount(classNameId);
117
118 return returnValue;
119 }
120
121 public static JSONArray getRows(long tableId, int begin, int end)
122 throws java.rmi.RemoteException, com.liferay.portal.SystemException {
123 java.util.List<com.liferay.portlet.expando.model.ExpandoRow> returnValue =
124 ExpandoRowServiceUtil.getRows(tableId, begin, end);
125
126 return ExpandoRowJSONSerializer.toJSONArray(returnValue);
127 }
128
129 public static JSONArray getRows(java.lang.String className,
130 java.lang.String tableName, int begin, int end)
131 throws java.rmi.RemoteException, com.liferay.portal.SystemException {
132 java.util.List<com.liferay.portlet.expando.model.ExpandoRow> returnValue =
133 ExpandoRowServiceUtil.getRows(className, tableName, begin, end);
134
135 return ExpandoRowJSONSerializer.toJSONArray(returnValue);
136 }
137
138 public static JSONArray getRows(long classNameId,
139 java.lang.String tableName, int begin, int end)
140 throws java.rmi.RemoteException, com.liferay.portal.SystemException {
141 java.util.List<com.liferay.portlet.expando.model.ExpandoRow> returnValue =
142 ExpandoRowServiceUtil.getRows(classNameId, tableName, begin, end);
143
144 return ExpandoRowJSONSerializer.toJSONArray(returnValue);
145 }
146
147 public static int getRowsCount(long tableId)
148 throws java.rmi.RemoteException, com.liferay.portal.SystemException {
149 int returnValue = ExpandoRowServiceUtil.getRowsCount(tableId);
150
151 return returnValue;
152 }
153
154 public static int getRowsCount(java.lang.String className,
155 java.lang.String tableName)
156 throws java.rmi.RemoteException, com.liferay.portal.SystemException {
157 int returnValue = ExpandoRowServiceUtil.getRowsCount(className,
158 tableName);
159
160 return returnValue;
161 }
162
163 public static int getRowsCount(long classNameId, java.lang.String tableName)
164 throws java.rmi.RemoteException, com.liferay.portal.SystemException {
165 int returnValue = ExpandoRowServiceUtil.getRowsCount(classNameId,
166 tableName);
167
168 return returnValue;
169 }
170 }