1.根据实体类名获取表名
Map<String, AbstractEntityPersister> m =getSessionFactory().getAllClassMetadata()
AbstractEntityPersister abstractEntityPersister = m.get(className);
2.获取实体类对应主键属性名
abstractEntityPersister.getIdentifierPropertyName()
3.获取对应数据库表主键
abstractEntityPersister.getIdentifierColumnNames();
4根据实体属性名获取对应数据库列名
abstractEntityPersister.getPropertyColumnNames(property);