Class ExampleGenerator
java.lang.Object
org.mybatis.generator.codegen.AbstractGenerator
org.mybatis.generator.codegen.AbstractJavaGenerator
org.mybatis.generator.codegen.mybatis3.model.ExampleGenerator
-
Field Summary
Fields inherited from class org.mybatis.generator.codegen.AbstractGenerator
context, introspectedTable, progressCallback, warnings -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate StringaddTypeHandledObjectsAndMethods(IntrospectedColumn introspectedColumn, Method constructor, InnerClass innerClass) This method adds all the extra methods and fields required to support a user defined type handler on some column.private Methodprivate InnerClassprivate InnerClassprivate InnerClassgetGeneratedCriteriaInnerClass(TopLevelClass topLevelClass) private MethodgetNoValueMethod(IntrospectedColumn introspectedColumn, String nameFragment, String operator) private MethodgetSetBetweenOrNotBetweenMethod(IntrospectedColumn introspectedColumn, boolean betweenMethod) Generates methods that set between and not between conditions.private MethodgetSetEqualMethod(IntrospectedColumn introspectedColumn) private MethodgetSetGreaterThanMethod(IntrospectedColumn introspectedColumn) private MethodgetSetGreaterThenOrEqualMethod(IntrospectedColumn introspectedColumn) private MethodgetSetInOrNotInMethod(IntrospectedColumn introspectedColumn, boolean inMethod) Generates an In or NotIn method.private MethodgetSetLessThanMethod(IntrospectedColumn introspectedColumn) private MethodgetSetLessThanOrEqualMethod(IntrospectedColumn introspectedColumn) private MethodgetSetLikeMethod(IntrospectedColumn introspectedColumn) private MethodgetSetNotEqualMethod(IntrospectedColumn introspectedColumn) private MethodgetSetNotLikeMethod(IntrospectedColumn introspectedColumn) private MethodgetSetNotNullMethod(IntrospectedColumn introspectedColumn) private MethodgetSetNullMethod(IntrospectedColumn introspectedColumn) private MethodgetSingleValueMethod(IntrospectedColumn introspectedColumn, String nameFragment, String operator) private StringinitializeAddLine(IntrospectedColumn introspectedColumn) private StringinitializeAndMethodName(IntrospectedColumn introspectedColumn) Methods inherited from class org.mybatis.generator.codegen.AbstractJavaGenerator
addDefaultConstructor, addDefaultConstructorWithGeneratedAnnotatoin, getGetter, getProject, getRootClassMethods inherited from class org.mybatis.generator.codegen.AbstractGenerator
setContext, setIntrospectedTable, setProgressCallback, setWarnings
-
Constructor Details
-
ExampleGenerator
-
-
Method Details
-
getCompilationUnits
- Specified by:
getCompilationUnitsin classAbstractJavaGenerator
-
getCriterionInnerClass
-
createCriterionConstructor
-
getCriteriaInnerClass
-
getGeneratedCriteriaInnerClass
-
getSetNullMethod
-
getSetNotNullMethod
-
getSetEqualMethod
-
getSetNotEqualMethod
-
getSetGreaterThanMethod
-
getSetGreaterThenOrEqualMethod
-
getSetLessThanMethod
-
getSetLessThanOrEqualMethod
-
getSetLikeMethod
-
getSetNotLikeMethod
-
getSingleValueMethod
private Method getSingleValueMethod(IntrospectedColumn introspectedColumn, String nameFragment, String operator) -
initializeAndMethodName
-
initializeAddLine
-
getSetBetweenOrNotBetweenMethod
private Method getSetBetweenOrNotBetweenMethod(IntrospectedColumn introspectedColumn, boolean betweenMethod) Generates methods that set between and not between conditions.- Parameters:
introspectedColumn- the introspected columnbetweenMethod- true if between, else not between- Returns:
- a generated method for the between or not between method
-
getSetInOrNotInMethod
Generates an In or NotIn method.- Parameters:
introspectedColumn- the introspected columninMethod- if true generates an "in" method, else generates a "not in" method- Returns:
- a generated method for the in or not in method
-
getNoValueMethod
private Method getNoValueMethod(IntrospectedColumn introspectedColumn, String nameFragment, String operator) -
addTypeHandledObjectsAndMethods
private String addTypeHandledObjectsAndMethods(IntrospectedColumn introspectedColumn, Method constructor, InnerClass innerClass) This method adds all the extra methods and fields required to support a user defined type handler on some column.- Parameters:
introspectedColumn- the introspected columnconstructor- the constructorinnerClass- the enclosing class- Returns:
- the name of the List added to the class by this method
-