changed PersistentEntity to groovy