* @throws java.lang.IllegalAccessException If the method cannot be accessed
* @throws java.lang.reflect.InvocationTargetException Some other problems?
*/
- protected void setField (final FrameworkInterface instance, final String targetClass, final String methodName, final String value) throws NoSuchMethodException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
+ protected void setField (final FrameworkInterface instance, final String targetClass, final String methodName, final Object value) throws NoSuchMethodException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
// Trace messahe
this.getLogger().trace(MessageFormat.format("targetClass={0},methodName={1},value={2}", targetClass, methodName, value)); //NOI18N
* @throws java.lang.IllegalAccessException If the setter cannot be accessed
* @throws java.lang.reflect.InvocationTargetException Any other problem?
*/
- protected void setValueInStoreableFromColumn (final Storeable instance, final String targetClass, final String columnName, final String value) throws NoSuchMethodException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
+ protected void setValueInStoreableFromColumn (final Storeable instance, final String targetClass, final String columnName, final Object value) throws NoSuchMethodException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
// Trace message
this.getLogger().trace("instance=" + instance + ",targetClass=" + targetClass + ",columnName=" + columnName + ",value=" + value + " - CALLED!");
this.getLogger().debug("Column " + columnName + " represents a boolean field.");
// Yes, then call other method
- this.setBooleanField(instance, targetClass, this.convertColumnNameToSetterMethod(columnName), Boolean.parseBoolean(value));
+ this.setBooleanField(instance, targetClass, this.convertColumnNameToSetterMethod(columnName), (Boolean) value);
}
// Convert column name to field name
}
@Override
- public void setValueFromColumn (final String columnName, String value) {
- throw new UnsupportedOperationException("Not supported yet: columnName=" + columnName + ",value=" + value);
+ public void setValueFromColumn (final String columnName, final Object value) throws NoSuchMethodException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
+ // Trace message
+ this.getLogger().trace(MessageFormat.format("columnName={0},value={1} - CALLED!", columnName, value));
+
+ // Call super method
+ this.setValueInStoreableFromColumn(this, "BaseContact", columnName, value);
+
+ // Trace message
+ this.getLogger().trace("EXIT!");
}
}
* @throws java.lang.IllegalAccessException If the method cannot be accessed
* @throws java.lang.reflect.InvocationTargetException Any other problems?
*/
- public void setValueFromColumn (final String columnName, final String value) throws NoSuchMethodException, IllegalAccessException, IllegalArgumentException, InvocationTargetException;
+ public void setValueFromColumn (final String columnName, final Object value) throws NoSuchMethodException, IllegalAccessException, IllegalArgumentException, InvocationTargetException;
}