I still can't find the equivalent operator of BINARY
in JPQL.
But there's a work around if you come across this problem :
In JPA, just use em.createNativeQuery()
and you may use SQL and thus you can use BINARY
operator.
Like this:
em.createNativeQuery("SELECT * FROM Student WHERE name=binary'"+ stuName+"'").getResultList();
Just provide those who have the same problem a solution.