Example 类的作用
来源:互联网 发布:java ftp上传文件 0kb 编辑:程序博客网 时间:2024/06/08 06:16
ibator工具会自动生成一些以example结尾的类,下面陈述这些类的作用。
首先说明什么是BLOB字段,BLOB通常是binary large object 或者basic large object 的简称,这些字段用于存储像图片、视频、音频或者其他多媒体资料。
example class 用于确定如何构建一个where语句。(每个非blob类型的字段都可以出现在where语句中)
每个example对象里头都有一个Criteria对象的列表,每一个Criteria对象代表一个where语句中的条件,这一组Criteria对象就组成了一个完整的where语句。
请看示例:
TestTableExample example = new TestTableExample();
example.createCriteria().andField1EqualTo(5);
上面的例子生成的where语句为:
where field1 = 5
××××××××××××
另一个示例:
TestTableExample example = new TestTableExample();
example.createCriteria()
.andField1EqualTo(5)
.andField2IsNull();
example.or(example.createCriteria()
.andField3NotEqualTo(9)
.andField4IsNotNull());
List<Integer> field5Values = new ArrayList<Integer>();
field5Values.add(8);
field5Values.add(11);
field5Values.add(14);
field5Values.add(22);
example.or(example.createCriteria()
.andField5In(field5Values));
example.or(example.createCriteria()
.andField6Between(3, 7));
得到的where语句为:
where (field1 = 5 and field2 is null)
or (field3 <> 9 and field4 is not null)
or (field5 in (8, 11, 14, 22))
or (field6 between 3 and 7)
- Example 类的作用
- Ibatis 的 Example 类的使用
- MyBatis Generator产生的Example类
- MyBatis Generator产生的Example类
- MyBatis Generator产生的Example类
- MyBatis Generator产生的Example类
- MyBatis Generator产生的Example类
- MyBatis Generator产生的Example类
- MyBatis Generator产生的Example类
- MyBatis Generator产生的Example类
- MyBatis Generator产生的Example类
- MyBatis Generator产生的Example类
- Mybatis中example类的使用
- Mybatis中example类的使用
- 逆向工程的Example类用法
- MyBatis Generator产生的Example类说明
- ###逆向工程的Example类用法==注意:【没写example.createCriteria();执行selectByExample(example)表示:查询全部】
- 一个getsockopt的Example
- 阻止putty变成inactive
- JAVA与C++区别(二)
- 硝烟中的scrum和xp
- AJAX 学习笔记--$的用法
- jQuery中this与$(this)的区别
- Example 类的作用
- 声明变量时是否使用var的不同
- ESL学习笔记
- AJAX 学习笔记--patter
- java文件中为什么会有serialVersionUID
- date,datetime,timestamp 的区别
- css 中的元素定位 (position 元素)
- CSS 的框模型
- css 分类