GenericTypes

dla: public abstract class BaseService<DTO extends GenericDto<T>, T extends BaseEntity>

rozwiązanie 1:

public BaseService(Class<DTO> dtoClass, Class<T> jpaClass) {
super();
this.dtoClass = dtoClass;
this.jpaClass = jpaClass;
}

rozwiązanie 2:

(Class<DTO>)((ParameterizedType)superclass).getActualTypeArguments()[0];

(Class<T>)((ParameterizedType)superclass).getActualTypeArguments()[1];

Reklamy

Linki do stron: DTO

http://pl.wikipedia.org/wiki/Data_Access_Object

http://beniaminzaborski.wordpress.com/tag/data-transfer-object/

http://symolon.eu/tag/dto/

http://www.goldenline.pl/forum/1044596/transfer-object-to-dto-obiekt-transferujacy-transfer-object

http://www.pzielinski.com/?p=336