I just read hibernate reference and they say that you should use constans for HQL queries. However that is not always possible, for example if you do search function and have 10 criterias (not jpa criterias, just columns you are searching by). I bet you can do some hacky HQL that is transformed into badly performing SQL, but I feel that is not the best choice.
I do know you can use The Criteria API, but its not as powerfull as HQL and some people just don't like it (I'm one of them).
How you do it in Yours applications?
I mean code like (its just an example!)
String hql = "from Biuro where ";
List parameters = ...
if (dateFrom!=null){
hql += " dateFrom>=? ";
parameters.add(dateFrom);
}