1
I know that using the Dynamic Instantiation of Hibernate I can instantiate an object according to a constructor.
The Problem: I need to optimize the system as much as possible, and with that ended up creating 5+ builders in the same class.
I want to know if it is possible to use the Factory standard together with Dynamic Instantiation.
HQL Atual select new br.com.domain.dto.SolicitacaoDTO(s.id, s.beneficiario.nome, s.dataRegistro, s.statusSolicitacao) from Solicitacao s
If you could use the Factory standard
select new br.com.factory.dto.SolicitacaoDTO.consulta(s.id, s.beneficiario.nome, s.dataRegistro, s.statusSolicitacao) from Solicitacao s
If you have any suggestions on how to solve this problem otherwise, I am open to suggestions or corrections.
That way you posted what I’m doing today. However the way I want (delegate to a Factory or Builder) to do is not possible.
– adelmo00