Product.class dan List.class i almaq

 public static <T> Class<List<T>> getListClass(Class<T> cls) {

        return (Class<List<T>>) (Class<?>) List.class;

}


bu metoda Product.class gonderib List<Product>.class aliriq

istifade case i 

final List<Product> entities =

                findProduct.executeFunction(getListClass(Product.class), sqlParameterSource);

oracle bazadan data getirik ve bu list sheklidedir , ona gore de executeFunctionun ilk paramina list tipinde class gondermeliyik


QEYD : adi halda List<Product>.class yazmaq olmur error verir



Comments

Popular posts from this blog

Installation instructions for some programs on linux ubuntu

Hibernate and Application Performance

timezone ile bagli Jackson deserializableda problem