Class TypeMapper
java.lang.Object
org.apache.sis.internal.metadata.sql.TypeMapper
Maps a few basic Java types to JDBC types.
- Since:
- 0.8
- Version:
- 0.8
- Author:
- Martin Desruisseaux (Geomatys)
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringkeywordFor(Class<?> classe) Returns the SQL keyword for storing an element of the given type, ornullif unknown.static Class<?> toJavaType(int type) Return the Java class for the given SQL type, ornullif none.
-
Method Details
-
keywordFor
Returns the SQL keyword for storing an element of the given type, ornullif unknown. This method does not handle the text type, soStringare treated as "unknown" as well. We do that way because the caller will need to specify a value inVARCHAR(n)statement.- Parameters:
classe- the class for which to get the SQL keyword in aCREATE TABLEstatement.- Returns:
- the SQL keyword, or
nullif unknown.
-
toJavaType
Return the Java class for the given SQL type, ornullif none.- Parameters:
type- one of theTypesconstants.- Returns:
- the Java class, or
nullif none.
-