| 程序包 | 说明 |
|---|---|
| com.domeke.core.tablebind | |
| com.jfinal.plugin.activerecord |
| 限定符和类型 | 类和说明 |
|---|---|
class |
AutoTableBindPlugin
SimpleNameStyles 中已有的命名风格以及映射的表明如下表: DEFAULT FIRST_LOWER UP LOWER UP_UNDERLINE LOWER_UNDERLINE
DevInfo.java DevInfo devInfo DEVINFO devinfo DEV_INFO dev_info ParamNameStyles 含有构造参数的命名风格:
module(test) lowerModule(test) upModule(test) upUnderlineModule(test) lowerUnderlineModule(test)
DevInfo.java test_DevInfo test_devinfo test_DEVINFO test_DEV_INFO test_dev_info
当model到表的映射不符合规范需要单独配置,需要在model上加上TableName注解 例如:@TableBind(tableName = "user", pkName =
"userid")
|
| 限定符和类型 | 方法和说明 |
|---|---|
ActiveRecordPlugin |
ActiveRecordPlugin.addMapping(String tableName,
Class<? extends Model<?>> modelClass) |
ActiveRecordPlugin |
ActiveRecordPlugin.addMapping(String tableName,
String primaryKey,
Class<? extends Model<?>> modelClass) |
ActiveRecordPlugin |
ActiveRecordPlugin.setCache(ICache cache) |
ActiveRecordPlugin |
ActiveRecordPlugin.setContainerFactory(IContainerFactory containerFactory) |
ActiveRecordPlugin |
ActiveRecordPlugin.setDevMode(boolean devMode) |
ActiveRecordPlugin |
ActiveRecordPlugin.setDialect(Dialect dialect) |
ActiveRecordPlugin |
ActiveRecordPlugin.setShowSql(boolean showSql) |
ActiveRecordPlugin |
ActiveRecordPlugin.setTransactionLevel(int transactionLevel)
Set transaction level define in java.sql.Connection
|
Copyright © 2015. All rights reserved.