static int getNullTypeCode(Class<?> c) {
		int iType = 0;

		String strFieldType = c.getName();

		if (strFieldType.equals("short")
				|| strFieldType.equals(Short.class.getName()))
			iType = java.sql.Types.SMALLINT;
		else if (strFieldType.equals("int")
				|| strFieldType.equals(Integer.class.getName()))
			iType = java.sql.Types.INTEGER;
		else if (strFieldType.equals("long")
				|| strFieldType.equals(Long.class.getName()))
			iType = java.sql.Types.BIGINT;
		else if (strFieldType.equals("float")
				|| strFieldType.equals(Float.class.getName()))
			iType = java.sql.Types.FLOAT;
		else if (strFieldType.equals("double")
				|| strFieldType.equals(Double.class.getName()))
			iType = java.sql.Types.DOUBLE;
		else if (strFieldType.equals("boolean")
				|| strFieldType.equals(Boolean.class.getName()))
			iType = java.sql.Types.BOOLEAN;
		else if (strFieldType.equals("java.lang.String"))
			iType = java.sql.Types.VARCHAR;
		else if (java.sql.Timestamp.class.isAssignableFrom(c))
			iType = java.sql.Types.TIMESTAMP;
		else if (java.sql.Date.class.isAssignableFrom(c))
			iType = java.sql.Types.DATE;
		else if (java.io.InputStream.class.isAssignableFrom(c))
			iType = java.sql.Types.BINARY;

		return iType;
	}
static int getNullTypeCode ( Class < ? > c ) { int iType = 0 ; String strFieldType = c . getName ( ) ; if ( strFieldType . equals ( "short" ) || strFieldType . equals ( Short . class . getName ( ) ) ) iType = java . sql . Types . SMALLINT ; else if ( strFieldType . equals ( "int" ) || strFieldType . equals ( Integer . class . getName ( ) ) ) iType = java . sql . Types . INTEGER ; else if ( strFieldType . equals ( "long" ) || strFieldType . equals ( Long . class . getName ( ) ) ) iType = java . sql . Types . BIGINT ; else if ( strFieldType . equals ( "float" ) || strFieldType . equals ( Float . class . getName ( ) ) ) iType = java . sql . Types . FLOAT ; else if ( strFieldType . equals ( "double" ) || strFieldType . equals ( Double . class . getName ( ) ) ) iType = java . sql . Types . DOUBLE ; else if ( strFieldType . equals ( "boolean" ) || strFieldType . equals ( Boolean . class . getName ( ) ) ) iType = java . sql . Types . BOOLEAN ; else if ( strFieldType . equals ( "java.lang.String" ) ) iType = java . sql . Types . VARCHAR ; else if ( java . sql . Timestamp . class . isAssignableFrom ( c ) ) iType = java . sql . Types . TIMESTAMP ; else if ( java . sql . Date . class . isAssignableFrom ( c ) ) iType = java . sql . Types . DATE ; else if ( java . io . InputStream . class . isAssignableFrom ( c ) ) iType = java . sql . Types . BINARY ; return iType ; }
获取数据类型