Package com.coroptis.cubiculus.rest.model

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


    @Override
    public Object toJava(JSONValue aValue, Class aRequestedClass) throws MapperException {
  if (aValue.isObject()) {
      final JSONObject jsonObject = (JSONObject) aValue;
      final AjProperty out = new AjProperty();
      out.setIdProperty(Helper.getIntRequired(jsonObject, "idProperty",
        "AjProperty property idProperty was not found in json data"));
      out.setName(Helper.getStringRequired(jsonObject, "name",
        "AjProperty property name was not found in json data"));
      out.setValues(new ArrayList<AjPropertyValue>());
      JSONArray array = (JSONArray) jsonObject.get("values");
      for (JSONValue jsonValue : array.getValue()) {
    out.getValues().add(
      (AjPropertyValue) JSONMapper.toJava(jsonValue, AjPropertyValue.class));
      }
      return out;
  }
  throw new MapperException("AjPropertyValue cannot map: " + aValue.getClass().getName());
View Full Code Here

TOP

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

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.