24.11.10

Excluding empty strings from hibernate example criterion

Hibernate example criterion is a useful tool for search functions. Altough it is highly configurable there is no built in function for exclude empty strings from your criteria. I found solutions in hibernate forums. The trick is creating your own property selector and set it to your example instance;