Class TypeMapper

java.lang.Object
org.apache.sis.internal.metadata.sql.TypeMapper

public final class TypeMapper extends Object
Maps a few basic Java types to JDBC types.
Since:
0.8
Version:
0.8
Author:
Martin Desruisseaux (Geomatys)
  • Method Details

    • keywordFor

      public static String keywordFor(Class<?> classe)
      Returns the SQL keyword for storing an element of the given type, or null if unknown. This method does not handle the text type, so String are treated as "unknown" as well. We do that way because the caller will need to specify a value in VARCHAR(n) statement.
      Parameters:
      classe - the class for which to get the SQL keyword in a CREATE TABLE statement.
      Returns:
      the SQL keyword, or null if unknown.
    • toJavaType

      public static Class<?> toJavaType(int type)
      Return the Java class for the given SQL type, or null if none.
      Parameters:
      type - one of the Types constants.
      Returns:
      the Java class, or null if none.