Class JavaTypeResolverDefaultImpl
java.lang.Object
org.mybatis.generator.internal.types.JavaTypeResolverDefaultImpl
- All Implemented Interfaces:
JavaTypeResolver
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final record -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Contextprotected booleanprotected final Propertiesprotected final Map<Integer, JavaTypeResolverDefaultImpl.JdbcTypeInformation> protected boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddConfigurationProperties(Properties properties) Adds properties for this instance from any properties configured in the JavaTypeResolverConfiguration.protected FullyQualifiedJavaTypecalculateBigDecimalReplacement(IntrospectedColumn column, FullyQualifiedJavaType defaultType) protected FullyQualifiedJavaTypecalculateBitReplacement(IntrospectedColumn column, FullyQualifiedJavaType defaultType) protected FullyQualifiedJavaTypecalculateDateType(IntrospectedColumn column, FullyQualifiedJavaType defaultType) calculateJavaType(IntrospectedColumn introspectedColumn) Calculates and returns the Java type that should be associated with this column based on the jdbc type, length, and scale of the column.calculateJdbcTypeName(IntrospectedColumn introspectedColumn) Calculates and returns the JDBC type name that should be associated with this column based on the jdbc type, length, and scale of the column.protected FullyQualifiedJavaTypecalculateTimestampType(IntrospectedColumn column, FullyQualifiedJavaType defaultType) protected FullyQualifiedJavaTypecalculateTimeType(IntrospectedColumn column, FullyQualifiedJavaType defaultType) protected FullyQualifiedJavaTypeoverrideDefaultType(IntrospectedColumn column, FullyQualifiedJavaType defaultType) voidsetContext(Context context) Sets the instance of the Context object associated with this instance.voidsetWarnings(List<String> warnings) The generator will supply a list to this method.
-
Field Details
-
warnings
-
properties
-
context
-
forceBigDecimals
protected boolean forceBigDecimals -
useJSR310Types
protected boolean useJSR310Types -
typeMap
-
-
Constructor Details
-
JavaTypeResolverDefaultImpl
public JavaTypeResolverDefaultImpl()
-
-
Method Details
-
addConfigurationProperties
Description copied from interface:JavaTypeResolverAdds properties for this instance from any properties configured in the JavaTypeResolverConfiguration.This method will be called before any of the get methods.
- Specified by:
addConfigurationPropertiesin interfaceJavaTypeResolver- Parameters:
properties- All properties from the configuration
-
calculateJavaType
Description copied from interface:JavaTypeResolverCalculates and returns the Java type that should be associated with this column based on the jdbc type, length, and scale of the column.- Specified by:
calculateJavaTypein interfaceJavaTypeResolver- Parameters:
introspectedColumn- the column whose Java type needs to be calculated- Returns:
- the calculated type, or null if an unsupported data type. If null is returned, we will set the type to Object and issue a warning unless the column is ignored or otherwise overridden
-
overrideDefaultType
protected FullyQualifiedJavaType overrideDefaultType(IntrospectedColumn column, FullyQualifiedJavaType defaultType) -
calculateDateType
protected FullyQualifiedJavaType calculateDateType(IntrospectedColumn column, FullyQualifiedJavaType defaultType) -
calculateTimeType
protected FullyQualifiedJavaType calculateTimeType(IntrospectedColumn column, FullyQualifiedJavaType defaultType) -
calculateTimestampType
protected FullyQualifiedJavaType calculateTimestampType(IntrospectedColumn column, FullyQualifiedJavaType defaultType) -
calculateBitReplacement
protected FullyQualifiedJavaType calculateBitReplacement(IntrospectedColumn column, FullyQualifiedJavaType defaultType) -
calculateBigDecimalReplacement
protected FullyQualifiedJavaType calculateBigDecimalReplacement(IntrospectedColumn column, FullyQualifiedJavaType defaultType) -
calculateJdbcTypeName
Description copied from interface:JavaTypeResolverCalculates and returns the JDBC type name that should be associated with this column based on the jdbc type, length, and scale of the column.- Specified by:
calculateJdbcTypeNamein interfaceJavaTypeResolver- Parameters:
introspectedColumn- the column whose Java type needs to be calculated- Returns:
- the calculated type name, or null if an unsupported data type. If null is returned, we will set the type to OTHER and issue a warning unless the column is ignored or otherwise overridden
-
setWarnings
Description copied from interface:JavaTypeResolverThe generator will supply a list to this method. The implementation class may add strings to the list that will be treated as warning messages and displayed to the user. The concept of a warning is that code generation can continue, but that the results may not be what is expected.- Specified by:
setWarningsin interfaceJavaTypeResolver- Parameters:
warnings- the new warnings
-
setContext
Description copied from interface:JavaTypeResolverSets the instance of the Context object associated with this instance.This method will be called before any of the get methods.
- Specified by:
setContextin interfaceJavaTypeResolver- Parameters:
context- The current Context
-