public void setPropertyValue(Object entity, String name, Object value) { Property property = reflection.findSerializableProperty(entity.getClass(), name); if (property == null) throw new RuntimeException("Property " + name + " not found on object " + entity); try { property.setObject(entity, value); } catch (Exception e) { throw new RuntimeException("Could not set " + property + " of object " + entity, e); } }
public void setPropertyValue(Object entity, String name, Object value) { Property property = reflection.findSerializableProperty(entity.getClass(), name); try { property.setObject(entity, value); } catch (Exception e) { throw new RuntimeException("Could not set " + property + " of object " + entity); } }
public void setPropertyValue(Object entity, String name, Object value) { Property property = reflection.findSerializableProperty(entity.getClass(), name); if (property == null) throw new RuntimeException("Property " + name + " not found on object " + entity); try { property.setObject(entity, value); } catch (Exception e) { throw new RuntimeException("Could not set " + property + " of object " + entity, e); } }
public Object getPropertyValue(Object entity, String name, boolean raw) { Property property = reflection.findSerializableProperty(entity.getClass(), name); if (property == null) throw new RuntimeException("Property " + name + " not found on object " + entity); try { return raw ? property.getRawObject(entity) : property.getObject(entity); } catch (Exception e) { throw new RuntimeException("Could not get " + property + " of object " + entity, e); } }
public Object getPropertyValue(Object entity, String name, boolean raw) { Property property = reflection.findSerializableProperty(entity.getClass(), name); if (property == null) throw new RuntimeException("Property " + name + " not found on object " + entity); try { return raw ? property.getRawObject(entity) : property.getObject(entity); } catch (Exception e) { throw new RuntimeException("Could not get " + property + " of object " + entity, e); } }
public Object getPropertyValue(Object entity, String name, boolean raw) { Property property = reflection.findSerializableProperty(entity.getClass(), name); try { return raw ? property.getRawObject(entity) : property.getObject(entity); } catch (Exception e) { throw new RuntimeException("Could not get " + property + " of object " + entity); } }