@Override
public Object toJava(JSONValue aValue, Class aRequestedClass) throws MapperException {
if (aValue.isObject()) {
final JSONObject jsonObject = (JSONObject) aValue;
final AjPropertyValue out = new AjPropertyValue();
out.setIdPropertyValue(Helper.getIntRequired(jsonObject, "idPropertyValue",
"AjPropertyValue property idPropertyValue was not found in json data"));
out.setName(Helper.getStringRequired(jsonObject, "name",
"AjPropertyValue property name was not found in json data"));
out.setWebName(Helper.getStringRequired(jsonObject, "webName",
"AjPropertyValue property webName was not found in json data"));
out.setCount(Helper.getIntRequired(jsonObject, "count",
"AjPropertyValue property count was not found in json data"));
return out;
}
throw new MapperException("AjPropertyValue cannot map: " + aValue.getClass().getName());
}