Java Code Examples for org.mybatis.generator.internal.util.StringUtility#isTrue()

The following examples show how to use org.mybatis.generator.internal.util.StringUtility#isTrue() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: LombokPlugin.java    From mybatis-generator-plugin with Apache License 2.0 6 votes vote down vote up
/**
 * 具体执行顺序 http://www.mybatis.org/generator/reference/pluggingIn.html
 * @param introspectedTable
 * @return
 */
@Override
public void initialized(IntrospectedTable introspectedTable) {
    super.initialized(introspectedTable);

    this.annotations = new ArrayList<>();
    Properties properties = this.getProperties();
    boolean findData = false;
    for (Object key : properties.keySet()) {
        String annotation = key.toString().trim();
        if (annotation.startsWith("@Data")) {
            findData = true;
        }

        if (StringUtility.isTrue(properties.getProperty(key.toString())) && !PRO_SUPPORT_SUPER_BUILDER_FOR_IDEA.equals(annotation)) {
            this.annotations.add(annotation);
        }
    }

    if (!findData) {
        this.annotations.add(0, "@Data");
    }

    // 老版本IDEA SuperBuilder支持
    this.suportSuperBuilderForIdea = StringUtility.isTrue(properties.getProperty(PRO_SUPPORT_SUPER_BUILDER_FOR_IDEA));
}
 
Example 2
Source File: ExampleEnhancedPlugin.java    From mybatis-generator-plugin with Apache License 2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 * @param introspectedTable
 */
@Override
public void initialized(IntrospectedTable introspectedTable) {
    super.initialized(introspectedTable);
    this.enableColumnOperate = PluginTools.checkDependencyPlugin(context, ModelColumnPlugin.class);
    String enableAndIf = properties.getProperty(PRO_ENABLE_AND_IF);
    this.enableAndIf = enableAndIf == null ? true : StringUtility.isTrue(enableAndIf);
}
 
Example 3
Source File: CommentGenerator.java    From mall-learning with Apache License 2.0 4 votes vote down vote up
/**
 * 设置用户配置的参数
 */
@Override
public void addConfigurationProperties(Properties properties) {
    super.addConfigurationProperties(properties);
    this.addRemarkComments = StringUtility.isTrue(properties.getProperty("addRemarkComments"));
}
 
Example 4
Source File: CommentGenerator.java    From xmall with MIT License 4 votes vote down vote up
/**
 * 设置用户配置的参数
 */
@Override
public void addConfigurationProperties(Properties properties) {
    super.addConfigurationProperties(properties);
    this.addRemarkComments = StringUtility.isTrue(properties.getProperty("addRemarkComments"));
}
 
Example 5
Source File: CommentGenerator.java    From mall-learning with Apache License 2.0 4 votes vote down vote up
/**
 * 设置用户配置的参数
 */
@Override
public void addConfigurationProperties(Properties properties) {
    super.addConfigurationProperties(properties);
    this.addRemarkComments = StringUtility.isTrue(properties.getProperty("addRemarkComments"));
}
 
Example 6
Source File: CommentGenerator.java    From mall-learning with Apache License 2.0 4 votes vote down vote up
/**
 * 设置用户配置的参数
 */
@Override
public void addConfigurationProperties(Properties properties) {
    super.addConfigurationProperties(properties);
    this.addRemarkComments = StringUtility.isTrue(properties.getProperty("addRemarkComments"));
}
 
Example 7
Source File: CommentGenerator.java    From mall-learning with Apache License 2.0 4 votes vote down vote up
/**
 * 设置用户配置的参数
 */
@Override
public void addConfigurationProperties(Properties properties) {
    super.addConfigurationProperties(properties);
    this.addRemarkComments = StringUtility.isTrue(properties.getProperty("addRemarkComments"));
}
 
Example 8
Source File: CommentGenerator.java    From mall with Apache License 2.0 4 votes vote down vote up
/**
 * 设置用户配置的参数
 */
@Override
public void addConfigurationProperties(Properties properties) {
    super.addConfigurationProperties(properties);
    this.addRemarkComments = StringUtility.isTrue(properties.getProperty("addRemarkComments"));
}
 
Example 9
Source File: CommentGenerator.java    From mall-learning with Apache License 2.0 4 votes vote down vote up
/**
 * 设置用户配置的参数
 */
@Override
public void addConfigurationProperties(Properties properties) {
    super.addConfigurationProperties(properties);
    this.addRemarkComments = StringUtility.isTrue(properties.getProperty("addRemarkComments"));
}
 
Example 10
Source File: CommentGenerator.java    From mall-learning with Apache License 2.0 4 votes vote down vote up
/**
 * 设置用户配置的参数
 */
@Override
public void addConfigurationProperties(Properties properties) {
    super.addConfigurationProperties(properties);
    this.addRemarkComments = StringUtility.isTrue(properties.getProperty("addRemarkComments"));
}
 
Example 11
Source File: CommentGenerator.java    From mall-learning with Apache License 2.0 4 votes vote down vote up
/**
 * 设置用户配置的参数
 */
@Override
public void addConfigurationProperties(Properties properties) {
    super.addConfigurationProperties(properties);
    this.addRemarkComments = StringUtility.isTrue(properties.getProperty("addRemarkComments"));
}
 
Example 12
Source File: CommentGenerator.java    From mall-learning with Apache License 2.0 4 votes vote down vote up
/**
 * 设置用户配置的参数
 */
@Override
public void addConfigurationProperties(Properties properties) {
    super.addConfigurationProperties(properties);
    this.addRemarkComments = StringUtility.isTrue(properties.getProperty("addRemarkComments"));
}
 
Example 13
Source File: CommentGenerator.java    From mall-learning with Apache License 2.0 4 votes vote down vote up
/**
 * 设置用户配置的参数
 */
@Override
public void addConfigurationProperties(Properties properties) {
    super.addConfigurationProperties(properties);
    this.addRemarkComments = StringUtility.isTrue(properties.getProperty("addRemarkComments"));
}
 
Example 14
Source File: JavaTypeResolverDefaultImpl.java    From mybatis-generator-core-fix with Apache License 2.0 4 votes vote down vote up
public void addConfigurationProperties(Properties properties) {
    this.properties.putAll(properties);
    forceBigDecimals = StringUtility
            .isTrue(properties
                    .getProperty(PropertyRegistry.TYPE_RESOLVER_FORCE_BIG_DECIMALS));
}
 
Example 15
Source File: CommentGenerator.java    From HIS with Apache License 2.0 4 votes vote down vote up
/**
 * 设置用户配置的参数
 */
@Override
public void addConfigurationProperties(Properties properties) {
    super.addConfigurationProperties(properties);
    this.addRemarkComments = StringUtility.isTrue(properties.getProperty("addRemarkComments"));
}
 
Example 16
Source File: CommentGenerator.java    From mall-swarm with Apache License 2.0 4 votes vote down vote up
/**
 * 设置用户配置的参数
 */
@Override
public void addConfigurationProperties(Properties properties) {
    super.addConfigurationProperties(properties);
    this.addRemarkComments = StringUtility.isTrue(properties.getProperty("addRemarkComments"));
}
 
Example 17
Source File: CommentGenerator.java    From HIS with Apache License 2.0 4 votes vote down vote up
/**
 * 设置用户配置的参数
 */
@Override
public void addConfigurationProperties(Properties properties) {
    super.addConfigurationProperties(properties);
    this.addRemarkComments = StringUtility.isTrue(properties.getProperty("addRemarkComments"));
}
 
Example 18
Source File: CommentGenerator.java    From HIS with Apache License 2.0 4 votes vote down vote up
/**
 * 设置用户配置的参数
 */
@Override
public void addConfigurationProperties(Properties properties) {
    super.addConfigurationProperties(properties);
    this.addRemarkComments = StringUtility.isTrue(properties.getProperty("addRemarkComments"));
}
 
Example 19
Source File: CommentGenerator.java    From macrozheng with Apache License 2.0 4 votes vote down vote up
/**
 * 设置用户配置的参数
 */
@Override
public void addConfigurationProperties(Properties properties) {
    super.addConfigurationProperties(properties);
    this.addRemarkComments = StringUtility.isTrue(properties.getProperty("addRemarkComments"));
}
 
Example 20
Source File: JavaTypeResolverDefaultImpl.java    From mybatis-generator-plus with Apache License 2.0 4 votes vote down vote up
public void addConfigurationProperties(Properties properties) {
    this.properties.putAll(properties);
    forceBigDecimals = StringUtility
            .isTrue(properties
                    .getProperty(PropertyRegistry.TYPE_RESOLVER_FORCE_BIG_DECIMALS));
}