Java abstract tree with hibernate mappings