}
public String getClassNameByTableName(String tableName){
EntityHolder entities=(EntityHolder) CommonUtils.getProperty(dao, "entities");
Map<Class<?>, Entity<?>> mappings=(Map<Class<?>, Entity<?>>) CommonUtils.getProperty(entities, "mappings");
Collection<Entity<?>> beanEntities=mappings.values();
Entity beanEntity=null;
for (Entity<?> entity : beanEntities) {
if(entity.getTableName().equals(tableName)){
beanEntity=entity;
break;
}
}
if(beanEntity!=null){
return beanEntity.getType().getName();
}
return null;
}