Java Code Examples for org.mybatis.generator.api.IntrospectedTable.TargetRuntime#MYBATIS3

The following examples show how to use org.mybatis.generator.api.IntrospectedTable.TargetRuntime#MYBATIS3 . 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: BaseRules.java    From mapper-generator-javafx with Apache License 2.0 5 votes vote down vote up
/**
 * Implements the rule for generating the SQL example where clause element
 * specifically for use in the update by example methods.
 *
 * <p>In MyBatis3, generate the element if the updateByExample statements are
 * allowed.
 *
 * @return true if the SQL where clause element should be generated
 */
@Override
public boolean generateMyBatis3UpdateByExampleWhereClause() {
    if (isModelOnly) {
        return false;
    }

    return introspectedTable.getTargetRuntime() == TargetRuntime.MYBATIS3
            && tableConfiguration.isUpdateByExampleStatementEnabled();
}
 
Example 2
Source File: RowBoundsPlugin.java    From mapper-generator-javafx with Apache License 2.0 5 votes vote down vote up
@Override
public boolean clientSelectByExampleWithBLOBsMethodGenerated(Method method,
        Interface interfaze, IntrospectedTable introspectedTable) {
    if (introspectedTable.getTargetRuntime() == TargetRuntime.MYBATIS3) {
        copyAndAddMethod(method, interfaze);
    } else if (introspectedTable.getTargetRuntime() == TargetRuntime.MYBATIS3_DSQL) {
        copyAndAddSelectByExampleMethodForDSQL(method, interfaze);
    }
    return true;
}
 
Example 3
Source File: RowBoundsPlugin.java    From mapper-generator-javafx with Apache License 2.0 5 votes vote down vote up
@Override
public boolean clientSelectByExampleWithoutBLOBsMethodGenerated(
        Method method, Interface interfaze,
        IntrospectedTable introspectedTable) {
    if (introspectedTable.getTargetRuntime() == TargetRuntime.MYBATIS3) {
        copyAndAddMethod(method, interfaze);
    }
    return true;
}
 
Example 4
Source File: RowBoundsPlugin.java    From mapper-generator-javafx with Apache License 2.0 5 votes vote down vote up
@Override
public boolean sqlMapSelectByExampleWithoutBLOBsElementGenerated(
        XmlElement element, IntrospectedTable introspectedTable) {
    if (introspectedTable.getTargetRuntime() == TargetRuntime.MYBATIS3) {
        copyAndSaveElement(element, introspectedTable.getFullyQualifiedTable());
    }
    return true;
}
 
Example 5
Source File: RowBoundsPlugin.java    From mapper-generator-javafx with Apache License 2.0 5 votes vote down vote up
@Override
public boolean sqlMapSelectByExampleWithBLOBsElementGenerated(
        XmlElement element, IntrospectedTable introspectedTable) {
    if (introspectedTable.getTargetRuntime() == TargetRuntime.MYBATIS3) {
        copyAndSaveElement(element, introspectedTable.getFullyQualifiedTable());
    }
    return true;
}
 
Example 6
Source File: MapperAnnotationPlugin.java    From mapper-generator-javafx with Apache License 2.0 5 votes vote down vote up
@Override
public boolean clientGenerated(Interface interfaze, IntrospectedTable introspectedTable) {

    if (introspectedTable.getTargetRuntime() == TargetRuntime.MYBATIS3) {
        // don't need to do this for MYBATIS3_DSQL as that runtime already adds this annotation 
        interfaze.addImportedType(new FullyQualifiedJavaType("org.apache.ibatis.annotations.Mapper"));
        interfaze.addAnnotation("@Mapper");
    }
    return true;
}
 
Example 7
Source File: RowBoundsPlugin.java    From mybatis-generator-core-fix with Apache License 2.0 5 votes vote down vote up
@Override
public boolean clientSelectByExampleWithBLOBsMethodGenerated(Method method,
        Interface interfaze, IntrospectedTable introspectedTable) {
    if (introspectedTable.getTargetRuntime() == TargetRuntime.MYBATIS3) {
        copyAndAddMethod(method, interfaze);
    }
    return true;
}
 
Example 8
Source File: RowBoundsPlugin.java    From mybatis-generator-core-fix with Apache License 2.0 5 votes vote down vote up
@Override
public boolean clientSelectByExampleWithoutBLOBsMethodGenerated(
        Method method, Interface interfaze,
        IntrospectedTable introspectedTable) {
    if (introspectedTable.getTargetRuntime() == TargetRuntime.MYBATIS3) {
        copyAndAddMethod(method, interfaze);
    }
    return true;
}
 
Example 9
Source File: RowBoundsPlugin.java    From mybatis-generator-core-fix with Apache License 2.0 5 votes vote down vote up
@Override
public boolean sqlMapSelectByExampleWithoutBLOBsElementGenerated(
        XmlElement element, IntrospectedTable introspectedTable) {
    if (introspectedTable.getTargetRuntime() == TargetRuntime.MYBATIS3) {
        copyAndSaveElement(element, introspectedTable.getFullyQualifiedTable());
    }
    return true;
}
 
Example 10
Source File: RowBoundsPlugin.java    From mybatis-generator-core-fix with Apache License 2.0 5 votes vote down vote up
@Override
public boolean sqlMapSelectByExampleWithBLOBsElementGenerated(
        XmlElement element, IntrospectedTable introspectedTable) {
    if (introspectedTable.getTargetRuntime() == TargetRuntime.MYBATIS3) {
        copyAndSaveElement(element, introspectedTable.getFullyQualifiedTable());
    }
    return true;
}
 
Example 11
Source File: RowBoundsPlugin.java    From mybatis-generator-plus with Apache License 2.0 5 votes vote down vote up
@Override
public boolean clientSelectByExampleWithBLOBsMethodGenerated(Method method,
        Interface interfaze, IntrospectedTable introspectedTable) {
    if (introspectedTable.getTargetRuntime() == TargetRuntime.MYBATIS3) {
        copyAndAddMethod(method, interfaze);
    }
    return true;
}
 
Example 12
Source File: RowBoundsPlugin.java    From mybatis-generator-plus with Apache License 2.0 5 votes vote down vote up
@Override
public boolean clientSelectByExampleWithoutBLOBsMethodGenerated(
        Method method, Interface interfaze,
        IntrospectedTable introspectedTable) {
    if (introspectedTable.getTargetRuntime() == TargetRuntime.MYBATIS3) {
        copyAndAddMethod(method, interfaze);
    }
    return true;
}
 
Example 13
Source File: RowBoundsPlugin.java    From mybatis-generator-plus with Apache License 2.0 5 votes vote down vote up
@Override
public boolean sqlMapSelectByExampleWithoutBLOBsElementGenerated(
        XmlElement element, IntrospectedTable introspectedTable) {
    if (introspectedTable.getTargetRuntime() == TargetRuntime.MYBATIS3) {
        copyAndSaveElement(element, introspectedTable.getFullyQualifiedTable());
    }
    return true;
}
 
Example 14
Source File: RowBoundsPlugin.java    From mybatis-generator-plus with Apache License 2.0 5 votes vote down vote up
@Override
public boolean sqlMapSelectByExampleWithBLOBsElementGenerated(
        XmlElement element, IntrospectedTable introspectedTable) {
    if (introspectedTable.getTargetRuntime() == TargetRuntime.MYBATIS3) {
        copyAndSaveElement(element, introspectedTable.getFullyQualifiedTable());
    }
    return true;
}
 
Example 15
Source File: BaseRules.java    From mybatis-generator-core-fix with Apache License 2.0 3 votes vote down vote up
/**
 * Implements the rule for generating the SQL example where clause element
 * specifically for use in the update by example methods.
 * 
 * In iBATIS2, do not generate the element.
 * 
 * In MyBatis3, generate the element if the updateByExample statements are
 * allowed.
 * 
 * @return true if the SQL where clause element should be generated
 */
public boolean generateMyBatis3UpdateByExampleWhereClause() {
    if (isModelOnly) {
        return false;
    }
    
    return introspectedTable.getTargetRuntime() == TargetRuntime.MYBATIS3
            && tableConfiguration.isUpdateByExampleStatementEnabled();
}
 
Example 16
Source File: BaseRules.java    From mybatis-generator-plus with Apache License 2.0 3 votes vote down vote up
/**
 * Implements the rule for generating the SQL example where clause element
 * specifically for use in the update by example methods.
 * 
 * In iBATIS2, do not generate the element.
 * 
 * In MyBatis3, generate the element if the updateByExample statements are
 * allowed.
 * 
 * @return true if the SQL where clause element should be generated
 */
public boolean generateMyBatis3UpdateByExampleWhereClause() {
    if (isModelOnly) {
        return false;
    }
    
    return introspectedTable.getTargetRuntime() == TargetRuntime.MYBATIS3
            && tableConfiguration.isUpdateByExampleStatementEnabled();
}