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
Post a Comment