title: Hibernate Criteria order by a specific state
body: <p>Hi
  In the database, we have a PRSN_ADDRESS table which has many addresses. A user is shown these addresses in a grid. The requirement is show the addresses associated with this user's state first and then show all other states.</p>
  
  <p>For example, say the table has 10 records with 5 of the addresses having state as Maryland, 2 from PA and 3 from NJ. Now if the user is associated with Maryland, we need to show all the 10 addresses, but Maryland addresses should show up in the first five and then the other 5 in any order.</p>
  
  <p>We are using Hibernate Criteria. I haven't worked on Formulas and not sure if that would help solve the problem. It would be great if anyone can point me in the right direction. I appreciate that.</p>
  
  <p>Thanks</p>
  
  <p>Harish</p>