2.4.2 @PrimaryKeyField
在实合格bean和数据库对照过程中,数据库机制需要识别主键,所以需要我们在主键的对应属性的Geter方法中加上@PrimaryKeyFiled注解,如: private Integer brand_id @PrimaryKeyField
public Integer getBrand_id() { return brand_id; }
3 数据导入
3.1 导入接口
DBSolutionFactory.dbImport(\oupon/add.xml\,\);
3.2 数据Xml文件说明 3.2.1 创建表
3.2.2 删除表
3.2.3 添加、删除列
3.2.4 创建索引
3.2.5 删除索引
3.2.6 插入数据
3.2.7 删除数据
暂未支持
3.2.8 更新数据
暂未支持
3.3 数据类型对照表
xml int int(1) memo datetime long decimal int smallint(1) text datetime bigint decimal Mysql Oracle NUMBER NUMBER(2) CLOB TIMESTAMP NUMBER NUMBER(20,2) SqlServer smallint int text datetime bigint decimal
4 数据导出
String[] tables = new String[1]; tables[0] = \;
DBSolutionFactory.dbExport(tables, false, \)
5 常用方法介绍
5.1 上下文获取
参见:
http://www.javamall.com.cn/developer_help/index.php/常用方法
5.2 地区联动下拉框
1.如果是在jsp 中:
2.如果是在Freemarker的html中:
<#assign RegionSelect=
\ive\
<@RegionSelect />
以上两种方式均支持以下参数:
province_id:省id
city_id:市id region_id:区id
如果指定上述参数,则默认选中
5.3 客户端校验
EOP自动为应用提供表单校验功能,通过指定form样式名和指定表单项特定属性的方式来完成。
5.3.1 示例
代码示例