public class Config extends Object
| Constructor and Description |
|---|
Config() |
| Modifier and Type | Method and Description |
|---|---|
String |
getCatalog() |
String |
getIdentity()
获取主键自增回写SQL
|
List<Class> |
getMappers() |
String |
getPrefix()
获取表前缀,带catalog或schema
|
String |
getSchema() |
String |
getSeqFormat()
获取序列格式化模板
|
Style |
getStyle() |
String |
getUuid() |
String |
getUUID()
获取UUID生成规则
|
String |
getWrapKeyword() |
boolean |
isBefore() |
boolean |
isBEFORE() |
boolean |
isCheckEntityClass() |
boolean |
isEnableMethodAnnotation() |
boolean |
isEnumAsSimpleType() |
boolean |
isNotEmpty() |
boolean |
isUseSimpleType() |
void |
setBefore(boolean before) |
void |
setBEFORE(boolean BEFORE) |
void |
setCatalog(String catalog)
设置全局的catalog,默认为空,如果设置了值,操作表时的sql会是catalog.tablename
|
void |
setCheckEntityClass(boolean checkEntityClass) |
void |
setEnableMethodAnnotation(boolean enableMethodAnnotation) |
void |
setEnumAsSimpleType(boolean enumAsSimpleType) |
void |
setIdentity(String IDENTITY)
主键自增回写方法,默认值MYSQL,详细说明请看文档
|
void |
setMappers(List<Class> mappers) |
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,3分别为SequenceName,ColumnName, PropertyName,TableName
|
void |
setStyle(Style style) |
void |
setUseSimpleType(boolean useSimpleType) |
void |
setUuid(String uuid) |
void |
setUUID(String UUID)
设置UUID生成策略
配置UUID生成策略需要使用OGNL表达式
默认值32位长度:@java.util.UUID@randomUUID().toString().replace("-", "")
|
void |
setWrapKeyword(String wrapKeyword) |
public static final String PREFIX
public String getCatalog()
public void setCatalog(String catalog)
catalog - stringpublic String getIdentity()
public void setIdentity(String IDENTITY)
IDENTITY - stringpublic String getPrefix()
public String getSchema()
public void setSchema(String schema)
schema - schemapublic String getSeqFormat()
public void setSeqFormat(String seqFormat)
seqFormat - sqlpublic Style getStyle()
public void setStyle(Style style)
public String getUUID()
public void setUUID(String UUID)
UUID - idpublic String getWrapKeyword()
public void setWrapKeyword(String wrapKeyword)
public boolean isBEFORE()
public void setBEFORE(boolean BEFORE)
public boolean isCheckEntityClass()
public void setCheckEntityClass(boolean checkEntityClass)
public boolean isEnableMethodAnnotation()
public void setEnableMethodAnnotation(boolean enableMethodAnnotation)
public boolean isEnumAsSimpleType()
public void setEnumAsSimpleType(boolean enumAsSimpleType)
public boolean isNotEmpty()
public void setNotEmpty(boolean notEmpty)
public boolean isUseSimpleType()
public void setUseSimpleType(boolean useSimpleType)
public void setOrder(String order)
order - stringpublic String getUuid()
public void setUuid(String uuid)
public boolean isBefore()
public void setBefore(boolean before)
public void setProperties(Properties properties)
properties - 属性Copyright © 2020. All rights reserved.