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();
}
}
}
}
BaseDomainMapper.java 文件源码
java
阅读 36
收藏 0
点赞 0
评论 0
项目:vessl
作者:
评论列表
文章目录