Class TypeHandlerFactory

java.lang.Object
com.ibatis.sqlmap.engine.type.TypeHandlerFactory

public class TypeHandlerFactory extends Object
Not much of a suprise, this is a factory class for TypeHandler objects.
  • Constructor Details

    • TypeHandlerFactory

      public TypeHandlerFactory()
      Default constructor.
  • Method Details

    • getTypeHandler

      public TypeHandler getTypeHandler(Class type)
      Get a TypeHandler for a class.
      Parameters:
      type - - the class you want a TypeHandler for
      Returns:
      - the handler
    • getTypeHandler

      public TypeHandler getTypeHandler(Class type, String jdbcType)
      Get a TypeHandler for a class and a JDBC type.
      Parameters:
      type - - the class
      jdbcType - - the jdbc type
      Returns:
      - the handler
    • getUnkownTypeHandler

      public TypeHandler getUnkownTypeHandler()
      When in doubt, get the "unknown" type handler.
      Returns:
      - if I told you, it would not be unknown, would it?
    • hasTypeHandler

      public boolean hasTypeHandler(Class type)
      Tells you if a particular class has a TypeHandler.
      Parameters:
      type - - the class
      Returns:
      - true if there is a TypeHandler
    • register

      public void register(Class type, TypeHandler handler)
      Register (add) a type handler for a class.
      Parameters:
      type - - the class
      handler - - the handler instance
    • register

      public void register(Class type, String jdbcType, TypeHandler handler)
      Register (add) a type handler for a class and JDBC type.
      Parameters:
      type - - the class
      jdbcType - - the JDBC type
      handler - - the handler instance
    • resolveAlias

      public String resolveAlias(String string)
      Lookup an aliased class and return it's REAL name.
      Parameters:
      string - - the alias
      Returns:
      - the REAL name
    • putTypeAlias

      public void putTypeAlias(String alias, String value)
      Adds a type alias that is case insensitive. All of the following String, string, StRiNg will equate to the same alias.
      Parameters:
      alias - - the alias
      value - - the real class name