public class JavaTypeResolverDefaultImpl extends Object implements JavaTypeResolver
Modifier and Type | Class and Description |
---|---|
static class |
JavaTypeResolverDefaultImpl.JdbcTypeInformation |
Modifier and Type | Field and Description |
---|---|
protected Context |
context |
protected boolean |
forceBigDecimals |
protected Properties |
properties |
protected Map<Integer,JavaTypeResolverDefaultImpl.JdbcTypeInformation> |
typeMap |
protected boolean |
useJSR310Types |
protected List<String> |
warnings |
Constructor and Description |
---|
JavaTypeResolverDefaultImpl() |
Modifier and Type | Method and Description |
---|---|
void |
addConfigurationProperties(Properties properties)
Adds properties for this instance from any properties configured in the
JavaTypeResolverConfiguration.
|
protected FullyQualifiedJavaType |
calculateBigDecimalReplacement(IntrospectedColumn column,
FullyQualifiedJavaType defaultType) |
protected FullyQualifiedJavaType |
calculateBitReplacement(IntrospectedColumn column,
FullyQualifiedJavaType defaultType) |
protected FullyQualifiedJavaType |
calculateDateType(IntrospectedColumn column,
FullyQualifiedJavaType defaultType) |
FullyQualifiedJavaType |
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.
|
String |
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 FullyQualifiedJavaType |
calculateTimestampType(IntrospectedColumn column,
FullyQualifiedJavaType defaultType) |
protected FullyQualifiedJavaType |
calculateTimeType(IntrospectedColumn column,
FullyQualifiedJavaType defaultType) |
protected FullyQualifiedJavaType |
overrideDefaultType(IntrospectedColumn column,
FullyQualifiedJavaType defaultType) |
void |
setContext(Context context)
Sets the instance of the Context object associated with this instance.
|
void |
setWarnings(List<String> warnings)
The generator will supply a list to this method.
|
protected final Properties properties
protected Context context
protected boolean forceBigDecimals
protected boolean useJSR310Types
protected final Map<Integer,JavaTypeResolverDefaultImpl.JdbcTypeInformation> typeMap
public void addConfigurationProperties(Properties properties)
JavaTypeResolver
This method will be called before any of the get methods.
addConfigurationProperties
in interface JavaTypeResolver
properties
- All properties from the configurationpublic FullyQualifiedJavaType calculateJavaType(IntrospectedColumn introspectedColumn)
JavaTypeResolver
calculateJavaType
in interface JavaTypeResolver
introspectedColumn
- the column whose Java type needs to be calculatedprotected FullyQualifiedJavaType overrideDefaultType(IntrospectedColumn column, FullyQualifiedJavaType defaultType)
protected FullyQualifiedJavaType calculateDateType(IntrospectedColumn column, FullyQualifiedJavaType defaultType)
protected FullyQualifiedJavaType calculateTimeType(IntrospectedColumn column, FullyQualifiedJavaType defaultType)
protected FullyQualifiedJavaType calculateTimestampType(IntrospectedColumn column, FullyQualifiedJavaType defaultType)
protected FullyQualifiedJavaType calculateBitReplacement(IntrospectedColumn column, FullyQualifiedJavaType defaultType)
protected FullyQualifiedJavaType calculateBigDecimalReplacement(IntrospectedColumn column, FullyQualifiedJavaType defaultType)
public String calculateJdbcTypeName(IntrospectedColumn introspectedColumn)
JavaTypeResolver
calculateJdbcTypeName
in interface JavaTypeResolver
introspectedColumn
- the column whose Java type needs to be calculatedpublic void setWarnings(List<String> warnings)
JavaTypeResolver
setWarnings
in interface JavaTypeResolver
warnings
- the new warningspublic void setContext(Context context)
JavaTypeResolver
This method will be called before any of the get methods.
setContext
in interface JavaTypeResolver
context
- The current ContextCopyright © 2006–2024 MyBatis.org. All rights reserved.