Search in sources :

Example 1 with AddressImpl

use of org.apache.shindig.social.core.model.AddressImpl 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);
    }
}
Also used : JSONObject(com.liferay.portal.kernel.json.JSONObject) Address(org.apache.shindig.social.opensocial.model.Address) AddressImpl(org.apache.shindig.social.core.model.AddressImpl)

Aggregations

JSONObject (com.liferay.portal.kernel.json.JSONObject)1 AddressImpl (org.apache.shindig.social.core.model.AddressImpl)1 Address (org.apache.shindig.social.opensocial.model.Address)1