} else if (itemsObject instanceof List) {
result = new ListDataModel((List<Object>) itemsObject);
} else if (itemsObject instanceof Result) {
result = new ResultDataModel((Result) itemsObject);
} else if (itemsObject instanceof ResultSet) {
result = new ResultSetDataModel((ResultSet) itemsObject);
} else if (itemsObject != null) {
List<Object> temp = new ArrayList<Object>();
Iterator<Object> iterator = ((Iterable<Object>) itemsObject).iterator();
while (iterator.hasNext()) {
temp.add(iterator.next());