public class Config extends Object
| 构造器和说明 |
|---|
Config() |
| 限定符和类型 | 方法和说明 |
|---|---|
String |
getCatalog() |
String |
getIDENTITY()
获取主键自增回写SQL
|
String |
getPrefix()
获取表前缀,带catalog或schema
|
String |
getSchema() |
String |
getSeqFormat()
获取序列格式化模板
|
Style |
getStyle() |
String |
getUUID()
获取UUID生成规则
|
boolean |
isBEFORE()
获取SelectKey的Order
|
boolean |
isNotEmpty() |
void |
setBEFORE(boolean BEFORE) |
void |
setCatalog(String catalog)
设置全局的catalog,默认为空,如果设置了值,操作表时的sql会是catalog.tablename
|
void |
setIDENTITY(String IDENTITY)
主键自增回写方法,默认值MYSQL,详细说明请看文档
|
void |
setNotEmpty(boolean notEmpty) |
void |
setOrder(String order)
主键自增回写方法执行顺序,默认AFTER,可选值为(BEFORE|AFTER)
|
void |
setProperties(Properties properties)
配置属性
|
void |
setSchema(String schema)
设置全局的schema,默认为空,如果设置了值,操作表时的sql会是schema.tablename
如果同时设置了catalog,优先使用catalog.tablename |
void |
setSeqFormat(String seqFormat)
序列的获取规则,使用{num}格式化参数,默认值为{0}.nextval,针对Oracle
可选参数一共3个,对应0,1,2,分别为SequenceName,ColumnName, PropertyName |
void |
setStyle(Style style) |
void |
setUUID(String UUID)
设置UUID生成策略
配置UUID生成策略需要使用OGNL表达式 默认值32位长度:@java.util.UUID@randomUUID().toString().replace("-", "") |
public boolean isBEFORE()
public void setBEFORE(boolean BEFORE)
public void setOrder(String order)
order - public String getCatalog()
public void setCatalog(String catalog)
catalog - public String getIDENTITY()
public void setIDENTITY(String IDENTITY)
IDENTITY - public String getSchema()
public void setSchema(String schema)
schema - public String getSeqFormat()
public void setSeqFormat(String seqFormat)
seqFormat - public String getUUID()
public void setUUID(String UUID)
UUID - public boolean isNotEmpty()
public void setNotEmpty(boolean notEmpty)
public Style getStyle()
public void setStyle(Style style)
public String getPrefix()
public void setProperties(Properties properties)
properties - Copyright © 2015. All rights reserved.