class generator for DAO