本文整理了Java中org.mybatis.generator.config.TableConfiguration.getProperties()
方法的一些代码示例,展示了TableConfiguration.getProperties()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TableConfiguration.getProperties()
方法的具体详情如下:
包路径:org.mybatis.generator.config.TableConfiguration
类名称:TableConfiguration
方法名:getProperties
暂无
代码示例来源:origin: org.mybatis.generator/mybatis-generator-core
public boolean isImmutable() {
Properties properties;
if (tableConfiguration.getProperties().containsKey(PropertyRegistry.ANY_IMMUTABLE)) {
properties = tableConfiguration.getProperties();
} else {
properties = context.getJavaModelGeneratorConfiguration().getProperties();
}
return isTrue(properties.getProperty(PropertyRegistry.ANY_IMMUTABLE));
}
代码示例来源:origin: handosme/mybatis-generator-plus
public boolean isImmutable() {
Properties properties;
if (tableConfiguration.getProperties().containsKey(PropertyRegistry.ANY_IMMUTABLE)) {
properties = tableConfiguration.getProperties();
} else {
properties = context.getJavaModelGeneratorConfiguration().getProperties();
}
return isTrue(properties.getProperty(PropertyRegistry.ANY_IMMUTABLE));
}
代码示例来源:origin: roncoo/roncoo-mybatis-generator
public boolean isImmutable() {
Properties properties;
if (tableConfiguration.getProperties().containsKey(PropertyRegistry.ANY_IMMUTABLE)) {
properties = tableConfiguration.getProperties();
} else {
properties = context.getJavaModelGeneratorConfiguration().getProperties();
}
return isTrue(properties.getProperty(PropertyRegistry.ANY_IMMUTABLE));
}
代码示例来源:origin: cxjava/mybatis-generator-core
public boolean isImmutable() {
Properties properties;
if (tableConfiguration.getProperties().containsKey(PropertyRegistry.ANY_IMMUTABLE)) {
properties = tableConfiguration.getProperties();
} else {
properties = context.getJavaModelGeneratorConfiguration().getProperties();
}
return isTrue(properties.getProperty(PropertyRegistry.ANY_IMMUTABLE));
}
代码示例来源:origin: roncoo/roncoo-mybatis-generator
public boolean isConstructorBased() {
if (isImmutable()) {
return true;
}
Properties properties;
if (tableConfiguration.getProperties().containsKey(PropertyRegistry.ANY_CONSTRUCTOR_BASED)) {
properties = tableConfiguration.getProperties();
} else {
properties = context.getJavaModelGeneratorConfiguration().getProperties();
}
return isTrue(properties.getProperty(PropertyRegistry.ANY_CONSTRUCTOR_BASED));
}
代码示例来源:origin: cxjava/mybatis-generator-core
public boolean isConstructorBased() {
if (isImmutable()) {
return true;
}
Properties properties;
if (tableConfiguration.getProperties().containsKey(PropertyRegistry.ANY_CONSTRUCTOR_BASED)) {
properties = tableConfiguration.getProperties();
} else {
properties = context.getJavaModelGeneratorConfiguration().getProperties();
}
return isTrue(properties.getProperty(PropertyRegistry.ANY_CONSTRUCTOR_BASED));
}
代码示例来源:origin: org.mybatis.generator/mybatis-generator-core
public boolean isConstructorBased() {
if (isImmutable()) {
return true;
}
Properties properties;
if (tableConfiguration.getProperties().containsKey(PropertyRegistry.ANY_CONSTRUCTOR_BASED)) {
properties = tableConfiguration.getProperties();
} else {
properties = context.getJavaModelGeneratorConfiguration().getProperties();
}
return isTrue(properties.getProperty(PropertyRegistry.ANY_CONSTRUCTOR_BASED));
}
代码示例来源:origin: handosme/mybatis-generator-plus
public boolean isConstructorBased() {
if (isImmutable()) {
return true;
}
Properties properties;
if (tableConfiguration.getProperties().containsKey(PropertyRegistry.ANY_CONSTRUCTOR_BASED)) {
properties = tableConfiguration.getProperties();
} else {
properties = context.getJavaModelGeneratorConfiguration().getProperties();
}
return isTrue(properties.getProperty(PropertyRegistry.ANY_CONSTRUCTOR_BASED));
}
代码示例来源:origin: org.mybatis.generator/mybatis-generator-core
private static boolean isTrimStringsEnabled(IntrospectedTable table) {
TableConfiguration tableConfiguration = table.getTableConfiguration();
String trimSpaces = tableConfiguration.getProperties().getProperty(PropertyRegistry.MODEL_GENERATOR_TRIM_STRINGS);
if (trimSpaces != null) {
return isTrue(trimSpaces);
}
return isTrimStringsEnabled(table.getContext());
}
代码示例来源:origin: lishuo9527/MybatisGenerator-UI
tableConfiguration.setSelectByExampleStatementEnabled(false);
tableConfiguration.setUpdateByExampleStatementEnabled(false);
tableConfiguration.getProperties().setProperty("useActualColumnNames", "false");
tableConfigurations.add(tableConfiguration);
代码示例来源:origin: handosme/mybatis-generator-plus
@Override
public void addElements(XmlElement parentElement, IntrospectedTable introspectedTable) {
TableConfiguration tableConfiguration = introspectedTable.getTableConfiguration();
Properties properties = tableConfiguration.getProperties();
String versionField = properties.getProperty("versionField");
if (versionField == null || versionField == "") {
代码示例来源:origin: handosme/mybatis-generator-plus
/**
* 增加数据源名称字段
*
* @author 吴帅
* @parameter @param interfaze
* @parameter @param introspectedTable
* @createDate 2015年10月2日 上午10:06:47
*/
private void addDataSourceNameField(Interface interfaze, IntrospectedTable introspectedTable) {
TableConfiguration tableConfiguration = introspectedTable.getTableConfiguration();
Properties properties = tableConfiguration.getProperties();
String dataSourceName = properties.getProperty("dataSourceName");
if (dataSourceName == null || dataSourceName == "") {
return;
}
Field field = new Field();
field.setVisibility(JavaVisibility.PUBLIC);
field.setStatic(true);
field.setFinal(true);
field.setType(FullyQualifiedJavaType.getStringInstance());
field.setName("DATA_SOURCE_NAME");
field.setInitializationString("\"" + dataSourceName + "\"");
interfaze.addField(field);
}
代码示例来源:origin: handosme/mybatis-generator-plus
@Override
public void addMethod(Interface interfaze, IntrospectedTable introspectedTable) {
TableConfiguration tableConfiguration = introspectedTable.getTableConfiguration();
Properties properties = tableConfiguration.getProperties();
String versionField = properties.getProperty("versionField");
if (versionField == null || versionField == "") {
return;
}
Set<FullyQualifiedJavaType> importedTypes = new TreeSet<>();
FullyQualifiedJavaType parameterType;
if (introspectedTable.getRules().generateRecordWithBLOBsClass()) {
parameterType = new FullyQualifiedJavaType(introspectedTable.getRecordWithBLOBsType());
} else {
parameterType = new FullyQualifiedJavaType(introspectedTable.getBaseRecordType());
}
importedTypes.add(parameterType);
Method method = new Method();
method.setVisibility(JavaVisibility.PUBLIC);
method.setReturnType(FullyQualifiedJavaType.getIntInstance());
method.setName(METHOD_NAME);
method.addParameter(new Parameter(parameterType, "record")); //$NON-NLS-1$
interfaze.addImportedTypes(importedTypes);
interfaze.addMethod(method);
}
}
代码示例来源:origin: handosme/mybatis-generator-plus
/**
* 在单条插入动态sql中增加查询序列,以实现oracle主键自增
*
* @author 吴帅
* @parameter @param element
* @parameter @param introspectedTable
* @createDate 2015年9月29日 下午12:00:37
*/
@Override
public void adaptInsertSelective(XmlElement element, IntrospectedTable introspectedTable) {
TableConfiguration tableConfiguration = introspectedTable.getTableConfiguration();
Properties properties = tableConfiguration.getProperties();
String incrementFieldName = properties.getProperty("incrementField");
if (incrementFieldName != null) {// 有自增字段的配置
List<Element> elements = element.getElements();
XmlElement selectKey = new XmlElement("selectKey");
selectKey.addAttribute(new Attribute("keyProperty", incrementFieldName));
selectKey.addAttribute(new Attribute("resultType", "java.lang.Long"));
selectKey.addAttribute(new Attribute("order", "BEFORE"));
selectKey.addElement(new TextElement("select "));
XmlElement includeSeq = new XmlElement("include");
includeSeq.addAttribute(new Attribute("refid", "TABLE_SEQUENCE"));
selectKey.addElement(includeSeq);
selectKey.addElement(new TextElement(" from dual"));
elements.add(0, selectKey);
}
}
代码示例来源:origin: handosme/mybatis-generator-plus
String incrementField = introspectedTable.getTableConfiguration().getProperties().getProperty("incrementField");
XmlElement incrementFieldIf = new XmlElement("if");
incrementFieldIf.addAttribute(new Attribute("test", "orderByClause == null"));
代码示例来源:origin: handosme/mybatis-generator-plus
List<IntrospectedColumn> columns = introspectedTable.getAllColumns();
String incrementField = introspectedTable.getTableConfiguration().getProperties().getProperty("incrementField");
if (incrementField != null) {
incrementField = incrementField.toUpperCase();
代码示例来源:origin: handosme/mybatis-generator-plus
List<IntrospectedColumn> columns = introspectedTable.getAllColumns();
String incrementField = introspectedTable.getTableConfiguration().getProperties().getProperty("incrementField");
if (incrementField != null) {
incrementField = incrementField.toUpperCase();
代码示例来源:origin: handosme/mybatis-generator-plus
List<IntrospectedColumn> columns = introspectedTable.getAllColumns();
String incrementField = introspectedTable.getTableConfiguration().getProperties().getProperty("incrementField");
if (incrementField != null) {
incrementField = incrementField.toUpperCase();
内容来源于网络,如有侵权,请联系作者删除!