title: How to validate objects before insert/update/delete using mybatis on dao layer
body: <p>I use mybatis, and want do domain validate on dao layer. 
  So, Is there a recommended way to validate objects before insert/update/delete?
  Typical validations I would like to do is check sizes and make sure the column uses one of the allowed values before the insert/update.</p>