Class TypesUtil

java.lang.Object
com.kheops.util.TypesUtil

public class TypesUtil extends Object
  • Constructor Details

    • TypesUtil

      public TypesUtil()
  • Method Details

    • convert

      public static Object convert(String str, int dataType) throws Exception
      Throws:
      Exception
    • getSQLType

      public static String getSQLType(int type)
      This method returns the name that defines a SQL type Id.
      Parameters:
      type - an SQL type Id.
      Returns:
      the name that defines a SQL type.
    • getSQLType

      public static JDBCType getSQLType(Class<?> clazz)
    • getSQLType

      public static int getSQLType(Object o)
      This method returns the equivalent SQL data type for a Java object.
      Parameters:
      o - a Java object
      Returns:
      the SQL type Id.
    • isSQLTypeNumeric

      public static boolean isSQLTypeNumeric(int type)
      Return a boolean that indicates if a SQL type is numeric
      Parameters:
      type - the SQL type
      Returns:
      a boolean that indicates if the SQL type is numeric
    • isSQLTypeReal

      public static boolean isSQLTypeReal(int type)
      Return a boolean that indicates if a SQL type is numeric
      Parameters:
      type - the SQL type
      Returns:
      a boolean that indicates if the SQL type is numeric
    • isSQLTypeString

      public static boolean isSQLTypeString(int type)
    • isSQLTypeTimeStamp

      public static boolean isSQLTypeTimeStamp(int type)
      Return a boolean that indicates if a SQL type is TimeStamp
      Parameters:
      type - the SQL type
      Returns:
      a boolean that indicates if the SQL type is TimeStamp
    • isSQLTypeBinary

      public static boolean isSQLTypeBinary(int type)
      Return a boolean that indicates if a SQL type is binary or other than current type
      Parameters:
      type - the SQL type
      Returns:
      a boolean that indicates if the SQL type is binary or other than current type
    • sqlTypeToClass

      public static Class<?> sqlTypeToClass(int type)
      Returns the Java class associated with a SQL type.
      Parameters:
      type - the sql type
      Returns:
      the associated java class; if none, Object class is returned
      See Also: