Examples of AjLegoBox


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

    @Override
    public Object toJava(JSONValue aValue, Class aRequestedClass) throws MapperException {
  if (aValue.isObject()) {
      final JSONObject jsonObject = (JSONObject) aValue;
      final AjLegoBox out = new AjLegoBox();
      out.setAvgRating(Helper.getIntRequired(jsonObject, "avgRating",
        "AjLegoBox property avgRating was not found in json data"));
      out.setBoxNo(Helper.getStringRequired(jsonObject, "boxNo",
        "AjLegoBox property boxNo was not found in json data"));
      out.setDescription(Helper.getStringRequired(jsonObject, "description",
        "AjLegoBox property description was not found in json data"));
      out.setIdBoxImage(Helper.getIntRequired(jsonObject, "idBoxImage",
        "AjLegoBox property idBoxImage was not found in json data"));
      out.setIdBuildingInstruction(Helper.getIntRequired(jsonObject, "idBuildingInstruction",
        "AjLegoBox property idBuildingInstruction was not found in json data"));
      out.setIdLegoBox(Helper.getIntRequired(jsonObject, "idLegoBox",
        "AjLegoBox property idLegoBox was not found in json data"));
      out.setImage(Helper.getStringRequired(jsonObject, "image",
        "AjLegoBox property image was not found in json data"));
      out.setImageExtension(Helper.getStringRequired(jsonObject, "imageExtension",
        "AjLegoBox property imageExtension was not found in json data"));
      out.setLink(Helper.getStringRequired(jsonObject, "link",
        "AjLegoBox property link was not found in json data"));
      out.setName(Helper.getStringRequired(jsonObject, "name",
        "AjLegoBox property name was not found in json data"));
      out.setPieces(Helper.getIntRequired(jsonObject, "pieces",
        "AjLegoBox property pieces was not found in json data"));
      out.setPrice(Helper.getIntRequired(jsonObject, "price",
        "AjLegoBox property price was not found in json data"));
      out.setReleased(Helper.getIntRequired(jsonObject, "released",
        "AjLegoBox property released was not found in json data"));
      out.setSeparator(Helper.getIntRequired(jsonObject, "separator",
        "AjLegoBox property separator was not found in json data"));
      out.setTags(Helper.getStringRequired(jsonObject, "tags",
        "AjLegoBox property tags was not found in json data"));
      return out;
  }
  throw new MapperException("AjPropertyValue cannot map: " + aValue.getClass().getName());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.