xUtils系列之DbUtils-Column注解
来源:互联网 发布:vb精简版6.0怎么安装 编辑:程序博客网 时间:2024/05/19 02:25
Column注解定义:
DbUtils解析部分:
注意:
1.@Column不填参数是,列名为字段名
用法:
@Target(ElementType.FIELD)@Retention(RetentionPolicy.RUNTIME)public @interface Column { String column() default ""; String defaultValue() default "";}
DbUtils解析部分:
Collection<Column> columns = table.columnMap.values();for (Column column : columns) { if (column instanceof Finder) { continue; } sqlBuffer.append("\"").append(column.getColumnName()).append("\" "); sqlBuffer.append(column.getColumnDbType()); sqlBuffer.append(",");}sqlBuffer.deleteCharAt(sqlBuffer.length() - 1);sqlBuffer.append(" )");
注意:
1.@Column不填参数是,列名为字段名
用法:
@Column(column="age",defaultValue="20")private int age;//@Column//private int age;
0 0
- xUtils系列之DbUtils-Column注解
- xUtils系列之DbUtils-Id,NoAutoIncrement注解
- xUtils系列之DbUtils-Check注解
- xUtils系列之DbUtils-Table注解
- xUtils系列之DbUtils-Transient注解
- xUtils系列之DbUtils-Unique注解
- xUtils系列之DbUtils-NotNull注解
- xUtils系列之DbUtils-Foreign注解
- xUtils系列之DbUtils-Finder注解
- xUtils系列之DbUtils-概览
- xUtils系列之DbUtils-查询
- xUtils系列之DbUtils-保存自定义类型
- xUtils系列之DbUtils-保存自定义类型
- xUtils框架之DbUtils
- xUtils系列之DbUtils-开启Sqlite3外键约束
- xUtils系列之DbUtils-增,删,更新,替换操作
- xUtils系列之ViewUtils-ContentView注解
- xUtils系列之ViewUtils-PreferenceInject注解
- Android AsyncTask cannot resolve CalledFromWrongThreadException问题解决方案
- day20/SplitFile.java
- 家用电脑安装多系统
- &与&&的区别
- JavaScript学习笔记之Array类型与String类型
- xUtils系列之DbUtils-Column注解
- securecrt vim 颜色高亮问题
- inside sql server 2008 - logical query processing
- Linux下移动virtualbox虚拟硬盘丢失eth0
- 第一次实际地使用git
- day21/ByteArrayStream.java
- 设计模式(8)——Composite(组合)模式
- day21/DataStreamDemo.java
- 206 Reverse Linked List