org.mybatis.generator.codegen.AbstractJavaClientGenerator Java Examples

The following examples show how to use org.mybatis.generator.codegen.AbstractJavaClientGenerator. 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: IntrospectedTableMyBatis3Impl.java    From mybatis-generator-plus with Apache License 2.0 6 votes vote down vote up
/**
 * 
 * @param warnings
 * @param progressCallback
 * @return true if an XML generator is required
 */
protected AbstractJavaClientGenerator calculateClientGenerators(List<String> warnings, ProgressCallback progressCallback) {
	if (!rules.generateJavaClient()) {
		return null;
	}

	AbstractJavaClientGenerator javaGenerator = createJavaClientGenerator();
	if (javaGenerator == null) {
		return null;
	}

	initializeAbstractGenerator(javaGenerator, warnings, progressCallback);
	clientGenerators.add(javaGenerator);

	return javaGenerator;
}
 
Example #2
Source File: IntrospectedTableMyBatis3Impl.java    From mapper-generator-javafx with Apache License 2.0 6 votes vote down vote up
protected AbstractJavaClientGenerator calculateClientGenerators(List<String> warnings,
        ProgressCallback progressCallback) {
    if (!rules.generateJavaClient()) {
        return null;
    }
    
    AbstractJavaClientGenerator javaGenerator = createJavaClientGenerator();
    if (javaGenerator == null) {
        return null;
    }

    initializeAbstractGenerator(javaGenerator, warnings, progressCallback);
    javaGenerators.add(javaGenerator);

    return javaGenerator;
}
 
Example #3
Source File: IntrospectedTableMyBatis3Impl.java    From mybatis-generator-core-fix with Apache License 2.0 6 votes vote down vote up
/**
 * Calculate client generators.
 *
 * @param warnings
 *            the warnings
 * @param progressCallback
 *            the progress callback
 * @return true if an XML generator is required
 */
protected AbstractJavaClientGenerator calculateClientGenerators(List<String> warnings,
        ProgressCallback progressCallback) {
    if (!rules.generateJavaClient()) {
        return null;
    }
    
    AbstractJavaClientGenerator javaGenerator = createJavaClientGenerator();
    if (javaGenerator == null) {
        return null;
    }

    initializeAbstractGenerator(javaGenerator, warnings, progressCallback);
    clientGenerators.add(javaGenerator);
    
    return javaGenerator;
}
 
Example #4
Source File: IntrospectedTableMyBatis3SimpleImpl.java    From mybatis-generator-core-fix with Apache License 2.0 5 votes vote down vote up
@Override
protected void calculateXmlMapperGenerator(AbstractJavaClientGenerator javaClientGenerator, 
        List<String> warnings,
        ProgressCallback progressCallback) {
    if (javaClientGenerator == null) {
        if (context.getSqlMapGeneratorConfiguration() != null) {
            xmlMapperGenerator = new SimpleXMLMapperGenerator();
        }
    } else {
        xmlMapperGenerator = javaClientGenerator.getMatchedXMLGenerator();
    }
    
    initializeAbstractGenerator(xmlMapperGenerator, warnings,
            progressCallback);
}
 
Example #5
Source File: IntrospectedTableMyBatis3Impl.java    From mybatis-generator-plus with Apache License 2.0 5 votes vote down vote up
@Override
public boolean requiresXMLGenerator() {
	AbstractJavaClientGenerator javaClientGenerator = createJavaClientGenerator();

	if (javaClientGenerator == null) {
		return false;
	}
	else {
		return javaClientGenerator.requiresXMLGenerator();
	}
}
 
Example #6
Source File: IntrospectedTableMyBatis3Impl.java    From mybatis-generator-plus with Apache License 2.0 5 votes vote down vote up
protected void calculateXmlMapperGenerator(AbstractJavaClientGenerator javaClientGenerator, List<String> warnings, ProgressCallback progressCallback) {
	if (javaClientGenerator == null) {
		if (context.getSqlMapGeneratorConfiguration() != null) {
			xmlMapperGenerator = new XMLMapperGenerator();
		}
	}
	else {
		xmlMapperGenerator = javaClientGenerator.getMatchedXMLGenerator();
	}

	initializeAbstractGenerator(xmlMapperGenerator, warnings, progressCallback);
}
 
Example #7
Source File: IntrospectedTableMyBatis3Impl.java    From mybatis-generator-plus with Apache License 2.0 5 votes vote down vote up
@Override
public void calculateGenerators(List<String> warnings, ProgressCallback progressCallback) {
	calculateJavaModelGenerators(warnings, progressCallback);

	AbstractJavaClientGenerator javaClientGenerator = calculateClientGenerators(warnings, progressCallback);

	calculateXmlMapperGenerator(javaClientGenerator, warnings, progressCallback);
}
 
Example #8
Source File: IntrospectedTableMyBatis3SimpleImpl.java    From mybatis-generator-plus with Apache License 2.0 5 votes vote down vote up
@Override
protected void calculateXmlMapperGenerator(AbstractJavaClientGenerator javaClientGenerator, 
        List<String> warnings,
        ProgressCallback progressCallback) {
    if (javaClientGenerator == null) {
        if (context.getSqlMapGeneratorConfiguration() != null) {
            xmlMapperGenerator = new SimpleXMLMapperGenerator();
        }
    } else {
        xmlMapperGenerator = javaClientGenerator.getMatchedXMLGenerator();
    }
    
    initializeAbstractGenerator(xmlMapperGenerator, warnings,
            progressCallback);
}
 
Example #9
Source File: IntrospectedTableMyBatis3Impl.java    From mybatis-generator-core-fix with Apache License 2.0 5 votes vote down vote up
@Override
public boolean requiresXMLGenerator() {
    AbstractJavaClientGenerator javaClientGenerator =
        createJavaClientGenerator();
    
    if (javaClientGenerator == null) {
        return false;
    } else {
        return javaClientGenerator.requiresXMLGenerator();
    }
}
 
Example #10
Source File: IntrospectedTableMyBatis3Impl.java    From mybatis-generator-core-fix with Apache License 2.0 5 votes vote down vote up
/**
 * Calculate xml mapper generator.
 *
 * @param javaClientGenerator
 *            the java client generator
 * @param warnings
 *            the warnings
 * @param progressCallback
 *            the progress callback
 */
protected void calculateXmlMapperGenerator(AbstractJavaClientGenerator javaClientGenerator, 
        List<String> warnings,
        ProgressCallback progressCallback) {
    if (javaClientGenerator == null) {
        if (context.getSqlMapGeneratorConfiguration() != null) {
            xmlMapperGenerator = new XMLMapperGenerator();
        }
    } else {
        xmlMapperGenerator = javaClientGenerator.getMatchedXMLGenerator();
    }
    
    initializeAbstractGenerator(xmlMapperGenerator, warnings,
            progressCallback);
}
 
Example #11
Source File: IntrospectedTableMyBatis3Impl.java    From mybatis-generator-core-fix with Apache License 2.0 5 votes vote down vote up
@Override
public void calculateGenerators(List<String> warnings,
        ProgressCallback progressCallback) {
    calculateJavaModelGenerators(warnings, progressCallback);
    
    AbstractJavaClientGenerator javaClientGenerator =
        calculateClientGenerators(warnings, progressCallback);
        
    calculateXmlMapperGenerator(javaClientGenerator, warnings, progressCallback);
}
 
Example #12
Source File: IntrospectedTableMyBatis3DynamicSqlImpl.java    From mapper-generator-javafx with Apache License 2.0 5 votes vote down vote up
@Override
protected void calculateXmlMapperGenerator(AbstractJavaClientGenerator javaClientGenerator, 
        List<String> warnings,
        ProgressCallback progressCallback) {
    // no XML with dynamic SQL support
    xmlMapperGenerator = null;
}
 
Example #13
Source File: IntrospectedTableMyBatis3Impl.java    From mapper-generator-javafx with Apache License 2.0 5 votes vote down vote up
@Override
public boolean requiresXMLGenerator() {
    AbstractJavaClientGenerator javaClientGenerator = createJavaClientGenerator();
    
    if (javaClientGenerator == null) {
        return false;
    } else {
        return javaClientGenerator.requiresXMLGenerator();
    }
}
 
Example #14
Source File: IntrospectedTableMyBatis3Impl.java    From mapper-generator-javafx with Apache License 2.0 5 votes vote down vote up
protected void calculateXmlMapperGenerator(AbstractJavaClientGenerator javaClientGenerator, 
        List<String> warnings,
        ProgressCallback progressCallback) {
    if (javaClientGenerator == null) {
        if (context.getSqlMapGeneratorConfiguration() != null) {
            xmlMapperGenerator = new XMLMapperGenerator();
        }
    } else {
        xmlMapperGenerator = javaClientGenerator.getMatchedXMLGenerator();
    }
    
    initializeAbstractGenerator(xmlMapperGenerator, warnings, progressCallback);
}
 
Example #15
Source File: IntrospectedTableMyBatis3Impl.java    From mapper-generator-javafx with Apache License 2.0 5 votes vote down vote up
@Override
public void calculateGenerators(List<String> warnings, ProgressCallback progressCallback) {
    calculateJavaModelGenerators(warnings, progressCallback);
    
    AbstractJavaClientGenerator javaClientGenerator = calculateClientGenerators(warnings, progressCallback);
        
    calculateXmlMapperGenerator(javaClientGenerator, warnings, progressCallback);
}
 
Example #16
Source File: IntrospectedTableMyBatis3SimpleImpl.java    From mapper-generator-javafx with Apache License 2.0 5 votes vote down vote up
@Override
protected void calculateXmlMapperGenerator(AbstractJavaClientGenerator javaClientGenerator,
                                           List<String> warnings,
                                           ProgressCallback progressCallback) {
    if (javaClientGenerator == null) {
        if (context.getSqlMapGeneratorConfiguration() != null) {
            xmlMapperGenerator = new SimpleXMLMapperGenerator();
        }
    } else {
        xmlMapperGenerator = javaClientGenerator.getMatchedXMLGenerator();
    }

    initializeAbstractGenerator(xmlMapperGenerator, warnings, progressCallback);
}
 
Example #17
Source File: IntrospectedTableMyBatis3AlanImpl.java    From mapper-generator-javafx with Apache License 2.0 5 votes vote down vote up
@Override
protected AbstractJavaClientGenerator createJavaClientGenerator() {
    if (context.getJavaClientGeneratorConfiguration() == null) {
        return null;
    }

    return new DynamicSqlMapperGenerator(getClientProject());
}
 
Example #18
Source File: IntrospectedTableMyBatis3AlanImpl.java    From mapper-generator-javafx with Apache License 2.0 5 votes vote down vote up
@Override
protected void calculateXmlMapperGenerator(AbstractJavaClientGenerator javaClientGenerator, 
        List<String> warnings,
        ProgressCallback progressCallback) {
    // no XML with dynamic SQL support
    xmlMapperGenerator = null;
}
 
Example #19
Source File: IntrospectedTableMyBatis3DynamicSqlImpl.java    From mapper-generator-javafx with Apache License 2.0 5 votes vote down vote up
@Override
protected AbstractJavaClientGenerator createJavaClientGenerator() {
    if (context.getJavaClientGeneratorConfiguration() == null) {
        return null;
    }

    return new DynamicSqlMapperGenerator(getClientProject());
}