Java SQL Type isSimpleType(Class type)

Here you can find the source of isSimpleType(Class type)

Description

is Simple Type

License

Open Source License

Declaration

public static boolean isSimpleType(Class<?> type) 

Method Source Code


//package com.java2s;
import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.Date;

public class Main {
    private static final Class<?>[] SIMPLE_TYPES = { int.class, Integer.class, long.class, Long.class, float.class,
            Float.class, double.class, Double.class, BigDecimal.class, String.class, Date.class, Timestamp.class,
            byte[].class };

    public static boolean isSimpleType(Class<?> type) {
        for (Class<?> simpleType : SIMPLE_TYPES) {
            if (simpleType.equals(type))
                return true;
        }/*from ww  w  .  j av a  2 s  . co  m*/
        return false;
    }
}

Related

  1. isPrecisionRequired(int jdbcType)
  2. isPrimitive(Class type)
  3. isPrimitiveCollection(Method m)
  4. isScaleRequired(int type)
  5. isSerializationClass(Class clazz)
  6. isSqlTypeBinayBased(int javaSqlType)
  7. isSqlTypeSupported(int sqlType)
  8. isString(int colType)
  9. isStringType(int dataType)