rhogen: use special type of class for entities and use it in method result converter