Here you can find the source of mapType(Class javaType)
Map a Java type to a SQL type.
private static String mapType(Class javaType) throws Exception
//package com.java2s; /*/* www. j a v a2 s.c om*/ Derby - Class org.apache.derbyDemo.vtis.core.VTIHelper Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ import java.math.BigDecimal; import java.sql.*; public class Main { /** * <p> * Map a Java type to a SQL type. * </p> */ private static String mapType(Class javaType) throws Exception { if (javaType == Long.class) { return "bigint"; } else if (javaType == Blob.class) { return "blob"; } else if (javaType == String.class) { return "varchar( 32672 )"; } else if (javaType == Clob.class) { return "clob"; } else if (javaType == BigDecimal.class) { return "decimal"; } else if (javaType == Double.class) { return "double"; } else if (javaType == Float.class) { return "float"; } else if (javaType == Integer.class) { return "integer"; } else if (javaType == byte[].class) { return "long varchar for bit data"; } else if (javaType == Short.class) { return "smallint"; } else if (javaType == Timestamp.class) { return "timestamp"; } else { throw new Exception( "Unsupported type of argument to Table Function: " + javaType.getName()); } } }