test_class.file: code/src/test/java/com/googlecode/cqengine/index/sqlite/support/DBUtilsTest.java
test_class.identifier: DBUtilsTest
test_case.body: @Test
      public void testGetDBTypeForClass() throws Exception {
  
          Assert.assertEquals("INTEGER", DBUtils.getDBTypeForClass(Integer.class));
          Assert.assertEquals("INTEGER", DBUtils.getDBTypeForClass(Long.class));
          Assert.assertEquals("INTEGER", DBUtils.getDBTypeForClass(Short.class));
          Assert.assertEquals("INTEGER", DBUtils.getDBTypeForClass(Boolean.class));
  
          Assert.assertEquals("REAL", DBUtils.getDBTypeForClass(Float.class));
          Assert.assertEquals("REAL", DBUtils.getDBTypeForClass(Double.class));
  
          Assert.assertEquals("TEXT", DBUtils.getDBTypeForClass(String.class));
          Assert.assertEquals("TEXT", DBUtils.getDBTypeForClass(CharSequence.class));
          Assert.assertEquals("TEXT", DBUtils.getDBTypeForClass(BigDecimal.class));
  
          Assert.assertEquals("INTEGER", DBUtils.getDBTypeForClass(java.util.Date.class));
          Assert.assertEquals("INTEGER", DBUtils.getDBTypeForClass(java.sql.Date.class));
          Assert.assertEquals("INTEGER", DBUtils.getDBTypeForClass(Time.class));
          Assert.assertEquals("INTEGER", DBUtils.getDBTypeForClass(Timestamp.class));
  
          Assert.assertEquals("BLOB", DBUtils.getDBTypeForClass(byte[].class));
  
      }
test_case.class_method_signature: DBUtilsTest.testGetDBTypeForClass()
test_case.full_signature: @Test public void testGetDBTypeForClass()
test_case.identifier: testGetDBTypeForClass
test_case.invocations: assertEquals getDBTypeForClass assertEquals getDBTypeForClass assertEquals getDBTypeForClass assertEquals getDBTypeForClass assertEquals getDBTypeForClass assertEquals getDBTypeForClass assertEquals getDBTypeForClass assertEquals getDBTypeForClass assertEquals getDBTypeForClass assertEquals getDBTypeForClass assertEquals getDBTypeForClass assertEquals getDBTypeForClass assertEquals getDBTypeForClass assertEquals getDBTypeForClass
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testGetDBTypeForClass()
focal_class.file: code/src/main/java/com/googlecode/cqengine/index/sqlite/support/DBUtils.java
focal_class.identifier: DBUtils
focal_class.class_method_signature: DBUtils.wrapAsCloseable(final ResultSet resultSet)
focal_class.full_signature: public static Closeable wrapAsCloseable(final ResultSet resultSet)
focal_class.identifier: wrapAsCloseable
focal_class.modifiers: public static
focal_class.parameters: (final ResultSet resultSet)
focal_class.return: Closeable
focal_class.signature: Closeable wrapAsCloseable(final ResultSet resultSet)
focal_class.class_method_signature: DBUtils.setAutoCommit(final Connection connection, final boolean value)
focal_class.full_signature: public static boolean setAutoCommit(final Connection connection, final boolean value)
focal_class.identifier: setAutoCommit
focal_class.modifiers: public static
focal_class.parameters: (final Connection connection, final boolean value)
focal_class.return: boolean
focal_class.signature: boolean setAutoCommit(final Connection connection, final boolean value)
focal_class.class_method_signature: DBUtils.commit(final Connection connection)
focal_class.full_signature: public static void commit(final Connection connection)
focal_class.identifier: commit
focal_class.modifiers: public static
focal_class.parameters: (final Connection connection)
focal_class.return: void
focal_class.signature: void commit(final Connection connection)
focal_class.class_method_signature: DBUtils.rollback(final Connection connection)
focal_class.full_signature: public static boolean rollback(final Connection connection)
focal_class.identifier: rollback
focal_class.modifiers: public static
focal_class.parameters: (final Connection connection)
focal_class.return: boolean
focal_class.signature: boolean rollback(final Connection connection)
focal_class.class_method_signature: DBUtils.closeQuietly(java.sql.ResultSet resultSet)
focal_class.full_signature: public static void closeQuietly(java.sql.ResultSet resultSet)
focal_class.identifier: closeQuietly
focal_class.modifiers: public static
focal_class.parameters: (java.sql.ResultSet resultSet)
focal_class.return: void
focal_class.signature: void closeQuietly(java.sql.ResultSet resultSet)
focal_class.class_method_signature: DBUtils.closeQuietly(Statement statement)
focal_class.full_signature: public static void closeQuietly(Statement statement)
focal_class.identifier: closeQuietly
focal_class.modifiers: public static
focal_class.parameters: (Statement statement)
focal_class.return: void
focal_class.signature: void closeQuietly(Statement statement)
focal_class.class_method_signature: DBUtils.closeQuietly(Connection connection)
focal_class.full_signature: public static void closeQuietly(Connection connection)
focal_class.identifier: closeQuietly
focal_class.modifiers: public static
focal_class.parameters: (Connection connection)
focal_class.return: void
focal_class.signature: void closeQuietly(Connection connection)
focal_class.class_method_signature: DBUtils.getDBTypeForClass(final Class<?> valueType)
focal_class.full_signature: public static String getDBTypeForClass(final Class<?> valueType)
focal_class.identifier: getDBTypeForClass
focal_class.modifiers: public static
focal_class.parameters: (final Class<?> valueType)
focal_class.return: String
focal_class.signature: String getDBTypeForClass(final Class<?> valueType)
focal_class.class_method_signature: DBUtils.setValueToPreparedStatement(int index, final PreparedStatement preparedStatement, Object value)
focal_class.full_signature: public static void setValueToPreparedStatement(int index, final PreparedStatement preparedStatement, Object value)
focal_class.identifier: setValueToPreparedStatement
focal_class.modifiers: public static
focal_class.parameters: (int index, final PreparedStatement preparedStatement, Object value)
focal_class.return: void
focal_class.signature: void setValueToPreparedStatement(int index, final PreparedStatement preparedStatement, Object value)
focal_class.class_method_signature: DBUtils.setValuesToPreparedStatement(final int startIndex, final PreparedStatement preparedStatement, final Iterable values)
focal_class.full_signature: public static int setValuesToPreparedStatement(final int startIndex, final PreparedStatement preparedStatement, final Iterable values)
focal_class.identifier: setValuesToPreparedStatement
focal_class.modifiers: public static
focal_class.parameters: (final int startIndex, final PreparedStatement preparedStatement, final Iterable values)
focal_class.return: int
focal_class.signature: int setValuesToPreparedStatement(final int startIndex, final PreparedStatement preparedStatement, final Iterable values)
focal_class.class_method_signature: DBUtils.getValueFromResultSet(int index, final ResultSet resultSet, final Class<T> type)
focal_class.full_signature: @SuppressWarnings("unchecked") public static T getValueFromResultSet(int index, final ResultSet resultSet, final Class<T> type)
focal_class.identifier: getValueFromResultSet
focal_class.modifiers: @SuppressWarnings("unchecked") public static
focal_class.parameters: (int index, final ResultSet resultSet, final Class<T> type)
focal_class.return: T
focal_class.signature: T getValueFromResultSet(int index, final ResultSet resultSet, final Class<T> type)
focal_class.class_method_signature: DBUtils.sanitizeForTableName(String input)
focal_class.full_signature: public static String sanitizeForTableName(String input)
focal_class.identifier: sanitizeForTableName
focal_class.modifiers: public static
focal_class.parameters: (String input)
focal_class.return: String
focal_class.signature: String sanitizeForTableName(String input)
focal_method.body: public static String getDBTypeForClass(final Class<?> valueType){
  
          if ( CharSequence.class.isAssignableFrom(valueType) || BigDecimal.class.isAssignableFrom(valueType)) {
              return "TEXT";
  
          }else if (Long.class.isAssignableFrom(valueType) || Integer.class.isAssignableFrom(valueType) || Short.class.isAssignableFrom(valueType) || Boolean.class.isAssignableFrom(valueType) || Date.class.isAssignableFrom(valueType)) {
              return "INTEGER";
  
          }else if (Float.class.isAssignableFrom(valueType) || Double.class.isAssignableFrom(valueType)){
              return "REAL";
  
          }else if (valueType == byte[].class){
              return "BLOB";
  
          }else{
              throw new IllegalStateException("Type " + valueType + " not supported.");
          }
      }
focal_method.class_method_signature: DBUtils.getDBTypeForClass(final Class<?> valueType)
focal_method.full_signature: public static String getDBTypeForClass(final Class<?> valueType)
focal_method.identifier: getDBTypeForClass
focal_method.invocations: isAssignableFrom isAssignableFrom isAssignableFrom isAssignableFrom isAssignableFrom isAssignableFrom isAssignableFrom isAssignableFrom isAssignableFrom
focal_method.modifiers: public static
focal_method.parameters: (final Class<?> valueType)
focal_method.return: String
focal_method.signature: String getDBTypeForClass(final Class<?> valueType)