org.apache.ibatis.abator.internal.types
Class JavaTypeResolverDefaultImpl

java.lang.Object
  extended by org.apache.ibatis.abator.internal.types.JavaTypeResolverDefaultImpl
All Implemented Interfaces:
JavaTypeResolver

public class JavaTypeResolverDefaultImpl
extends java.lang.Object
implements JavaTypeResolver

Author:
Jeff Butler

Field Summary
protected  java.util.Map properties
           
protected  java.util.List warnings
           
 
Constructor Summary
JavaTypeResolverDefaultImpl()
           
 
Method Summary
 void addConfigurationProperties(java.util.Map properties)
          Adds properties for this instance from any properties configured in the JavaTypeResolverConfiguration.
 void addContextProperties(java.util.Map properties)
          Adds properties for this instance from any properties configured in the current context.
 void initializeResolvedJavaType(ColumnDefinition cd)
          Initializes the ResolvedJavaType property of the ColumnDescription based on the jdbc type, length, and scale of the column.
 void setWarnings(java.util.List warnings)
          Abator will supply a list to this method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

warnings

protected java.util.List warnings

properties

protected java.util.Map properties
Constructor Detail

JavaTypeResolverDefaultImpl

public JavaTypeResolverDefaultImpl()
Method Detail

addConfigurationProperties

public void addConfigurationProperties(java.util.Map properties)
Description copied from interface: JavaTypeResolver
Adds properties for this instance from any properties configured in the JavaTypeResolverConfiguration. This method will be called before any of the get methods.

Specified by:
addConfigurationProperties in interface JavaTypeResolver
Parameters:
properties - All properties from the configuration

addContextProperties

public void addContextProperties(java.util.Map properties)
Description copied from interface: JavaTypeResolver
Adds properties for this instance from any properties configured in the current context. This method will be called before any of the get methods.

Specified by:
addContextProperties in interface JavaTypeResolver
Parameters:
properties - All properties from the configuration

initializeResolvedJavaType

public void initializeResolvedJavaType(ColumnDefinition cd)
                                throws UnsupportedDataTypeException
Description copied from interface: JavaTypeResolver
Initializes the ResolvedJavaType property of the ColumnDescription based on the jdbc type, length, and scale of the column.

Specified by:
initializeResolvedJavaType in interface JavaTypeResolver
Parameters:
cd - the JDBC type will be used first to resolve the Java type. If the type cannot be resolved from this value, then we will try from the type name (which may be the qualified UDT from the database)
Throws:
UnsupportedDataTypeException

setWarnings

public void setWarnings(java.util.List warnings)
Description copied from interface: JavaTypeResolver
Abator 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:
setWarnings in interface JavaTypeResolver