Package com.coroptis.cubiculus.rest.model

Examples of com.coroptis.cubiculus.rest.model.AjPropertiesParams


    @Override
    public Object toJava(JSONValue aValue, Class aRequestedClass) throws MapperException {
  if (aValue.isObject()) {
      JSONObject jsonObject = (JSONObject) aValue;
      // jsonObject.
      AjPropertiesParams out = new AjPropertiesParams();
      out.setYearRange((AjSelectionRange) JSONMapper.toJava(jsonObject.get("yearRange"),
        AjSelectionRange.class));
      out.setPriceRange((AjSelectionRange) JSONMapper.toJava(jsonObject.get("priceRange"),
        AjSelectionRange.class));
      out.setIdPropertyValues((List<Integer>) JSONMapper.toJava(
        jsonObject.get("idPropertyValues"), LinkedList.class));

      out.setIdPropertyValues(new ArrayList<Integer>());
      if (jsonObject.get("idPropertyValues") != null
        && jsonObject.get("idPropertyValues") instanceof JSONArray) {
    JSONArray array = (JSONArray) jsonObject.get("idPropertyValues");
    for (JSONValue jsonValue : array.getValue()) {
        out.getIdPropertyValues().add(
          (Integer) JSONMapper.toJava(jsonValue, Integer.class));
    }
      }
      return out;
  }
View Full Code Here

TOP

Related Classes of com.coroptis.cubiculus.rest.model.AjPropertiesParams

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.