0

this is my situation :

BooleanExpression be = //a certain BooleanExpression;
@Autowired
private EntityManager em;
List<Tuple> result = (List<Tuple>) em.createQuery("select x from y where" + be);

What i would like to do is to take my BooleanExpression and to calculate it into the "where"...any suggestion?

  • What do you mean by that? Could you give us an example? – PeterRing Aug 29 '16 at 18:51
  • @PeterRing example : `//com.mysema.query.types.expr.BooleanExpression BooleanExpression be =person.office.isNull().and(person.status.eq(PersonStatus.OK)); List people = em.createNativeQuery("select * from person as p WHERE BE") // where be = where office is not null and status = 'OK' ` what i would like to do is to integrate my boolexpr "be" into my query using it as a string –  Aug 30 '16 at 08:25

0 Answers0