//noinspection unchecked
this.model = new ListDataModel<Object>((List<Object>) val);
} else if (Object[].class.isAssignableFrom(val.getClass())) {
this.model = new ArrayDataModel<Object>((Object[]) val);
} else if (val instanceof ResultSet) {
this.model = new ResultSetDataModel((ResultSet) val);
} else {
this.model = new ScalarDataModel<Object>(val);
}
}
return this.model;