com.ibatis.sqlmap.engine.type

Class TypeHandlerFactory

public class TypeHandlerFactory extends Object

Not much of a suprise, this is a factory class for TypeHandler objects.
Constructor Summary
TypeHandlerFactory()
Default constructor
Method Summary
TypeHandlergetTypeHandler(Class type)
Get a TypeHandler for a class
TypeHandlergetTypeHandler(Class type, String jdbcType)
Get a TypeHandler for a class and a JDBC type
TypeHandlergetUnkownTypeHandler()
When in doubt, get the "unknown" type handler
booleanhasTypeHandler(Class type)
Tells you if a particular class has a TypeHandler
voidputTypeAlias(String alias, String value)
Adds a type alias that is case insensitive.
voidregister(Class type, TypeHandler handler)
Register (add) a type handler for a class
voidregister(Class type, String jdbcType, TypeHandler handler)
Register (add) a type handler for a class and JDBC type
StringresolveAlias(String string)
Lookup an aliased class and return it's REAL name

Constructor Detail

TypeHandlerFactory

public TypeHandlerFactory()
Default constructor

Method Detail

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

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

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

Copyright © 2011. All Rights Reserved.