This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Or any code at all which put any restrictions on the Criteria object. I don't see any, and what you post suggests that there aren't any. In other words, that's completely not surprising. And I'm not sure why you think the fact that an attribute is a boolean attribute should make a difference.