Java SQL Type convertStringToType(String type)

Here you can find the source of convertStringToType(String type)

Description

convert String To Type

License

Open Source License

Declaration

private static int convertStringToType(String type) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.sql.Types;

public class Main {
    private static int convertStringToType(String type) {
        if (type.equalsIgnoreCase("INTEGER"))
            return Types.INTEGER;
        else if (type.equalsIgnoreCase("CHAR"))
            return Types.CHAR;
        else if (type.equalsIgnoreCase("VARCHAR"))
            return Types.VARCHAR;
        else if (type.equalsIgnoreCase("DATE"))
            return Types.DATE;
        else//w ww  . j  a v a  2 s .  c  o  m
            return Types.BLOB;
    }
}

Related

  1. convertKnownType(Object one, Class to)
  2. convertNumeric(Object value, int srcType, int destType)
  3. convertOracleValue(Object value, int type)
  4. convertParam(Object oValue, Class cType, String sFieldName)
  5. convertSQLtype2JavaClassName(int type)
  6. convertTemporal(Object value, int srcType, int destType)
  7. convertToJDBCType(String talendType)
  8. convertToProperty(Object value)
  9. convertToStream(final Object o)