Package net.ontopia.persistence.proxy
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 int
SIZE_THRESHOLD
-
Constructor Summary
Constructors Constructor Description SQLTypes()
-
Method Summary
All Methods Static Methods Concrete Methods 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.
-
-
-
Field Detail
-
SIZE_THRESHOLD
public static final int SIZE_THRESHOLD
- See Also:
- Constant Field Values
-
-
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
-
-