Class SQLTypes

java.lang.Object
net.ontopia.persistence.proxy.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.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static Object
    getObject(ResultSet rs, int index, int sql_type, boolean direct)
    INTERNAL: Reads the object of the given type at the specified index from the result set.
    static Class
    getType(int sql_type)
    INTERNAL: Gets the java class mapped to by the given SQL type.
    static int
    getType(Class klass)
    INTERNAL: Gets the SQL type mapped to the given java class.
    static void
    setObject(PreparedStatement stmt, int index, Object value, int sql_type)
    INTERNAL: Binds the object of the given type at the specified index in the prepared statement.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • SQLTypes

      public SQLTypes()
  • Method Details

    • 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