Class SQLTypes


  • public class SQLTypes
    extends Object
    INTERNAL: Utility class for handling access to columns by proper SQL type. Note that all type integers are the same as the ones in java.sql.Types.
    • Constructor Detail

      • SQLTypes

        public SQLTypes()
    • Method Detail

      • getType

        public static int getType​(Class klass)
        INTERNAL: Gets the SQL type mapped to the given java class.
      • getType

        public static Class getType​(int sql_type)
        INTERNAL: Gets the java class mapped to by the given SQL type.
      • getObject

        public static Object getObject​(ResultSet rs,
                                       int index,
                                       int sql_type,
                                       boolean direct)
                                throws SQLException
        INTERNAL: Reads the object of the given type at the specified index from the result set.
        Throws:
        SQLException
      • setObject

        public static void setObject​(PreparedStatement stmt,
                                     int index,
                                     Object value,
                                     int sql_type)
                              throws SQLException
        INTERNAL: Binds the object of the given type at the specified index in the prepared statement.
        Throws:
        SQLException