add genType to BaseDao , extract common methods