/** * <p>Copy the column values for each row in the specified * <code>ResultSet</code> into a newly created {@link DynaBean}, and add * this bean to the list of {@link DynaBean}s that will later by * returned by a call to <code>getRows()</code>.</p> * * @param resultSet The <code>ResultSet</code> whose data is to be * copied * * @throws SQLException if an error is encountered copying the data */ protected void copy(final ResultSet resultSet) throws SQLException { int cnt = 0; while (resultSet.next() && (limit < 0 || cnt++ < limit) ) { final DynaBean bean = createDynaBean(); for (DynaProperty propertie : properties) { final String name = propertie.getName(); final Object value = getObject(resultSet, name); bean.set(name, value); } rows.add(bean); } }
/** * <p>Copy the column values for each row in the specified * <code>ResultSet</code> into a newly created {@link DynaBean}, and add * this bean to the list of {@link DynaBean}s that will later by * returned by a call to <code>getRows()</code>.</p> * * @param resultSet The <code>ResultSet</code> whose data is to be * copied * * @throws SQLException if an error is encountered copying the data */ protected void copy(final ResultSet resultSet) throws SQLException { int cnt = 0; while (resultSet.next() && (limit < 0 || cnt++ < limit) ) { final DynaBean bean = createDynaBean(); for (DynaProperty propertie : properties) { final String name = propertie.getName(); final Object value = getObject(resultSet, name); bean.set(name, value); } rows.add(bean); } }
name + "' on bean class '" + bean.getClass() + "'"); ((DynaBean) bean).set(name, index, value); return;
((DynaBean) bean).getDynaClass() + "'" ); ((DynaBean) bean).set(name, value); return;
name + "' on bean class '" + bean.getClass() + "'"); ((DynaBean) bean).set(name, index, value); return;
name + "' on bean class '" + bean.getClass() + "'"); ((DynaBean) bean).set(name, key, value); return;
name + "' on bean class '" + bean.getClass() + "'"); ((DynaBean) bean).set(name, key, value); return;
((DynaBean) bean).getDynaClass() + "'" ); ((DynaBean) bean).set(name, value); return;
/** * Set the value for the specified property in * the decorated {@link DynaBean}. * * @param key The {@link DynaBean}'s property name * @param value The value for the specified property. * @return The previous property's value. * @throws UnsupportedOperationException if * <code>isReadOnly()</code> is true. */ public Object put(final K key, final Object value) { if (isReadOnly()) { throw new UnsupportedOperationException("Map is read only"); } final String property = toString(key); final Object previous = getDynaBean().get(property); getDynaBean().set(property, value); return previous; }
final Object value = ((DynaBean) orig).get(name); if (dest instanceof DynaBean) { ((DynaBean) dest).set(name, value); } else { setSimpleProperty(dest, name, value); try { if (dest instanceof DynaBean) { ((DynaBean) dest).set(name, entry.getValue()); } else { setSimpleProperty(dest, name, entry.getValue()); final Object value = getSimpleProperty(orig, name); if (dest instanceof DynaBean) { ((DynaBean) dest).set(name, value); } else { setSimpleProperty(dest, name, value);
/** * Set the value for the specified property in * the decorated {@link DynaBean}. * * @param key The {@link DynaBean}'s property name * @param value The value for the specified property. * @return The previous property's value. * @throws UnsupportedOperationException if * <code>isReadOnly()</code> is true. */ public Object put(final K key, final Object value) { if (isReadOnly()) { throw new UnsupportedOperationException("Map is read only"); } final String property = toString(key); final Object previous = getDynaBean().get(property); getDynaBean().set(property, value); return previous; }
final Object value = ((DynaBean) orig).get(name); if (dest instanceof DynaBean) { ((DynaBean) dest).set(name, value); } else { setSimpleProperty(dest, name, value); try { if (dest instanceof DynaBean) { ((DynaBean) dest).set(name, entry.getValue()); } else { setSimpleProperty(dest, name, entry.getValue()); final Object value = getSimpleProperty(orig, name); if (dest instanceof DynaBean) { ((DynaBean) dest).set(name, value); } else { setSimpleProperty(dest, name, value);
@Override public void set(final String name, final Object value) { fetchBean(name).set(name, value); }
@Override public void set(final String name, final int index, final Object value) { fetchBean(name).set(name, index, value); }
@Override public void set(final String name, final String key, final Object value) { fetchBean(name).set(name, key, value); }
/** * Set the value of an indexed property with the specified name. * * @param name Name of the property whose value is to be set * @param index Index of the property to be set * @param value Value to which this property is to be set */ public void set(String name, int index, Object value) { dynaBean.set(name, index, value); }
/** * Set the value of a mapped property with the specified name. * * @param name Name of the property whose value is to be set * @param key Key of the property to be set * @param value Value to which this property is to be set */ public void set(String name, String key, Object value) { dynaBean.set(name, key, value); }
/** Sets an attribute value of this tag before the tag is invoked */ public void setAttribute(String name, Object value) throws JellyTagException { getDynaBean().set(name, value); }
/** Sets an attribute value of this tag before the tag is invoked */ public void setAttribute(String name, Object value) throws JellyTagException { getDynaBean().set(name, value); }
public void setMappedValue(Object obj, String name, String key, Object value) { DynaProperty descriptor = ((DynaBean) obj).getDynaClass().getDynaProperty(name); if (descriptor == null) { throw new FieldnameNotFoundException(name); } ((DynaBean) obj).set(name, key, value); }