try {
((DataObject) object).writePropertyDirectly(propertyName, newValue);
}
catch (ClassCastException e) {
throw new PropertyException("Object is not a DataObject: '"
+ object.getClass().getName()
+ "'", this, object, e);
}
catch (Throwable th) {
throw new PropertyException("Error reading DataObject property: "
+ propertyName, this, object, th);
}
// TODO, Andrus, 1/22/2006 - check for the right type? DataObject never did it
// itself... Doing a check (and a conversion) may be an easy way to fix CAY-399