How can one map an complex hierarchy of Java POJO to database tables?