protected void setIndexValue(Object object, int index) { PropertyUtils.setProperty(object, indexProperty, Integer.valueOf(index)); }
/** * Sets a property value in 'obj' using JavaBean-compatible introspection * with one addition - a property can be a dot-separated property name path. */ public void setIn(Object bean, E value) { PropertyUtils.setProperty(bean, getName(), value); }
void updateIntProperty(Component c, String property, int defaultValue) { int i = getPreference().getInt(property, defaultValue); try { PropertyUtils.setProperty(c, property, i); } catch (Throwable th) { throw new PreferenceException("Error setting property: " + property, th); } }
void injectValue(Object source, Object value) { if (!getPath().contains(ObjEntity.PATH_SEPARATOR)) { try { if (source instanceof DataObject) { ((DataObject) source).writeProperty(getPath(), value); } else { PropertyUtils.setProperty(source, getPath(), value); } } catch (CayenneRuntimeException ex) { LOGGER.warn("Failed to inject value " + value + " on path " + getPath() + " to " + source, ex); } } } }