Package com.ibatis.sqlmap.engine.type
Class TypeHandlerFactory
java.lang.Object
com.ibatis.sqlmap.engine.type.TypeHandlerFactory
Not much of a suprise, this is a factory class for TypeHandler objects.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetTypeHandler
(Class type) Get a TypeHandler for a class.getTypeHandler
(Class type, String jdbcType) Get a TypeHandler for a class and a JDBC type.When in doubt, get the "unknown" type handler.boolean
hasTypeHandler
(Class type) Tells you if a particular class has a TypeHandler.void
putTypeAlias
(String alias, String value) Adds a type alias that is case insensitive.void
register
(Class type, TypeHandler handler) Register (add) a type handler for a class.void
register
(Class type, String jdbcType, TypeHandler handler) Register (add) a type handler for a class and JDBC type.resolveAlias
(String string) Lookup an aliased class and return it's REAL name.
-
Constructor Details
-
TypeHandlerFactory
public TypeHandlerFactory()Default constructor.
-
-
Method Details
-
getTypeHandler
Get a TypeHandler for a class.- Parameters:
type
- - the class you want a TypeHandler for- Returns:
- - the handler
-
getTypeHandler
Get a TypeHandler for a class and a JDBC type.- Parameters:
type
- - the classjdbcType
- - the jdbc type- Returns:
- - the handler
-
getUnkownTypeHandler
When in doubt, get the "unknown" type handler.- Returns:
- - if I told you, it would not be unknown, would it?
-
hasTypeHandler
Tells you if a particular class has a TypeHandler.- Parameters:
type
- - the class- Returns:
- - true if there is a TypeHandler
-
register
Register (add) a type handler for a class.- Parameters:
type
- - the classhandler
- - the handler instance
-
register
Register (add) a type handler for a class and JDBC type.- Parameters:
type
- - the classjdbcType
- - the JDBC typehandler
- - the handler instance
-
resolveAlias
Lookup an aliased class and return it's REAL name.- Parameters:
string
- - the alias- Returns:
- - the REAL name
-
putTypeAlias
Adds a type alias that is case insensitive. All of the following String, string, StRiNg will equate to the same alias.- Parameters:
alias
- - the aliasvalue
- - the real class name
-