title: Set all empty strings properties to null
body: <p>I'm using Hibernate Query by Example (QbE) with a pojo that has a lot of String properties, and also other properties like Boolean, Date, etc....</p>
  
  <p>The problem is that I'm creating a search page for that entity where the user can set filters values for all fields. But if the user leaves any String field empty, Hibernate include this property into query, breaking the results.</p>
  
  <p>I know that I can check property by property to see if it is empty and exclude the property or set it as null. But this seems an ugly resolution.</p>
  
  <p>I wish to know if it is possible to check in a generic way all those String properties, and set them as null if empty. How I can do this in a more elegant manner?</p>