Package com.fins.org.json

Examples of com.fins.org.json.JSONArray


    return bean;
  }
 
  public static JSONArray BeanList2JSONArray(List list , Class beanClass){
    Object[] info = BeanUtils.getCacheGetterMethodInfo(beanClass);
    JSONArray jsonArray=new JSONArray();
    for (int i = 0,end=list.size(); i < end; i++) {
      jsonArray.put(Bean2JSONObject(list.get(i),info));
    }
    return jsonArray;
  }
View Full Code Here


        LogHandler.error(this,e);
      }
    }

    public void initSortInfo(){
      JSONArray modelJS;
      try {
        modelJS = jsonObject.getJSONArray("sortInfo");
        if (modelJS!=null){
          for (int i=0;i<modelJS.length();i++){
            JSONObject si = modelJS.getJSONObject(i);
            sortInfo.add( ModelUtils.createSortInfo(si));
          }
        }
      } catch (JSONException e) {
        LogHandler.error(this,e);
View Full Code Here

        LogHandler.error(this,e);
      }
    }
 
    public void initFilterInfo(){
      JSONArray modelJS;
      try {
        modelJS = jsonObject.getJSONArray("filterInfo");
        if (modelJS!=null){
          for (int i=0;i<modelJS.length();i++){
            JSONObject si = modelJS.getJSONObject(i);
            filterInfo.add( ModelUtils.createFilterInfo(si));
          }
        }
      } catch (JSONException e) {
        LogHandler.error(this,e);
View Full Code Here

        LogHandler.error(this,e);
      }
    }
   
    public void initColumnInfo(){
      JSONArray modelJS;
      try {
        modelJS = jsonObject.getJSONArray("columnInfo");
        if (modelJS!=null){
          for (int i=0;i<modelJS.length();i++){
            JSONObject si = modelJS.getJSONObject(i);
            columnInfo.add(ModelUtils.createColumnInfo(si));
          }
        }
      } catch (JSONException e) {
        LogHandler.error(this,e);
View Full Code Here

 

    public void setData(List data) {
      this.data = data;
      this.dataBeanClass=null;
      setJsonData(new JSONArray(data));
     
    }
View Full Code Here

    }

   
    public List getRecordsList(String rname,Class beanClass) {
      List recordsList=null;
      JSONArray records_JS;
      try {
        records_JS = jsonObject.getJSONArray(rname);
        if (records_JS!=null){
          recordsList=new ArrayList();
          Object[] methodsInfo = BeanUtils.getCacheSetterMethodInfo(beanClass);
          for (int i=0;i<records_JS.length();i++){
            JSONObject obj_JS = records_JS.getJSONObject(i);
            recordsList.add(JSONUtils.JSONObject2Bean(obj_JS,beanClass,methodsInfo));
          }
        }
      } catch (JSONException e) {
        //LogHandler.error(this,e);
View Full Code Here

      return recordsList;
    }
   
    public List getRecordsList(String rname) {
      List recordsList=null;
      JSONArray records_JS;
      try {
        records_JS = jsonObject.getJSONArray(rname);
        if (records_JS!=null){
          recordsList=new ArrayList();
          for (int i=0;i<records_JS.length();i++){
            JSONObject obj_JS = records_JS.getJSONObject(i);
            recordsList.add(JSONUtils.JSONObject2Map(obj_JS));
          }
        }
      } catch (JSONException e) {
        //LogHandler.error(this,e);
View Full Code Here

TOP

Related Classes of com.fins.org.json.JSONArray

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.