Exemplo n.º 1
0
 public static String getInConditions(SataList params, String param_name) {
   StringBuffer buffer = new StringBuffer();
   buffer.append(param_name + " IN ('");
   for (int i = 0; i < params.size() - 1; i++) {
     buffer.append(params.getSataMap(i).getString(param_name)).append("','");
   }
   buffer.append(params.getSataMap(params.size() - 1).getString(param_name)).append("') ");
   return buffer.toString();
 }
Exemplo n.º 2
0
 private static JSONArray getSubJsonArray(SataList list) {
   JSONArray array = new JSONArray();
   for (int i = 0; i < list.size(); i++) {
     SataMap sataMap = list.getSataMap(i);
     JSONObject jsonObject = new JSONObject();
     jsonObject.putAll(sataMap2JSON(sataMap));
     array.add(jsonObject);
   }
   return array;
 }