BaseDomainMapper.java 文件源码

java
阅读 36 收藏 0 点赞 0 评论 0

项目:vessl 作者:
protected void buildMap(Class<T> c) {
    if (c.isAnnotationPresent(Table.class)){
        Table table = c.getAnnotation(Table.class);
        tablename = table.name();
    }
    for (Field f : c.getDeclaredFields()) {
        if (f.isAnnotationPresent(Column.class)) {
            Column column = f.getAnnotation(Column.class);
            columnMap.put(f.getName(), column.name());
            if (f.isAnnotationPresent(Id.class)) {
                primaryKeyField = f;
                f.setAccessible(true);
                primaryKeyName = column.name();
            }
        }
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号