@Test public void testConvertBooleanType() { assertEquals("java.lang.Boolean", KylinClient.convertType(Types.BOOLEAN).getName()); }
@SuppressWarnings("rawtypes") public static Class convertType(int sqlType) { Class result = Object.class; switch (sqlType) { case Types.CHAR: case Types.VARCHAR: case Types.LONGVARCHAR: result = String.class; break; case Types.NUMERIC: case Types.DECIMAL: result = BigDecimal.class; break; case Types.BIT: case Types.BOOLEAN: result = Boolean.class; break; case Types.TINYINT: result = Byte.class; break; case Types.SMALLINT: result = Short.class; break; case Types.INTEGER: result = Integer.class; break; case Types.BIGINT: result = Long.class; break; case Types.REAL: case Types.FLOAT: case Types.DOUBLE: result = Double.class; break; case Types.BINARY: case Types.VARBINARY: case Types.LONGVARBINARY: result = Byte[].class; break; case Types.DATE: result = Date.class; break; case Types.TIME: result = Time.class; break; case Types.TIMESTAMP: result = Timestamp.class; break; default: break; } return result; }
KylinClient implements IRemoteClient { @SuppressWarnings("rawtypes") public static Class convertType(int sqlType) { Class result = Object.class; switch (sqlType) { case Types.CHAR: case Types.VARCHAR: case Types.LONGVARCHAR: result = String.class; break; case Types.NUMERIC: case Types.DECIMAL: result = BigDecimal.class; break; case Types.BIT: case Types.BOOLEAN: result = Boolean.class; break; case Types.TINYINT: result = Byte.class; break; case Types.SMALLINT: result = Short.class; break; case Types.INTEGER: result = Integer.class; break; case Types.BIGINT: result = Long.class; break; case Types.REAL: case Types.FLOAT: case Types.DOUBLE: result = Double.class; break; case Types.BINARY: case Types.VARBINARY: case Types.LONGVARBINARY: result = Byte[].class; break; case Types.DATE: result = Date.class; break; case Types.TIME: result = Time.class; break; case Types.TIMESTAMP: result = Timestamp.class; break; default: break; } return result; } }
KylinClient implements IRemoteClient { @SuppressWarnings("rawtypes") public static Class convertType(int sqlType) { Class result = Object.class; switch (sqlType) { case Types.CHAR: case Types.VARCHAR: case Types.LONGVARCHAR: result = String.class; break; case Types.NUMERIC: case Types.DECIMAL: result = BigDecimal.class; break; case Types.BIT: case Types.BOOLEAN: result = Boolean.class; break; case Types.TINYINT: result = Byte.class; break; case Types.SMALLINT: result = Short.class; break; case Types.INTEGER: result = Integer.class; break; case Types.BIGINT: result = Long.class; break; case Types.REAL: case Types.FLOAT: case Types.DOUBLE: result = Double.class; break; case Types.BINARY: case Types.VARBINARY: case Types.LONGVARBINARY: result = Byte[].class; break; case Types.DATE: result = Date.class; break; case Types.TIME: result = Time.class; break; case Types.TIMESTAMP: result = Timestamp.class; break; default: break; } return result; } KylinClient(KylinConnectionInfo connInfo); }
KylinClient implements IRemoteClient { @SuppressWarnings("rawtypes") public static Class convertType(int sqlType) { Class result = Object.class; switch (sqlType) { case Types.CHAR: case Types.VARCHAR: case Types.LONGVARCHAR: result = String.class; break; case Types.NUMERIC: case Types.DECIMAL: result = BigDecimal.class; break; case Types.BIT: case Types.BOOLEAN: result = Boolean.class; break; case Types.TINYINT: result = Byte.class; break; case Types.SMALLINT: result = Short.class; break; case Types.INTEGER: result = Integer.class; break; case Types.BIGINT: result = Long.class; break; case Types.REAL: case Types.FLOAT: case Types.DOUBLE: result = Double.class; break; case Types.BINARY: case Types.VARBINARY: case Types.LONGVARBINARY: result = Byte[].class; break; case Types.DATE: result = Date.class; break; case Types.TIME: result = Time.class; break; case Types.TIMESTAMP: result = Timestamp.class; break; default: break; } return result; } KylinClient(KylinConnectionInfo connInfo); @SuppressWarnings("rawtypes") static Class convertType(int sqlType); static Object wrapObject(String value, int sqlType); @Override void connect(); @Override KMetaProject retrieveMetaData(String project); @Override QueryResult executeQuery(String sql, List<Object> paramValues,
            Map<String, String> queryToggles); @Override void close(); }
KylinClient implements IRemoteClient { @SuppressWarnings("rawtypes") public static Class convertType(int sqlType) { Class result = Object.class; switch (sqlType) { case Types.CHAR: case Types.VARCHAR: case Types.LONGVARCHAR: result = String.class; break; case Types.NUMERIC: case Types.DECIMAL: result = BigDecimal.class; break; case Types.BIT: case Types.BOOLEAN: result = Boolean.class; break; case Types.TINYINT: result = Byte.class; break; case Types.SMALLINT: result = Short.class; break; case Types.INTEGER: result = Integer.class; break; case Types.BIGINT: result = Long.class; break; case Types.REAL: case Types.FLOAT: case Types.DOUBLE: result = Double.class; break; case Types.BINARY: case Types.VARBINARY: case Types.LONGVARBINARY: result = Byte[].class; break; case Types.DATE: result = Date.class; break; case Types.TIME: result = Time.class; break; case Types.TIMESTAMP: result = Timestamp.class; break; default: break; } return result; } KylinClient(KylinConnectionInfo connInfo); @SuppressWarnings("rawtypes") static Class convertType(int sqlType); static Object wrapObject(String value, int sqlType); @Override void connect(); @Override KMetaProject retrieveMetaData(String project); @Override QueryResult executeQuery(String sql, List<Object> paramValues,
            Map<String, String> queryToggles); @Override void close();  }