if ("domain_pojo.Customer".equals(objectlist.getClass().getName()))
This line is always false (and the case is same with other else IF blocks as well) as the value of objectlist.getClass()
will always be java.util.List.
You should instead pass Class<T> clazz
and use that in the comparison.
On a related note, it would be better to have the class implement some interface method that returns the file name, instead of hard-coding like this.