use of org.apache.shindig.social.opensocial.model.Address in project liferay-ide by liferay.
the class SerializerUtil method setBeanProperty.
protected static void setBeanProperty(Object bean, String fieldName, String value) throws JSONException {
if (Validator.isNull(value)) {
return;
}
if (fieldName.equals("location")) {
JSONObject jsonObject = JSONFactoryUtil.createJSONObject(value);
Address address = new AddressImpl();
copyProperties(jsonObject, address, _ADDRESS_FIELDS);
BeanPropertiesUtil.setProperty(bean, fieldName, address);
} else {
BeanPropertiesUtil.setProperty(bean, fieldName, value);
}
}
Aggregations