} else if (value instanceof ResultSet) {
model = new ResultSetDataModel((ResultSet) value);
} else if (value instanceof Result) {
model = new ResultDataModel((Result) value);
} else if (value instanceof Collection) {
model = new CollectionDataModel((Collection) value);
} else {
model = new ScalarDataModel(value);
}
return model;