Difficulty working with JPA Criteria!

0

I'm trying to create some sort of queries with JPA's Criteria instead of hibernate, but I'm having some difficulties;

I would do so if I were to use hibernate;

if (filtro.getEstado() != null) {
                criteria.add(Restrictions.eq("estado", filtro.getEstado()));
            } 

As I will not use hibernate and yes, I will use JPA I tried to do so more is generating error as you can see in the figure below:

I'vetriedeveryway,ifyouwanttoshowhowItried,I'mgoingtoneedtosetupthequeryright.

Hereismyrepository:

CLICK HERE

    
asked by anonymous 28.01.2018 / 16:18

0 answers