deltaspike-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rafael Pestano <rmpest...@gmail.com>
Subject Re: CriteriaSupport Injection
Date Tue, 19 Jul 2016 12:39:04 GMT
Yea, I was migrating an old "utility" class to use deltaspike criteria and
just deleted it in favor of DS criteria ;)


2016-07-19 8:36 GMT-03:00 John D. Ament <johndament@apache.org>:

> I was actually just about to respond with "not sure it makes sense".
>
> The reason being, we rely on an entity manager resolver in data to
> determine which EM the repository is associated with. You would have no way
> to differentiate criteria supports per EM as a result.
>
> Plus its always better to put your DB logic in your DB tier.
>
> John
>
> On Tue, Jul 19, 2016 at 7:10 AM Rafael Pestano <rmpestano@gmail.com>
> wrote:
>
> > Answering myself, Its possible (by extending CriteriaSupportHandler) but
> > not worth, better stick with  inheritance with current api(which is
> great).
> >
> > Em seg, 18 de jul de 2016 11:28, Rafael Pestano <rmpestano@gmail.com>
> > escreveu:
> >
> > > Hi guys,
> > >
> > > For sake of simplicity, I'd like to use the following construct:
> > >
> > > @Inject
> > > CriteriaSupport<Entity> entityCriteria;
> > >
> > >
> > > Is it possible? does it make sense for you?
> > >
> > > We already do that (generic query execution) with EntityManager itself
> > but
> > > there is no criteria support.
> > >
> > > thanks in advance.
> > >
> > >
> > >
> > > --
> > > Att,
> > >
> > > Rafael M. Pestano
> > >
> > > Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
> > > http://rpestano.wordpress.com/
> > > @realpestano
> > >
> >
>



-- 
Att,

Rafael M. Pestano

Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
http://rpestano.wordpress.com/
@realpestano

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message