target
stringlengths
20
113k
src_fm
stringlengths
11
86.3k
src_fm_fc
stringlengths
21
86.4k
src_fm_fc_co
stringlengths
30
86.4k
src_fm_fc_ms
stringlengths
42
86.8k
src_fm_fc_ms_ff
stringlengths
43
86.8k
@Test public void testContainsKey() throws Exception { QueryParameters params = new QueryParameters(superman.getClass(), superman); Assert.assertEquals(true, params.containsKey("name")); Assert.assertEquals(true, params.containsKey("origin")); Assert.assertEquals(true, params.containsKey("strength")); }
public boolean containsKey(String key) { return this.values.containsKey(processKey(key)); }
QueryParameters { public boolean containsKey(String key) { return this.values.containsKey(processKey(key)); } }
QueryParameters { public boolean containsKey(String key) { return this.values.containsKey(processKey(key)); } QueryParameters(); QueryParameters(Map<String, Object> map); QueryParameters(Class<?> clazz, Object bean); QueryParameters(QueryParameters parameters); QueryParameters(ProcessedInput processedInput); Query...
QueryParameters { public boolean containsKey(String key) { return this.values.containsKey(processKey(key)); } QueryParameters(); QueryParameters(Map<String, Object> map); QueryParameters(Class<?> clazz, Object bean); QueryParameters(QueryParameters parameters); QueryParameters(ProcessedInput processedInput); Query...
QueryParameters { public boolean containsKey(String key) { return this.values.containsKey(processKey(key)); } QueryParameters(); QueryParameters(Map<String, Object> map); QueryParameters(Class<?> clazz, Object bean); QueryParameters(QueryParameters parameters); QueryParameters(ProcessedInput processedInput); Query...
@Test public void testRemove() throws Exception { QueryParameters params = new QueryParameters(superman.getClass(), superman); Assert.assertEquals(true, params.containsKey("name")); Assert.assertEquals(true, params.containsKey("strength")); Assert.assertEquals(true, params.containsKey("origin")); params.remove("name");...
public void remove(String key) { String processedKey = processKey(key); String orderKey = null; for (int i = 0; i < this.order.size(); i++) { orderKey = this.order.get(i); if (orderKey != null && orderKey.equals(processedKey) == true) { this.order.remove(i); } } this.types.remove(processedKey); this.direction.remove(pr...
QueryParameters { public void remove(String key) { String processedKey = processKey(key); String orderKey = null; for (int i = 0; i < this.order.size(); i++) { orderKey = this.order.get(i); if (orderKey != null && orderKey.equals(processedKey) == true) { this.order.remove(i); } } this.types.remove(processedKey); this.d...
QueryParameters { public void remove(String key) { String processedKey = processKey(key); String orderKey = null; for (int i = 0; i < this.order.size(); i++) { orderKey = this.order.get(i); if (orderKey != null && orderKey.equals(processedKey) == true) { this.order.remove(i); } } this.types.remove(processedKey); this.d...
QueryParameters { public void remove(String key) { String processedKey = processKey(key); String orderKey = null; for (int i = 0; i < this.order.size(); i++) { orderKey = this.order.get(i); if (orderKey != null && orderKey.equals(processedKey) == true) { this.order.remove(i); } } this.types.remove(processedKey); this.d...
QueryParameters { public void remove(String key) { String processedKey = processKey(key); String orderKey = null; for (int i = 0; i < this.order.size(); i++) { orderKey = this.order.get(i); if (orderKey != null && orderKey.equals(processedKey) == true) { this.order.remove(i); } } this.types.remove(processedKey); this.d...
@Test public void testSize() throws Exception { QueryParameters params = new QueryParameters(superman.getClass(), superman); Assert.assertEquals(3, params.size()); params.remove("name"); Assert.assertEquals(2, params.size()); }
public int size() { return this.values.size(); }
QueryParameters { public int size() { return this.values.size(); } }
QueryParameters { public int size() { return this.values.size(); } QueryParameters(); QueryParameters(Map<String, Object> map); QueryParameters(Class<?> clazz, Object bean); QueryParameters(QueryParameters parameters); QueryParameters(ProcessedInput processedInput); QueryParameters(Object... params); }
QueryParameters { public int size() { return this.values.size(); } QueryParameters(); QueryParameters(Map<String, Object> map); QueryParameters(Class<?> clazz, Object bean); QueryParameters(QueryParameters parameters); QueryParameters(ProcessedInput processedInput); QueryParameters(Object... params); void importVa...
QueryParameters { public int size() { return this.values.size(); } QueryParameters(); QueryParameters(Map<String, Object> map); QueryParameters(Class<?> clazz, Object bean); QueryParameters(QueryParameters parameters); QueryParameters(ProcessedInput processedInput); QueryParameters(Object... params); void importVa...
@Test(expected = NoClassDefFoundError.class) public void testCreateDataSourceUrl4() throws Exception { MidaoFactory.createDataSource("", "", "", "", 0, 0); }
public static DataSource createDataSource(Properties poolProperties) throws SQLException { try { return MidaoFrameworkPoolBinder.createDataSource(poolProperties); } catch (NoClassDefFoundError ex) { throw new NoClassDefFoundError(ERROR_COULDNT_FIND_POOL_PROVIDER); } }
MidaoFactory { public static DataSource createDataSource(Properties poolProperties) throws SQLException { try { return MidaoFrameworkPoolBinder.createDataSource(poolProperties); } catch (NoClassDefFoundError ex) { throw new NoClassDefFoundError(ERROR_COULDNT_FIND_POOL_PROVIDER); } } }
MidaoFactory { public static DataSource createDataSource(Properties poolProperties) throws SQLException { try { return MidaoFrameworkPoolBinder.createDataSource(poolProperties); } catch (NoClassDefFoundError ex) { throw new NoClassDefFoundError(ERROR_COULDNT_FIND_POOL_PROVIDER); } } }
MidaoFactory { public static DataSource createDataSource(Properties poolProperties) throws SQLException { try { return MidaoFrameworkPoolBinder.createDataSource(poolProperties); } catch (NoClassDefFoundError ex) { throw new NoClassDefFoundError(ERROR_COULDNT_FIND_POOL_PROVIDER); } } static QueryRunnerService getQueryR...
MidaoFactory { public static DataSource createDataSource(Properties poolProperties) throws SQLException { try { return MidaoFrameworkPoolBinder.createDataSource(poolProperties); } catch (NoClassDefFoundError ex) { throw new NoClassDefFoundError(ERROR_COULDNT_FIND_POOL_PROVIDER); } } static QueryRunnerService getQueryR...
@Test public void testSetCaseSensitive() throws Exception { QueryParameters params = new QueryParameters(superman.getClass(), superman); params.setCaseSensitive(false); Assert.assertEquals(3, params.size()); params.set("NaMe", "batman"); Assert.assertEquals(3, params.size()); params.setCaseSensitive(true); params.set("...
public void setCaseSensitive(boolean newValue) { this.isCaseSensitive = newValue; }
QueryParameters { public void setCaseSensitive(boolean newValue) { this.isCaseSensitive = newValue; } }
QueryParameters { public void setCaseSensitive(boolean newValue) { this.isCaseSensitive = newValue; } QueryParameters(); QueryParameters(Map<String, Object> map); QueryParameters(Class<?> clazz, Object bean); QueryParameters(QueryParameters parameters); QueryParameters(ProcessedInput processedInput); QueryParamete...
QueryParameters { public void setCaseSensitive(boolean newValue) { this.isCaseSensitive = newValue; } QueryParameters(); QueryParameters(Map<String, Object> map); QueryParameters(Class<?> clazz, Object bean); QueryParameters(QueryParameters parameters); QueryParameters(ProcessedInput processedInput); QueryParamete...
QueryParameters { public void setCaseSensitive(boolean newValue) { this.isCaseSensitive = newValue; } QueryParameters(); QueryParameters(Map<String, Object> map); QueryParameters(Class<?> clazz, Object bean); QueryParameters(QueryParameters parameters); QueryParameters(ProcessedInput processedInput); QueryParamete...
@Test public void testIsCaseSensitive() throws Exception { QueryParameters params = new QueryParameters(superman.getClass(), superman); Assert.assertEquals(false, params.isCaseSensitive()); }
public boolean isCaseSensitive() { return this.isCaseSensitive; }
QueryParameters { public boolean isCaseSensitive() { return this.isCaseSensitive; } }
QueryParameters { public boolean isCaseSensitive() { return this.isCaseSensitive; } QueryParameters(); QueryParameters(Map<String, Object> map); QueryParameters(Class<?> clazz, Object bean); QueryParameters(QueryParameters parameters); QueryParameters(ProcessedInput processedInput); QueryParameters(Object... param...
QueryParameters { public boolean isCaseSensitive() { return this.isCaseSensitive; } QueryParameters(); QueryParameters(Map<String, Object> map); QueryParameters(Class<?> clazz, Object bean); QueryParameters(QueryParameters parameters); QueryParameters(ProcessedInput processedInput); QueryParameters(Object... param...
QueryParameters { public boolean isCaseSensitive() { return this.isCaseSensitive; } QueryParameters(); QueryParameters(Map<String, Object> map); QueryParameters(Class<?> clazz, Object bean); QueryParameters(QueryParameters parameters); QueryParameters(ProcessedInput processedInput); QueryParameters(Object... param...
@Test public void testSetReturn() throws Exception { QueryParameters params = new QueryParameters(superman.getClass(), superman); List<QueryParameters> paramsList = new ArrayList<QueryParameters>(); params.setReturn(paramsList); Assert.assertEquals(paramsList, params.getReturn()); }
public void setReturn(Object queryOutput) { this.set(QUERY_PARAMS_RETURN, queryOutput); }
QueryParameters { public void setReturn(Object queryOutput) { this.set(QUERY_PARAMS_RETURN, queryOutput); } }
QueryParameters { public void setReturn(Object queryOutput) { this.set(QUERY_PARAMS_RETURN, queryOutput); } QueryParameters(); QueryParameters(Map<String, Object> map); QueryParameters(Class<?> clazz, Object bean); QueryParameters(QueryParameters parameters); QueryParameters(ProcessedInput processedInput); QueryPa...
QueryParameters { public void setReturn(Object queryOutput) { this.set(QUERY_PARAMS_RETURN, queryOutput); } QueryParameters(); QueryParameters(Map<String, Object> map); QueryParameters(Class<?> clazz, Object bean); QueryParameters(QueryParameters parameters); QueryParameters(ProcessedInput processedInput); QueryPa...
QueryParameters { public void setReturn(Object queryOutput) { this.set(QUERY_PARAMS_RETURN, queryOutput); } QueryParameters(); QueryParameters(Map<String, Object> map); QueryParameters(Class<?> clazz, Object bean); QueryParameters(QueryParameters parameters); QueryParameters(ProcessedInput processedInput); QueryPa...
@Test public void testGetReturn() throws Exception { testSetReturn(); }
public Object getReturn() { Object result = null; if (this.containsKey(QUERY_PARAMS_RETURN) == true) { result = this.getValue(QUERY_PARAMS_RETURN); } return result; }
QueryParameters { public Object getReturn() { Object result = null; if (this.containsKey(QUERY_PARAMS_RETURN) == true) { result = this.getValue(QUERY_PARAMS_RETURN); } return result; } }
QueryParameters { public Object getReturn() { Object result = null; if (this.containsKey(QUERY_PARAMS_RETURN) == true) { result = this.getValue(QUERY_PARAMS_RETURN); } return result; } QueryParameters(); QueryParameters(Map<String, Object> map); QueryParameters(Class<?> clazz, Object bean); QueryParameters(QueryPara...
QueryParameters { public Object getReturn() { Object result = null; if (this.containsKey(QUERY_PARAMS_RETURN) == true) { result = this.getValue(QUERY_PARAMS_RETURN); } return result; } QueryParameters(); QueryParameters(Map<String, Object> map); QueryParameters(Class<?> clazz, Object bean); QueryParameters(QueryPara...
QueryParameters { public Object getReturn() { Object result = null; if (this.containsKey(QUERY_PARAMS_RETURN) == true) { result = this.getValue(QUERY_PARAMS_RETURN); } return result; } QueryParameters(); QueryParameters(Map<String, Object> map); QueryParameters(Class<?> clazz, Object bean); QueryParameters(QueryPara...
@Test public void testRemoveReturn() throws Exception { QueryParameters params = new QueryParameters(superman.getClass(), superman); List<QueryParameters> paramsList = new ArrayList<QueryParameters>(); params.setReturn(paramsList); Assert.assertEquals(paramsList, params.getReturn()); params.removeReturn(); Assert.asser...
public void removeReturn() { if (this.containsKey(QUERY_PARAMS_RETURN) == true) { this.remove(QUERY_PARAMS_RETURN); } }
QueryParameters { public void removeReturn() { if (this.containsKey(QUERY_PARAMS_RETURN) == true) { this.remove(QUERY_PARAMS_RETURN); } } }
QueryParameters { public void removeReturn() { if (this.containsKey(QUERY_PARAMS_RETURN) == true) { this.remove(QUERY_PARAMS_RETURN); } } QueryParameters(); QueryParameters(Map<String, Object> map); QueryParameters(Class<?> clazz, Object bean); QueryParameters(QueryParameters parameters); QueryParameters(ProcessedI...
QueryParameters { public void removeReturn() { if (this.containsKey(QUERY_PARAMS_RETURN) == true) { this.remove(QUERY_PARAMS_RETURN); } } QueryParameters(); QueryParameters(Map<String, Object> map); QueryParameters(Class<?> clazz, Object bean); QueryParameters(QueryParameters parameters); QueryParameters(ProcessedI...
QueryParameters { public void removeReturn() { if (this.containsKey(QUERY_PARAMS_RETURN) == true) { this.remove(QUERY_PARAMS_RETURN); } } QueryParameters(); QueryParameters(Map<String, Object> map); QueryParameters(Class<?> clazz, Object bean); QueryParameters(QueryParameters parameters); QueryParameters(ProcessedI...
@Test public void testUpdate() throws Exception { QueryParameters params = new QueryParameters(superman.getClass(), superman); Object[] expectedValues = new Object[]{superman.getName(), superman.getOrigin(), superman.getStrength()}; Object[] updateValues = new Object[]{null, "batman", "earth"}; Object[] updatedValues =...
public void update(Object[] newValues, boolean updateOutOnly) { AssertUtils.assertNotNull(newValues); if (newValues.length != this.values.size()) { throw new IllegalArgumentException(ERROR_INCORRECT_LENGTH); } this.assertIncorrectOrder(); String parameterName = null; for (int i = 0; i < newValues.length; i++) { paramet...
QueryParameters { public void update(Object[] newValues, boolean updateOutOnly) { AssertUtils.assertNotNull(newValues); if (newValues.length != this.values.size()) { throw new IllegalArgumentException(ERROR_INCORRECT_LENGTH); } this.assertIncorrectOrder(); String parameterName = null; for (int i = 0; i < newValues.leng...
QueryParameters { public void update(Object[] newValues, boolean updateOutOnly) { AssertUtils.assertNotNull(newValues); if (newValues.length != this.values.size()) { throw new IllegalArgumentException(ERROR_INCORRECT_LENGTH); } this.assertIncorrectOrder(); String parameterName = null; for (int i = 0; i < newValues.leng...
QueryParameters { public void update(Object[] newValues, boolean updateOutOnly) { AssertUtils.assertNotNull(newValues); if (newValues.length != this.values.size()) { throw new IllegalArgumentException(ERROR_INCORRECT_LENGTH); } this.assertIncorrectOrder(); String parameterName = null; for (int i = 0; i < newValues.leng...
QueryParameters { public void update(Object[] newValues, boolean updateOutOnly) { AssertUtils.assertNotNull(newValues); if (newValues.length != this.values.size()) { throw new IllegalArgumentException(ERROR_INCORRECT_LENGTH); } this.assertIncorrectOrder(); String parameterName = null; for (int i = 0; i < newValues.leng...
@Test public void testUpdateAndClean() throws Exception { QueryParameters params = new QueryParameters(superman.getClass(), superman); params.set("once_bested_by", "doomsday"); Object[] updatedValues = new Object[]{100, "batman", "earth"}; ProcessedInput processedInput = new ProcessedInput("original query"); processedI...
public void updateAndClean(ProcessedInput processedInput) { List<String> processedParameters = new ArrayList<String>(); if (processedInput.getAmountOfParameters() > 0) { String parameterName = null; for (int i = 0; i < processedInput.getAmountOfParameters(); i++) { parameterName = processedInput.getParameterName(i); pr...
QueryParameters { public void updateAndClean(ProcessedInput processedInput) { List<String> processedParameters = new ArrayList<String>(); if (processedInput.getAmountOfParameters() > 0) { String parameterName = null; for (int i = 0; i < processedInput.getAmountOfParameters(); i++) { parameterName = processedInput.getPa...
QueryParameters { public void updateAndClean(ProcessedInput processedInput) { List<String> processedParameters = new ArrayList<String>(); if (processedInput.getAmountOfParameters() > 0) { String parameterName = null; for (int i = 0; i < processedInput.getAmountOfParameters(); i++) { parameterName = processedInput.getPa...
QueryParameters { public void updateAndClean(ProcessedInput processedInput) { List<String> processedParameters = new ArrayList<String>(); if (processedInput.getAmountOfParameters() > 0) { String parameterName = null; for (int i = 0; i < processedInput.getAmountOfParameters(); i++) { parameterName = processedInput.getPa...
QueryParameters { public void updateAndClean(ProcessedInput processedInput) { List<String> processedParameters = new ArrayList<String>(); if (processedInput.getAmountOfParameters() > 0) { String parameterName = null; for (int i = 0; i < processedInput.getAmountOfParameters(); i++) { parameterName = processedInput.getPa...
@Test public void testGetValuesArray() throws Exception { QueryParameters params = new QueryParameters(superman.getClass(), superman); Assert.assertTrue(Arrays.asList(new Object[]{superman.getStrength(), superman.getName(), superman.getOrigin()}).containsAll(Arrays.asList(params.getValuesArray()))); }
public Object[] getValuesArray() { this.assertIncorrectOrder(); Object[] params = new Object[this.order.size()]; String parameterName = null; for (int i = 0; i < this.order.size(); i++) { parameterName = this.getNameByPosition(i); params[i] = this.getValue(parameterName); } return params; }
QueryParameters { public Object[] getValuesArray() { this.assertIncorrectOrder(); Object[] params = new Object[this.order.size()]; String parameterName = null; for (int i = 0; i < this.order.size(); i++) { parameterName = this.getNameByPosition(i); params[i] = this.getValue(parameterName); } return params; } }
QueryParameters { public Object[] getValuesArray() { this.assertIncorrectOrder(); Object[] params = new Object[this.order.size()]; String parameterName = null; for (int i = 0; i < this.order.size(); i++) { parameterName = this.getNameByPosition(i); params[i] = this.getValue(parameterName); } return params; } QueryParam...
QueryParameters { public Object[] getValuesArray() { this.assertIncorrectOrder(); Object[] params = new Object[this.order.size()]; String parameterName = null; for (int i = 0; i < this.order.size(); i++) { parameterName = this.getNameByPosition(i); params[i] = this.getValue(parameterName); } return params; } QueryParam...
QueryParameters { public Object[] getValuesArray() { this.assertIncorrectOrder(); Object[] params = new Object[this.order.size()]; String parameterName = null; for (int i = 0; i < this.order.size(); i++) { parameterName = this.getNameByPosition(i); params[i] = this.getValue(parameterName); } return params; } QueryParam...
@Test public void testIsOrderSet() throws Exception { QueryParameters params = new QueryParameters(superman.getClass(), superman); Assert.assertEquals(true, params.isOrderSet()); params.remove("strength"); params.updateValue("strength", 99); Assert.assertEquals(false, params.isOrderSet()); }
public boolean isOrderSet() { boolean result = true; if (this.values.size() != this.order.size()) { result = false; } return result; }
QueryParameters { public boolean isOrderSet() { boolean result = true; if (this.values.size() != this.order.size()) { result = false; } return result; } }
QueryParameters { public boolean isOrderSet() { boolean result = true; if (this.values.size() != this.order.size()) { result = false; } return result; } QueryParameters(); QueryParameters(Map<String, Object> map); QueryParameters(Class<?> clazz, Object bean); QueryParameters(QueryParameters parameters); QueryParame...
QueryParameters { public boolean isOrderSet() { boolean result = true; if (this.values.size() != this.order.size()) { result = false; } return result; } QueryParameters(); QueryParameters(Map<String, Object> map); QueryParameters(Class<?> clazz, Object bean); QueryParameters(QueryParameters parameters); QueryParame...
QueryParameters { public boolean isOrderSet() { boolean result = true; if (this.values.size() != this.order.size()) { result = false; } return result; } QueryParameters(); QueryParameters(Map<String, Object> map); QueryParameters(Class<?> clazz, Object bean); QueryParameters(QueryParameters parameters); QueryParame...
@Test public void testAssertIncorrectOrder() throws Exception { QueryParameters params = new QueryParameters(superman.getClass(), superman); try { params.assertIncorrectOrder(); } catch (IllegalArgumentException ex) { fail(); } params.remove("strength"); params.updateValue("strength", 99); try { params.assertIncorrectO...
public void assertIncorrectOrder() { if (this.isOrderSet() == false) { throw new IllegalArgumentException(ERROR_ORDER_NOT_INIT); } }
QueryParameters { public void assertIncorrectOrder() { if (this.isOrderSet() == false) { throw new IllegalArgumentException(ERROR_ORDER_NOT_INIT); } } }
QueryParameters { public void assertIncorrectOrder() { if (this.isOrderSet() == false) { throw new IllegalArgumentException(ERROR_ORDER_NOT_INIT); } } QueryParameters(); QueryParameters(Map<String, Object> map); QueryParameters(Class<?> clazz, Object bean); QueryParameters(QueryParameters parameters); QueryParamete...
QueryParameters { public void assertIncorrectOrder() { if (this.isOrderSet() == false) { throw new IllegalArgumentException(ERROR_ORDER_NOT_INIT); } } QueryParameters(); QueryParameters(Map<String, Object> map); QueryParameters(Class<?> clazz, Object bean); QueryParameters(QueryParameters parameters); QueryParamete...
QueryParameters { public void assertIncorrectOrder() { if (this.isOrderSet() == false) { throw new IllegalArgumentException(ERROR_ORDER_NOT_INIT); } } QueryParameters(); QueryParameters(Map<String, Object> map); QueryParameters(Class<?> clazz, Object bean); QueryParameters(QueryParameters parameters); QueryParamete...
@Test public void testBaseExceptionHandler() throws SQLException { ((QueryRunner) runner).setExceptionHandler(baseExceptionHandler); try { runner.query("SQL generates Exception", new MapOutputHandler()); } catch (Exception ex) { Assert.assertEquals(" Query: SQL generates Exception Parameters: [QueryParameters CI { }]",...
public BaseExceptionHandler(String dbName) { this.dbName = dbName; }
BaseExceptionHandler implements ExceptionHandler { public BaseExceptionHandler(String dbName) { this.dbName = dbName; } }
BaseExceptionHandler implements ExceptionHandler { public BaseExceptionHandler(String dbName) { this.dbName = dbName; } BaseExceptionHandler(String dbName); }
BaseExceptionHandler implements ExceptionHandler { public BaseExceptionHandler(String dbName) { this.dbName = dbName; } BaseExceptionHandler(String dbName); MjdbcSQLException convert(Connection conn, SQLException cause, String sql, Object... params); }
BaseExceptionHandler implements ExceptionHandler { public BaseExceptionHandler(String dbName) { this.dbName = dbName; } BaseExceptionHandler(String dbName); MjdbcSQLException convert(Connection conn, SQLException cause, String sql, Object... params); }
@Test public void testAddParameter() throws Exception { ProcessedInput processedInput = new ProcessedInput("original SQL"); processedInput.addParameter("parameter", 3, 9); Assert.assertEquals("parameter", processedInput.getSqlParameterNames().get(0)); org.junit.Assert.assertArrayEquals(new int[]{3, 9}, processedInput.g...
public void addParameter(String parameterName, int parameterStart, int parameterEnd, String parameterType, String parameterDirection) { if (this.sqlParameterNames == null) { this.sqlParameterNames = new ArrayList<String>(); this.sqlParameterBoundaries = new ArrayList<int[]>(); } this.sqlParameterNames.add(parameterName...
ProcessedInput { public void addParameter(String parameterName, int parameterStart, int parameterEnd, String parameterType, String parameterDirection) { if (this.sqlParameterNames == null) { this.sqlParameterNames = new ArrayList<String>(); this.sqlParameterBoundaries = new ArrayList<int[]>(); } this.sqlParameterNames....
ProcessedInput { public void addParameter(String parameterName, int parameterStart, int parameterEnd, String parameterType, String parameterDirection) { if (this.sqlParameterNames == null) { this.sqlParameterNames = new ArrayList<String>(); this.sqlParameterBoundaries = new ArrayList<int[]>(); } this.sqlParameterNames....
ProcessedInput { public void addParameter(String parameterName, int parameterStart, int parameterEnd, String parameterType, String parameterDirection) { if (this.sqlParameterNames == null) { this.sqlParameterNames = new ArrayList<String>(); this.sqlParameterBoundaries = new ArrayList<int[]>(); } this.sqlParameterNames....
ProcessedInput { public void addParameter(String parameterName, int parameterStart, int parameterEnd, String parameterType, String parameterDirection) { if (this.sqlParameterNames == null) { this.sqlParameterNames = new ArrayList<String>(); this.sqlParameterBoundaries = new ArrayList<int[]>(); } this.sqlParameterNames....
@Test public void testGetOriginalSql() throws Exception { String originalSql = "original SQL"; ProcessedInput processedInput = new ProcessedInput(originalSql); Assert.assertEquals(originalSql, processedInput.getOriginalSql()); }
public String getOriginalSql() { return originalSql; }
ProcessedInput { public String getOriginalSql() { return originalSql; } }
ProcessedInput { public String getOriginalSql() { return originalSql; } ProcessedInput(String originalSql); ProcessedInput(ProcessedInput processedInput); ProcessedInput(String originalSql, String parsedSql, List<String> sqlParameterNames, List<int[]> sqlParameterBoundaries, List<Object> sqlParameterValues, List<Stri...
ProcessedInput { public String getOriginalSql() { return originalSql; } ProcessedInput(String originalSql); ProcessedInput(ProcessedInput processedInput); ProcessedInput(String originalSql, String parsedSql, List<String> sqlParameterNames, List<int[]> sqlParameterBoundaries, List<Object> sqlParameterValues, List<Stri...
ProcessedInput { public String getOriginalSql() { return originalSql; } ProcessedInput(String originalSql); ProcessedInput(ProcessedInput processedInput); ProcessedInput(String originalSql, String parsedSql, List<String> sqlParameterNames, List<int[]> sqlParameterBoundaries, List<Object> sqlParameterValues, List<Stri...
@Test public void testGetParsedSql() throws Exception { String originalSql = "original SQL"; String parsedSql = "parsed SQL"; ProcessedInput processedInput = new ProcessedInput(originalSql); processedInput.setParsedSql(parsedSql); Assert.assertEquals(originalSql, processedInput.getOriginalSql()); Assert.assertEquals(pa...
public String getParsedSql() { return parsedSql; }
ProcessedInput { public String getParsedSql() { return parsedSql; } }
ProcessedInput { public String getParsedSql() { return parsedSql; } ProcessedInput(String originalSql); ProcessedInput(ProcessedInput processedInput); ProcessedInput(String originalSql, String parsedSql, List<String> sqlParameterNames, List<int[]> sqlParameterBoundaries, List<Object> sqlParameterValues, List<String> ...
ProcessedInput { public String getParsedSql() { return parsedSql; } ProcessedInput(String originalSql); ProcessedInput(ProcessedInput processedInput); ProcessedInput(String originalSql, String parsedSql, List<String> sqlParameterNames, List<int[]> sqlParameterBoundaries, List<Object> sqlParameterValues, List<String> ...
ProcessedInput { public String getParsedSql() { return parsedSql; } ProcessedInput(String originalSql); ProcessedInput(ProcessedInput processedInput); ProcessedInput(String originalSql, String parsedSql, List<String> sqlParameterNames, List<int[]> sqlParameterBoundaries, List<Object> sqlParameterValues, List<String> ...
@Test public void testGetSqlParameterNames() throws Exception { List<String> sqlParameterNames = new ArrayList<String>(); sqlParameterNames.add("name"); sqlParameterNames.add("origin"); sqlParameterNames.add("strength"); ProcessedInput processedInput = new ProcessedInput(""); processedInput.addParameter(sqlParameterNam...
public List<String> getSqlParameterNames() { return sqlParameterNames; }
ProcessedInput { public List<String> getSqlParameterNames() { return sqlParameterNames; } }
ProcessedInput { public List<String> getSqlParameterNames() { return sqlParameterNames; } ProcessedInput(String originalSql); ProcessedInput(ProcessedInput processedInput); ProcessedInput(String originalSql, String parsedSql, List<String> sqlParameterNames, List<int[]> sqlParameterBoundaries, List<Object> sqlParamete...
ProcessedInput { public List<String> getSqlParameterNames() { return sqlParameterNames; } ProcessedInput(String originalSql); ProcessedInput(ProcessedInput processedInput); ProcessedInput(String originalSql, String parsedSql, List<String> sqlParameterNames, List<int[]> sqlParameterBoundaries, List<Object> sqlParamete...
ProcessedInput { public List<String> getSqlParameterNames() { return sqlParameterNames; } ProcessedInput(String originalSql); ProcessedInput(ProcessedInput processedInput); ProcessedInput(String originalSql, String parsedSql, List<String> sqlParameterNames, List<int[]> sqlParameterBoundaries, List<Object> sqlParamete...
@Test public void testGetSqlParameterBoundaries() throws Exception { List<int[]> sqlParameterBoundaries = new ArrayList<int[]>(); sqlParameterBoundaries.add(new int[]{1, 2}); sqlParameterBoundaries.add(new int[]{3, 4}); sqlParameterBoundaries.add(new int[]{5, 6}); ProcessedInput processedInput = new ProcessedInput("");...
public List<int[]> getSqlParameterBoundaries() { return sqlParameterBoundaries; }
ProcessedInput { public List<int[]> getSqlParameterBoundaries() { return sqlParameterBoundaries; } }
ProcessedInput { public List<int[]> getSqlParameterBoundaries() { return sqlParameterBoundaries; } ProcessedInput(String originalSql); ProcessedInput(ProcessedInput processedInput); ProcessedInput(String originalSql, String parsedSql, List<String> sqlParameterNames, List<int[]> sqlParameterBoundaries, List<Object> sq...
ProcessedInput { public List<int[]> getSqlParameterBoundaries() { return sqlParameterBoundaries; } ProcessedInput(String originalSql); ProcessedInput(ProcessedInput processedInput); ProcessedInput(String originalSql, String parsedSql, List<String> sqlParameterNames, List<int[]> sqlParameterBoundaries, List<Object> sq...
ProcessedInput { public List<int[]> getSqlParameterBoundaries() { return sqlParameterBoundaries; } ProcessedInput(String originalSql); ProcessedInput(ProcessedInput processedInput); ProcessedInput(String originalSql, String parsedSql, List<String> sqlParameterNames, List<int[]> sqlParameterBoundaries, List<Object> sq...
@Test public void testGetSqlParameterValues() throws Exception { List<Object> sqlParameterValues = new ArrayList<Object>(); sqlParameterValues.add("1"); sqlParameterValues.add("2"); sqlParameterValues.add("3"); ProcessedInput processedInput = new ProcessedInput(""); processedInput.setSqlParameterValues(sqlParameterValu...
public List<Object> getSqlParameterValues() { return sqlParameterValues; }
ProcessedInput { public List<Object> getSqlParameterValues() { return sqlParameterValues; } }
ProcessedInput { public List<Object> getSqlParameterValues() { return sqlParameterValues; } ProcessedInput(String originalSql); ProcessedInput(ProcessedInput processedInput); ProcessedInput(String originalSql, String parsedSql, List<String> sqlParameterNames, List<int[]> sqlParameterBoundaries, List<Object> sqlParame...
ProcessedInput { public List<Object> getSqlParameterValues() { return sqlParameterValues; } ProcessedInput(String originalSql); ProcessedInput(ProcessedInput processedInput); ProcessedInput(String originalSql, String parsedSql, List<String> sqlParameterNames, List<int[]> sqlParameterBoundaries, List<Object> sqlParame...
ProcessedInput { public List<Object> getSqlParameterValues() { return sqlParameterValues; } ProcessedInput(String originalSql); ProcessedInput(ProcessedInput processedInput); ProcessedInput(String originalSql, String parsedSql, List<String> sqlParameterNames, List<int[]> sqlParameterBoundaries, List<Object> sqlParame...
@Test public void testSetParsedSql() throws Exception { testGetParsedSql(); }
public void setParsedSql(String parsedSql) { this.parsedSql = parsedSql; }
ProcessedInput { public void setParsedSql(String parsedSql) { this.parsedSql = parsedSql; } }
ProcessedInput { public void setParsedSql(String parsedSql) { this.parsedSql = parsedSql; } ProcessedInput(String originalSql); ProcessedInput(ProcessedInput processedInput); ProcessedInput(String originalSql, String parsedSql, List<String> sqlParameterNames, List<int[]> sqlParameterBoundaries, List<Object> sqlParame...
ProcessedInput { public void setParsedSql(String parsedSql) { this.parsedSql = parsedSql; } ProcessedInput(String originalSql); ProcessedInput(ProcessedInput processedInput); ProcessedInput(String originalSql, String parsedSql, List<String> sqlParameterNames, List<int[]> sqlParameterBoundaries, List<Object> sqlParame...
ProcessedInput { public void setParsedSql(String parsedSql) { this.parsedSql = parsedSql; } ProcessedInput(String originalSql); ProcessedInput(ProcessedInput processedInput); ProcessedInput(String originalSql, String parsedSql, List<String> sqlParameterNames, List<int[]> sqlParameterBoundaries, List<Object> sqlParame...
@Test public void testSetSqlParameterValues() throws Exception { testGetSqlParameterValues(); }
public void setSqlParameterValues(List<Object> sqlParameterValues) { if (sqlParameterValues != null) { this.sqlParameterValues = new ArrayList<Object>(sqlParameterValues); } else { this.sqlParameterValues = null; } }
ProcessedInput { public void setSqlParameterValues(List<Object> sqlParameterValues) { if (sqlParameterValues != null) { this.sqlParameterValues = new ArrayList<Object>(sqlParameterValues); } else { this.sqlParameterValues = null; } } }
ProcessedInput { public void setSqlParameterValues(List<Object> sqlParameterValues) { if (sqlParameterValues != null) { this.sqlParameterValues = new ArrayList<Object>(sqlParameterValues); } else { this.sqlParameterValues = null; } } ProcessedInput(String originalSql); ProcessedInput(ProcessedInput processedInput); P...
ProcessedInput { public void setSqlParameterValues(List<Object> sqlParameterValues) { if (sqlParameterValues != null) { this.sqlParameterValues = new ArrayList<Object>(sqlParameterValues); } else { this.sqlParameterValues = null; } } ProcessedInput(String originalSql); ProcessedInput(ProcessedInput processedInput); P...
ProcessedInput { public void setSqlParameterValues(List<Object> sqlParameterValues) { if (sqlParameterValues != null) { this.sqlParameterValues = new ArrayList<Object>(sqlParameterValues); } else { this.sqlParameterValues = null; } } ProcessedInput(String originalSql); ProcessedInput(ProcessedInput processedInput); P...
@Test public void testGetPosition() throws Exception { ProcessedInput processedInput = new ProcessedInput(""); processedInput.addParameter("name", 1, 2); processedInput.addParameter("origin", 3, 4); processedInput.addParameter("strength", 5, 6); Assert.assertEquals(0, processedInput.getPosition("name").intValue()); Ass...
public Integer getPosition(String parameterName) { Integer position = null; for (int i = 0; i < this.sqlParameterNames.size(); i++) { if (this.sqlParameterNames.get(i).equals(parameterName) == true) { position = i; break; } } return position; }
ProcessedInput { public Integer getPosition(String parameterName) { Integer position = null; for (int i = 0; i < this.sqlParameterNames.size(); i++) { if (this.sqlParameterNames.get(i).equals(parameterName) == true) { position = i; break; } } return position; } }
ProcessedInput { public Integer getPosition(String parameterName) { Integer position = null; for (int i = 0; i < this.sqlParameterNames.size(); i++) { if (this.sqlParameterNames.get(i).equals(parameterName) == true) { position = i; break; } } return position; } ProcessedInput(String originalSql); ProcessedInput(Proces...
ProcessedInput { public Integer getPosition(String parameterName) { Integer position = null; for (int i = 0; i < this.sqlParameterNames.size(); i++) { if (this.sqlParameterNames.get(i).equals(parameterName) == true) { position = i; break; } } return position; } ProcessedInput(String originalSql); ProcessedInput(Proces...
ProcessedInput { public Integer getPosition(String parameterName) { Integer position = null; for (int i = 0; i < this.sqlParameterNames.size(); i++) { if (this.sqlParameterNames.get(i).equals(parameterName) == true) { position = i; break; } } return position; } ProcessedInput(String originalSql); ProcessedInput(Proces...
@Test public void testGetParameterName() throws Exception { ProcessedInput processedInput = new ProcessedInput(""); processedInput.addParameter("name", 1, 2); processedInput.addParameter("origin", 3, 4); processedInput.addParameter("strength", 5, 6); Assert.assertEquals("name", processedInput.getParameterName(0)); Asse...
public String getParameterName(Integer position) { String name = null; if (this.sqlParameterNames != null) { name = this.sqlParameterNames.get(position); } return name; }
ProcessedInput { public String getParameterName(Integer position) { String name = null; if (this.sqlParameterNames != null) { name = this.sqlParameterNames.get(position); } return name; } }
ProcessedInput { public String getParameterName(Integer position) { String name = null; if (this.sqlParameterNames != null) { name = this.sqlParameterNames.get(position); } return name; } ProcessedInput(String originalSql); ProcessedInput(ProcessedInput processedInput); ProcessedInput(String originalSql, String parse...
ProcessedInput { public String getParameterName(Integer position) { String name = null; if (this.sqlParameterNames != null) { name = this.sqlParameterNames.get(position); } return name; } ProcessedInput(String originalSql); ProcessedInput(ProcessedInput processedInput); ProcessedInput(String originalSql, String parse...
ProcessedInput { public String getParameterName(Integer position) { String name = null; if (this.sqlParameterNames != null) { name = this.sqlParameterNames.get(position); } return name; } ProcessedInput(String originalSql); ProcessedInput(ProcessedInput processedInput); ProcessedInput(String originalSql, String parse...
@Test public void testRethrow() { try { ExceptionUtils.rethrow(new MjdbcException()); fail(); } catch (MjdbcSQLException ex) { } }
public static void rethrow(MjdbcException cause) throws MjdbcSQLException { MjdbcSQLException ex = new MjdbcSQLException(cause.getMessage()); ex.setStackTrace(cause.getStackTrace()); throw ex; }
ExceptionUtils { public static void rethrow(MjdbcException cause) throws MjdbcSQLException { MjdbcSQLException ex = new MjdbcSQLException(cause.getMessage()); ex.setStackTrace(cause.getStackTrace()); throw ex; } }
ExceptionUtils { public static void rethrow(MjdbcException cause) throws MjdbcSQLException { MjdbcSQLException ex = new MjdbcSQLException(cause.getMessage()); ex.setStackTrace(cause.getStackTrace()); throw ex; } }
ExceptionUtils { public static void rethrow(MjdbcException cause) throws MjdbcSQLException { MjdbcSQLException ex = new MjdbcSQLException(cause.getMessage()); ex.setStackTrace(cause.getStackTrace()); throw ex; } static void rethrow(MjdbcException cause); }
ExceptionUtils { public static void rethrow(MjdbcException cause) throws MjdbcSQLException { MjdbcSQLException ex = new MjdbcSQLException(cause.getMessage()); ex.setStackTrace(cause.getStackTrace()); throw ex; } static void rethrow(MjdbcException cause); }
@Test public void testGetAmountOfParameters() throws Exception { ProcessedInput processedInput = new ProcessedInput(""); Assert.assertEquals(0, processedInput.getAmountOfParameters().intValue()); processedInput.addParameter("name", 1, 2); processedInput.addParameter("origin", 3, 4); processedInput.addParameter("strengt...
public Integer getAmountOfParameters() { Integer size = 0; if (this.sqlParameterNames != null) { size = this.sqlParameterNames.size(); } return size; }
ProcessedInput { public Integer getAmountOfParameters() { Integer size = 0; if (this.sqlParameterNames != null) { size = this.sqlParameterNames.size(); } return size; } }
ProcessedInput { public Integer getAmountOfParameters() { Integer size = 0; if (this.sqlParameterNames != null) { size = this.sqlParameterNames.size(); } return size; } ProcessedInput(String originalSql); ProcessedInput(ProcessedInput processedInput); ProcessedInput(String originalSql, String parsedSql, List<String> ...
ProcessedInput { public Integer getAmountOfParameters() { Integer size = 0; if (this.sqlParameterNames != null) { size = this.sqlParameterNames.size(); } return size; } ProcessedInput(String originalSql); ProcessedInput(ProcessedInput processedInput); ProcessedInput(String originalSql, String parsedSql, List<String> ...
ProcessedInput { public Integer getAmountOfParameters() { Integer size = 0; if (this.sqlParameterNames != null) { size = this.sqlParameterNames.size(); } return size; } ProcessedInput(String originalSql); ProcessedInput(ProcessedInput processedInput); ProcessedInput(String originalSql, String parsedSql, List<String> ...
@Test public void testIsFilled() throws Exception { ProcessedInput processedInput = new ProcessedInput("a"); processedInput.addParameter("name", 1, 2); processedInput.addParameter("origin", 3, 4); processedInput.addParameter("strength", 5, 6); Assert.assertEquals(false, processedInput.isFilled()); processedInput.setPar...
public boolean isFilled() { boolean isFilled = false; if (this.originalSql != null && this.originalSql.length() > 0) { if (this.parsedSql != null && this.parsedSql.length() > 0) { if (this.sqlParameterNames != null) { if (this.sqlParameterValues != null) { isFilled = true; } } } } return isFilled; }
ProcessedInput { public boolean isFilled() { boolean isFilled = false; if (this.originalSql != null && this.originalSql.length() > 0) { if (this.parsedSql != null && this.parsedSql.length() > 0) { if (this.sqlParameterNames != null) { if (this.sqlParameterValues != null) { isFilled = true; } } } } return isFilled; } }
ProcessedInput { public boolean isFilled() { boolean isFilled = false; if (this.originalSql != null && this.originalSql.length() > 0) { if (this.parsedSql != null && this.parsedSql.length() > 0) { if (this.sqlParameterNames != null) { if (this.sqlParameterValues != null) { isFilled = true; } } } } return isFilled; } Pr...
ProcessedInput { public boolean isFilled() { boolean isFilled = false; if (this.originalSql != null && this.originalSql.length() > 0) { if (this.parsedSql != null && this.parsedSql.length() > 0) { if (this.sqlParameterNames != null) { if (this.sqlParameterValues != null) { isFilled = true; } } } } return isFilled; } Pr...
ProcessedInput { public boolean isFilled() { boolean isFilled = false; if (this.originalSql != null && this.originalSql.length() > 0) { if (this.parsedSql != null && this.parsedSql.length() > 0) { if (this.sqlParameterNames != null) { if (this.sqlParameterValues != null) { isFilled = true; } } } } return isFilled; } Pr...
@Test public void testFillParameterValues() throws Exception { ProcessedInput processedInput = new ProcessedInput("a"); processedInput.addParameter("name", 1, 2); processedInput.addParameter("origin", 3, 4); processedInput.addParameter("strength", 5, 6); org.junit.Assert.assertArrayEquals(new Object[0], processedInput....
public void fillParameterValues(Map<String, Object> valuesMap) { AssertUtils.assertNotNull(valuesMap, "Value map cannot be null"); if (this.sqlParameterNames != null) { String parameterName = null; this.sqlParameterValues = new ArrayList<Object>(); for (int i = 0; i < this.sqlParameterNames.size(); i++) { parameterName...
ProcessedInput { public void fillParameterValues(Map<String, Object> valuesMap) { AssertUtils.assertNotNull(valuesMap, "Value map cannot be null"); if (this.sqlParameterNames != null) { String parameterName = null; this.sqlParameterValues = new ArrayList<Object>(); for (int i = 0; i < this.sqlParameterNames.size(); i++...
ProcessedInput { public void fillParameterValues(Map<String, Object> valuesMap) { AssertUtils.assertNotNull(valuesMap, "Value map cannot be null"); if (this.sqlParameterNames != null) { String parameterName = null; this.sqlParameterValues = new ArrayList<Object>(); for (int i = 0; i < this.sqlParameterNames.size(); i++...
ProcessedInput { public void fillParameterValues(Map<String, Object> valuesMap) { AssertUtils.assertNotNull(valuesMap, "Value map cannot be null"); if (this.sqlParameterNames != null) { String parameterName = null; this.sqlParameterValues = new ArrayList<Object>(); for (int i = 0; i < this.sqlParameterNames.size(); i++...
ProcessedInput { public void fillParameterValues(Map<String, Object> valuesMap) { AssertUtils.assertNotNull(valuesMap, "Value map cannot be null"); if (this.sqlParameterNames != null) { String parameterName = null; this.sqlParameterValues = new ArrayList<Object>(); for (int i = 0; i < this.sqlParameterNames.size(); i++...
@Test public void testProcessInput() throws Exception { new EmptyTypeHandler(new Overrider()).processInput(stmt, params); MappingUtils.invokeFunction(verify(conn, never()), "createBlob", new Class[]{}, new Object[]{}); MappingUtils.invokeFunction(verify(conn, never()), "createClob", new Class[]{}, new Object[]{}); Mapp...
public QueryParameters processInput(Statement stmt, QueryParameters params) { return params; }
EmptyTypeHandler implements TypeHandler { public QueryParameters processInput(Statement stmt, QueryParameters params) { return params; } }
EmptyTypeHandler implements TypeHandler { public QueryParameters processInput(Statement stmt, QueryParameters params) { return params; } EmptyTypeHandler(Overrider overrider); }
EmptyTypeHandler implements TypeHandler { public QueryParameters processInput(Statement stmt, QueryParameters params) { return params; } EmptyTypeHandler(Overrider overrider); QueryParameters processInput(Statement stmt, QueryParameters params); void afterExecute(Statement stmt, QueryParameters processedInput, QueryPar...
EmptyTypeHandler implements TypeHandler { public QueryParameters processInput(Statement stmt, QueryParameters params) { return params; } EmptyTypeHandler(Overrider overrider); QueryParameters processInput(Statement stmt, QueryParameters params); void afterExecute(Statement stmt, QueryParameters processedInput, QueryPar...
@Test public void testAfterExecute() throws Exception { QueryParameters processedParams = new QueryParameters(params); processedParams.set("array_list", processedParams.getValue("array")); processedParams.set("blob_byte", processedParams.getValue("blob")); processedParams.set("clob_byte", processedParams.getValue("clob...
public void afterExecute(Statement stmt, QueryParameters processedInput, QueryParameters params) { }
EmptyTypeHandler implements TypeHandler { public void afterExecute(Statement stmt, QueryParameters processedInput, QueryParameters params) { } }
EmptyTypeHandler implements TypeHandler { public void afterExecute(Statement stmt, QueryParameters processedInput, QueryParameters params) { } EmptyTypeHandler(Overrider overrider); }
EmptyTypeHandler implements TypeHandler { public void afterExecute(Statement stmt, QueryParameters processedInput, QueryParameters params) { } EmptyTypeHandler(Overrider overrider); QueryParameters processInput(Statement stmt, QueryParameters params); void afterExecute(Statement stmt, QueryParameters processedInput, Qu...
EmptyTypeHandler implements TypeHandler { public void afterExecute(Statement stmt, QueryParameters processedInput, QueryParameters params) { } EmptyTypeHandler(Overrider overrider); QueryParameters processInput(Statement stmt, QueryParameters params); void afterExecute(Statement stmt, QueryParameters processedInput, Qu...
@Test public void testProcessOutput() throws Exception { new EmptyTypeHandler(new Overrider()).processOutput(stmt, params); verify(array, never()).getArray(); verify(blob, never()).getBinaryStream(); verify(clob, never()).getAsciiStream(); MappingUtils.invokeFunction(verify(sqlXml, never()), "getBinaryStream", new Clas...
public List<QueryParameters> processOutput(Statement stmt, List<QueryParameters> paramsList) { return paramsList; }
EmptyTypeHandler implements TypeHandler { public List<QueryParameters> processOutput(Statement stmt, List<QueryParameters> paramsList) { return paramsList; } }
EmptyTypeHandler implements TypeHandler { public List<QueryParameters> processOutput(Statement stmt, List<QueryParameters> paramsList) { return paramsList; } EmptyTypeHandler(Overrider overrider); }
EmptyTypeHandler implements TypeHandler { public List<QueryParameters> processOutput(Statement stmt, List<QueryParameters> paramsList) { return paramsList; } EmptyTypeHandler(Overrider overrider); QueryParameters processInput(Statement stmt, QueryParameters params); void afterExecute(Statement stmt, QueryParameters pro...
EmptyTypeHandler implements TypeHandler { public List<QueryParameters> processOutput(Statement stmt, List<QueryParameters> paramsList) { return paramsList; } EmptyTypeHandler(Overrider overrider); QueryParameters processInput(Statement stmt, QueryParameters params); void afterExecute(Statement stmt, QueryParameters pro...
@Test public void testProcessOutputList() throws Exception { List<QueryParameters> paramsList = new ArrayList<QueryParameters>(); QueryParameters paramsClone = new QueryParameters(params); paramsList.add(new QueryParameters()); paramsList.add(params); paramsList.add(paramsClone); new EmptyTypeHandler(new Overrider()).p...
public List<QueryParameters> processOutput(Statement stmt, List<QueryParameters> paramsList) { return paramsList; }
EmptyTypeHandler implements TypeHandler { public List<QueryParameters> processOutput(Statement stmt, List<QueryParameters> paramsList) { return paramsList; } }
EmptyTypeHandler implements TypeHandler { public List<QueryParameters> processOutput(Statement stmt, List<QueryParameters> paramsList) { return paramsList; } EmptyTypeHandler(Overrider overrider); }
EmptyTypeHandler implements TypeHandler { public List<QueryParameters> processOutput(Statement stmt, List<QueryParameters> paramsList) { return paramsList; } EmptyTypeHandler(Overrider overrider); QueryParameters processInput(Statement stmt, QueryParameters params); void afterExecute(Statement stmt, QueryParameters pro...
EmptyTypeHandler implements TypeHandler { public List<QueryParameters> processOutput(Statement stmt, List<QueryParameters> paramsList) { return paramsList; } EmptyTypeHandler(Overrider overrider); QueryParameters processInput(Statement stmt, QueryParameters params); void afterExecute(Statement stmt, QueryParameters pro...
@Test public void testConvertArrayArray() throws Exception { Object[] array = new String[]{"Sun"}; TypeHandlerUtils.convertArray(conn, array); MappingUtils.invokeFunction(verify(conn, times(1)), "createArrayOf", new Class[]{String.class, Object[].class}, new Object[]{"VARCHAR", array}); }
public static Object convertArray(Connection conn, Object[] array) throws SQLException { Object result = null; result = createArrayOf(conn, convertJavaClassToSqlType(array.getClass().getComponentType().getSimpleName()), array); return result; }
TypeHandlerUtils { public static Object convertArray(Connection conn, Object[] array) throws SQLException { Object result = null; result = createArrayOf(conn, convertJavaClassToSqlType(array.getClass().getComponentType().getSimpleName()), array); return result; } }
TypeHandlerUtils { public static Object convertArray(Connection conn, Object[] array) throws SQLException { Object result = null; result = createArrayOf(conn, convertJavaClassToSqlType(array.getClass().getComponentType().getSimpleName()), array); return result; } }
TypeHandlerUtils { public static Object convertArray(Connection conn, Object[] array) throws SQLException { Object result = null; result = createArrayOf(conn, convertJavaClassToSqlType(array.getClass().getComponentType().getSimpleName()), array); return result; } static Object convertArray(Connection conn, Object[] ar...
TypeHandlerUtils { public static Object convertArray(Connection conn, Object[] array) throws SQLException { Object result = null; result = createArrayOf(conn, convertJavaClassToSqlType(array.getClass().getComponentType().getSimpleName()), array); return result; } static Object convertArray(Connection conn, Object[] ar...
@Test public void testConvertArrayCollection() throws Exception { Object[] array = new String[]{"Venus"}; TypeHandlerUtils.convertArray(conn, Arrays.asList(array)); MappingUtils.invokeFunction(verify(conn, times(1)), "createArrayOf", new Class[]{String.class, Object[].class}, new Object[]{"VARCHAR", array}); }
public static Object convertArray(Connection conn, Object[] array) throws SQLException { Object result = null; result = createArrayOf(conn, convertJavaClassToSqlType(array.getClass().getComponentType().getSimpleName()), array); return result; }
TypeHandlerUtils { public static Object convertArray(Connection conn, Object[] array) throws SQLException { Object result = null; result = createArrayOf(conn, convertJavaClassToSqlType(array.getClass().getComponentType().getSimpleName()), array); return result; } }
TypeHandlerUtils { public static Object convertArray(Connection conn, Object[] array) throws SQLException { Object result = null; result = createArrayOf(conn, convertJavaClassToSqlType(array.getClass().getComponentType().getSimpleName()), array); return result; } }
TypeHandlerUtils { public static Object convertArray(Connection conn, Object[] array) throws SQLException { Object result = null; result = createArrayOf(conn, convertJavaClassToSqlType(array.getClass().getComponentType().getSimpleName()), array); return result; } static Object convertArray(Connection conn, Object[] ar...
TypeHandlerUtils { public static Object convertArray(Connection conn, Object[] array) throws SQLException { Object result = null; result = createArrayOf(conn, convertJavaClassToSqlType(array.getClass().getComponentType().getSimpleName()), array); return result; } static Object convertArray(Connection conn, Object[] ar...
@Test public void testConvertBlobConnByte() throws Exception { testConvertBlobPrepare(); TypeHandlerUtils.convertBlob(conn, "GIF".getBytes()); MappingUtils.invokeFunction(verify(conn, times(1)), "createBlob", new Class[]{}, new Object[]{}); testConvertBlobCheck(); }
public static Object convertBlob(Connection conn, byte[] value) throws SQLException { Object result = createBlob(conn); result = convertBlob(result, value); return result; }
TypeHandlerUtils { public static Object convertBlob(Connection conn, byte[] value) throws SQLException { Object result = createBlob(conn); result = convertBlob(result, value); return result; } }
TypeHandlerUtils { public static Object convertBlob(Connection conn, byte[] value) throws SQLException { Object result = createBlob(conn); result = convertBlob(result, value); return result; } }
TypeHandlerUtils { public static Object convertBlob(Connection conn, byte[] value) throws SQLException { Object result = createBlob(conn); result = convertBlob(result, value); return result; } static Object convertArray(Connection conn, Object[] array); static Object convertArray(Connection conn, Collection<?> array);...
TypeHandlerUtils { public static Object convertBlob(Connection conn, byte[] value) throws SQLException { Object result = createBlob(conn); result = convertBlob(result, value); return result; } static Object convertArray(Connection conn, Object[] array); static Object convertArray(Connection conn, Collection<?> array);...
@Test public void testGetLoggerString() throws Exception { MidaoLogger logger = MidaoLogger.getLogger("log me!"); Assert.assertEquals(true, logger instanceof Logger); Assert.assertEquals("log me!", logger.getName()); }
public static MidaoLogger getLogger(String name) { MidaoLogger mjdbcLogger = new MidaoLogger(name, null); if (isSLF4jAvailable() == true) { try { mjdbcLogger = new MidaoLogger(name, null); mjdbcLogger.setSlfLogger(MappingUtils.invokeStaticFunction(Class.forName("org.slf4j.LoggerFactory"), "getLogger", new Class[]{Strin...
MidaoLogger extends Logger { public static MidaoLogger getLogger(String name) { MidaoLogger mjdbcLogger = new MidaoLogger(name, null); if (isSLF4jAvailable() == true) { try { mjdbcLogger = new MidaoLogger(name, null); mjdbcLogger.setSlfLogger(MappingUtils.invokeStaticFunction(Class.forName("org.slf4j.LoggerFactory"), "...
MidaoLogger extends Logger { public static MidaoLogger getLogger(String name) { MidaoLogger mjdbcLogger = new MidaoLogger(name, null); if (isSLF4jAvailable() == true) { try { mjdbcLogger = new MidaoLogger(name, null); mjdbcLogger.setSlfLogger(MappingUtils.invokeStaticFunction(Class.forName("org.slf4j.LoggerFactory"), "...
MidaoLogger extends Logger { public static MidaoLogger getLogger(String name) { MidaoLogger mjdbcLogger = new MidaoLogger(name, null); if (isSLF4jAvailable() == true) { try { mjdbcLogger = new MidaoLogger(name, null); mjdbcLogger.setSlfLogger(MappingUtils.invokeStaticFunction(Class.forName("org.slf4j.LoggerFactory"), "...
MidaoLogger extends Logger { public static MidaoLogger getLogger(String name) { MidaoLogger mjdbcLogger = new MidaoLogger(name, null); if (isSLF4jAvailable() == true) { try { mjdbcLogger = new MidaoLogger(name, null); mjdbcLogger.setSlfLogger(MappingUtils.invokeStaticFunction(Class.forName("org.slf4j.LoggerFactory"), "...
@Test public void testConvertBlobConnInputStream() throws Exception { testConvertBlobPrepare(); TypeHandlerUtils.convertBlob(conn, new ByteArrayInputStream("BMP".getBytes())); MappingUtils.invokeFunction(verify(conn, times(1)), "createBlob", new Class[]{}, new Object[]{}); testConvertBlobCheck(); }
public static Object convertBlob(Connection conn, byte[] value) throws SQLException { Object result = createBlob(conn); result = convertBlob(result, value); return result; }
TypeHandlerUtils { public static Object convertBlob(Connection conn, byte[] value) throws SQLException { Object result = createBlob(conn); result = convertBlob(result, value); return result; } }
TypeHandlerUtils { public static Object convertBlob(Connection conn, byte[] value) throws SQLException { Object result = createBlob(conn); result = convertBlob(result, value); return result; } }
TypeHandlerUtils { public static Object convertBlob(Connection conn, byte[] value) throws SQLException { Object result = createBlob(conn); result = convertBlob(result, value); return result; } static Object convertArray(Connection conn, Object[] array); static Object convertArray(Connection conn, Collection<?> array);...
TypeHandlerUtils { public static Object convertBlob(Connection conn, byte[] value) throws SQLException { Object result = createBlob(conn); result = convertBlob(result, value); return result; } static Object convertArray(Connection conn, Object[] array); static Object convertArray(Connection conn, Collection<?> array);...
@Test public void testConvertBlobConnString() throws Exception { testConvertBlobPrepare(); TypeHandlerUtils.convertBlob(conn, "PCX"); MappingUtils.invokeFunction(verify(conn, times(1)), "createBlob", new Class[]{}, new Object[]{}); testConvertBlobCheck(); }
public static Object convertBlob(Connection conn, byte[] value) throws SQLException { Object result = createBlob(conn); result = convertBlob(result, value); return result; }
TypeHandlerUtils { public static Object convertBlob(Connection conn, byte[] value) throws SQLException { Object result = createBlob(conn); result = convertBlob(result, value); return result; } }
TypeHandlerUtils { public static Object convertBlob(Connection conn, byte[] value) throws SQLException { Object result = createBlob(conn); result = convertBlob(result, value); return result; } }
TypeHandlerUtils { public static Object convertBlob(Connection conn, byte[] value) throws SQLException { Object result = createBlob(conn); result = convertBlob(result, value); return result; } static Object convertArray(Connection conn, Object[] array); static Object convertArray(Connection conn, Collection<?> array);...
TypeHandlerUtils { public static Object convertBlob(Connection conn, byte[] value) throws SQLException { Object result = createBlob(conn); result = convertBlob(result, value); return result; } static Object convertArray(Connection conn, Object[] array); static Object convertArray(Connection conn, Collection<?> array);...
@Test public void testConvertBlobByte() throws Exception { testConvertBlobPrepare(); TypeHandlerUtils.convertBlob(blob, "JPEG".getBytes()); testConvertBlobCheck(); }
public static Object convertBlob(Connection conn, byte[] value) throws SQLException { Object result = createBlob(conn); result = convertBlob(result, value); return result; }
TypeHandlerUtils { public static Object convertBlob(Connection conn, byte[] value) throws SQLException { Object result = createBlob(conn); result = convertBlob(result, value); return result; } }
TypeHandlerUtils { public static Object convertBlob(Connection conn, byte[] value) throws SQLException { Object result = createBlob(conn); result = convertBlob(result, value); return result; } }
TypeHandlerUtils { public static Object convertBlob(Connection conn, byte[] value) throws SQLException { Object result = createBlob(conn); result = convertBlob(result, value); return result; } static Object convertArray(Connection conn, Object[] array); static Object convertArray(Connection conn, Collection<?> array);...
TypeHandlerUtils { public static Object convertBlob(Connection conn, byte[] value) throws SQLException { Object result = createBlob(conn); result = convertBlob(result, value); return result; } static Object convertArray(Connection conn, Object[] array); static Object convertArray(Connection conn, Collection<?> array);...
@Test public void testConvertBlobInputStream() throws Exception { testConvertBlobPrepare(); TypeHandlerUtils.convertBlob(blob, new ByteArrayInputStream("PNG".getBytes())); testConvertBlobCheck(); }
public static Object convertBlob(Connection conn, byte[] value) throws SQLException { Object result = createBlob(conn); result = convertBlob(result, value); return result; }
TypeHandlerUtils { public static Object convertBlob(Connection conn, byte[] value) throws SQLException { Object result = createBlob(conn); result = convertBlob(result, value); return result; } }
TypeHandlerUtils { public static Object convertBlob(Connection conn, byte[] value) throws SQLException { Object result = createBlob(conn); result = convertBlob(result, value); return result; } }
TypeHandlerUtils { public static Object convertBlob(Connection conn, byte[] value) throws SQLException { Object result = createBlob(conn); result = convertBlob(result, value); return result; } static Object convertArray(Connection conn, Object[] array); static Object convertArray(Connection conn, Collection<?> array);...
TypeHandlerUtils { public static Object convertBlob(Connection conn, byte[] value) throws SQLException { Object result = createBlob(conn); result = convertBlob(result, value); return result; } static Object convertArray(Connection conn, Object[] array); static Object convertArray(Connection conn, Collection<?> array);...
@Test public void testConvertBlobString() throws Exception { testConvertBlobPrepare(); TypeHandlerUtils.convertBlob(blob, "TIFF"); testConvertBlobCheck(); }
public static Object convertBlob(Connection conn, byte[] value) throws SQLException { Object result = createBlob(conn); result = convertBlob(result, value); return result; }
TypeHandlerUtils { public static Object convertBlob(Connection conn, byte[] value) throws SQLException { Object result = createBlob(conn); result = convertBlob(result, value); return result; } }
TypeHandlerUtils { public static Object convertBlob(Connection conn, byte[] value) throws SQLException { Object result = createBlob(conn); result = convertBlob(result, value); return result; } }
TypeHandlerUtils { public static Object convertBlob(Connection conn, byte[] value) throws SQLException { Object result = createBlob(conn); result = convertBlob(result, value); return result; } static Object convertArray(Connection conn, Object[] array); static Object convertArray(Connection conn, Collection<?> array);...
TypeHandlerUtils { public static Object convertBlob(Connection conn, byte[] value) throws SQLException { Object result = createBlob(conn); result = convertBlob(result, value); return result; } static Object convertArray(Connection conn, Object[] array); static Object convertArray(Connection conn, Collection<?> array);...
@Test public void testConvertClobConnByte() throws Exception { testConvertClobPrepare(); TypeHandlerUtils.convertClob(conn, "GIF".getBytes()); MappingUtils.invokeFunction(verify(conn, times(1)), "createClob", new Class[]{}, new Object[]{}); testConvertClobCheck(); }
public static Object convertClob(Connection conn, byte[] value) throws SQLException { Object result = (Object) createClob(conn); result = convertClob(result, value); return result; }
TypeHandlerUtils { public static Object convertClob(Connection conn, byte[] value) throws SQLException { Object result = (Object) createClob(conn); result = convertClob(result, value); return result; } }
TypeHandlerUtils { public static Object convertClob(Connection conn, byte[] value) throws SQLException { Object result = (Object) createClob(conn); result = convertClob(result, value); return result; } }
TypeHandlerUtils { public static Object convertClob(Connection conn, byte[] value) throws SQLException { Object result = (Object) createClob(conn); result = convertClob(result, value); return result; } static Object convertArray(Connection conn, Object[] array); static Object convertArray(Connection conn, Collection<?...
TypeHandlerUtils { public static Object convertClob(Connection conn, byte[] value) throws SQLException { Object result = (Object) createClob(conn); result = convertClob(result, value); return result; } static Object convertArray(Connection conn, Object[] array); static Object convertArray(Connection conn, Collection<?...
@Test public void testConvertClobConnInputStream() throws Exception { testConvertClobPrepare(); TypeHandlerUtils.convertClob(conn, new ByteArrayInputStream("BMP".getBytes())); MappingUtils.invokeFunction(verify(conn, times(1)), "createClob", new Class[]{}, new Object[]{}); testConvertClobCheck(); }
public static Object convertClob(Connection conn, byte[] value) throws SQLException { Object result = (Object) createClob(conn); result = convertClob(result, value); return result; }
TypeHandlerUtils { public static Object convertClob(Connection conn, byte[] value) throws SQLException { Object result = (Object) createClob(conn); result = convertClob(result, value); return result; } }
TypeHandlerUtils { public static Object convertClob(Connection conn, byte[] value) throws SQLException { Object result = (Object) createClob(conn); result = convertClob(result, value); return result; } }
TypeHandlerUtils { public static Object convertClob(Connection conn, byte[] value) throws SQLException { Object result = (Object) createClob(conn); result = convertClob(result, value); return result; } static Object convertArray(Connection conn, Object[] array); static Object convertArray(Connection conn, Collection<?...
TypeHandlerUtils { public static Object convertClob(Connection conn, byte[] value) throws SQLException { Object result = (Object) createClob(conn); result = convertClob(result, value); return result; } static Object convertArray(Connection conn, Object[] array); static Object convertArray(Connection conn, Collection<?...
@Test public void testConvertClobConnString() throws Exception { testConvertClobPrepare(); TypeHandlerUtils.convertClob(conn, "PCX"); MappingUtils.invokeFunction(verify(conn, times(1)), "createClob", new Class[]{}, new Object[]{}); testConvertClobCheck(); }
public static Object convertClob(Connection conn, byte[] value) throws SQLException { Object result = (Object) createClob(conn); result = convertClob(result, value); return result; }
TypeHandlerUtils { public static Object convertClob(Connection conn, byte[] value) throws SQLException { Object result = (Object) createClob(conn); result = convertClob(result, value); return result; } }
TypeHandlerUtils { public static Object convertClob(Connection conn, byte[] value) throws SQLException { Object result = (Object) createClob(conn); result = convertClob(result, value); return result; } }
TypeHandlerUtils { public static Object convertClob(Connection conn, byte[] value) throws SQLException { Object result = (Object) createClob(conn); result = convertClob(result, value); return result; } static Object convertArray(Connection conn, Object[] array); static Object convertArray(Connection conn, Collection<?...
TypeHandlerUtils { public static Object convertClob(Connection conn, byte[] value) throws SQLException { Object result = (Object) createClob(conn); result = convertClob(result, value); return result; } static Object convertArray(Connection conn, Object[] array); static Object convertArray(Connection conn, Collection<?...
@Test public void testConvertClobByte() throws Exception { testConvertClobPrepare(); TypeHandlerUtils.convertClob(clob, "JPEG".getBytes()); testConvertClobCheck(); }
public static Object convertClob(Connection conn, byte[] value) throws SQLException { Object result = (Object) createClob(conn); result = convertClob(result, value); return result; }
TypeHandlerUtils { public static Object convertClob(Connection conn, byte[] value) throws SQLException { Object result = (Object) createClob(conn); result = convertClob(result, value); return result; } }
TypeHandlerUtils { public static Object convertClob(Connection conn, byte[] value) throws SQLException { Object result = (Object) createClob(conn); result = convertClob(result, value); return result; } }
TypeHandlerUtils { public static Object convertClob(Connection conn, byte[] value) throws SQLException { Object result = (Object) createClob(conn); result = convertClob(result, value); return result; } static Object convertArray(Connection conn, Object[] array); static Object convertArray(Connection conn, Collection<?...
TypeHandlerUtils { public static Object convertClob(Connection conn, byte[] value) throws SQLException { Object result = (Object) createClob(conn); result = convertClob(result, value); return result; } static Object convertArray(Connection conn, Object[] array); static Object convertArray(Connection conn, Collection<?...
@Test public void testConvertClobInputStream() throws Exception { testConvertClobPrepare(); TypeHandlerUtils.convertClob(clob, new ByteArrayInputStream("PNG".getBytes())); testConvertClobCheck(); }
public static Object convertClob(Connection conn, byte[] value) throws SQLException { Object result = (Object) createClob(conn); result = convertClob(result, value); return result; }
TypeHandlerUtils { public static Object convertClob(Connection conn, byte[] value) throws SQLException { Object result = (Object) createClob(conn); result = convertClob(result, value); return result; } }
TypeHandlerUtils { public static Object convertClob(Connection conn, byte[] value) throws SQLException { Object result = (Object) createClob(conn); result = convertClob(result, value); return result; } }
TypeHandlerUtils { public static Object convertClob(Connection conn, byte[] value) throws SQLException { Object result = (Object) createClob(conn); result = convertClob(result, value); return result; } static Object convertArray(Connection conn, Object[] array); static Object convertArray(Connection conn, Collection<?...
TypeHandlerUtils { public static Object convertClob(Connection conn, byte[] value) throws SQLException { Object result = (Object) createClob(conn); result = convertClob(result, value); return result; } static Object convertArray(Connection conn, Object[] array); static Object convertArray(Connection conn, Collection<?...
@Test public void testGetLoggerClass() throws Exception { MidaoLogger logger = MidaoLogger.getLogger(String.class); Assert.assertEquals(true, logger instanceof Logger); Assert.assertEquals("java.lang.String", logger.getName()); }
public static MidaoLogger getLogger(String name) { MidaoLogger mjdbcLogger = new MidaoLogger(name, null); if (isSLF4jAvailable() == true) { try { mjdbcLogger = new MidaoLogger(name, null); mjdbcLogger.setSlfLogger(MappingUtils.invokeStaticFunction(Class.forName("org.slf4j.LoggerFactory"), "getLogger", new Class[]{Strin...
MidaoLogger extends Logger { public static MidaoLogger getLogger(String name) { MidaoLogger mjdbcLogger = new MidaoLogger(name, null); if (isSLF4jAvailable() == true) { try { mjdbcLogger = new MidaoLogger(name, null); mjdbcLogger.setSlfLogger(MappingUtils.invokeStaticFunction(Class.forName("org.slf4j.LoggerFactory"), "...
MidaoLogger extends Logger { public static MidaoLogger getLogger(String name) { MidaoLogger mjdbcLogger = new MidaoLogger(name, null); if (isSLF4jAvailable() == true) { try { mjdbcLogger = new MidaoLogger(name, null); mjdbcLogger.setSlfLogger(MappingUtils.invokeStaticFunction(Class.forName("org.slf4j.LoggerFactory"), "...
MidaoLogger extends Logger { public static MidaoLogger getLogger(String name) { MidaoLogger mjdbcLogger = new MidaoLogger(name, null); if (isSLF4jAvailable() == true) { try { mjdbcLogger = new MidaoLogger(name, null); mjdbcLogger.setSlfLogger(MappingUtils.invokeStaticFunction(Class.forName("org.slf4j.LoggerFactory"), "...
MidaoLogger extends Logger { public static MidaoLogger getLogger(String name) { MidaoLogger mjdbcLogger = new MidaoLogger(name, null); if (isSLF4jAvailable() == true) { try { mjdbcLogger = new MidaoLogger(name, null); mjdbcLogger.setSlfLogger(MappingUtils.invokeStaticFunction(Class.forName("org.slf4j.LoggerFactory"), "...
@Test public void testConvertClobString() throws Exception { testConvertClobPrepare(); TypeHandlerUtils.convertClob(clob, "TIFF"); testConvertClobCheck(); }
public static Object convertClob(Connection conn, byte[] value) throws SQLException { Object result = (Object) createClob(conn); result = convertClob(result, value); return result; }
TypeHandlerUtils { public static Object convertClob(Connection conn, byte[] value) throws SQLException { Object result = (Object) createClob(conn); result = convertClob(result, value); return result; } }
TypeHandlerUtils { public static Object convertClob(Connection conn, byte[] value) throws SQLException { Object result = (Object) createClob(conn); result = convertClob(result, value); return result; } }
TypeHandlerUtils { public static Object convertClob(Connection conn, byte[] value) throws SQLException { Object result = (Object) createClob(conn); result = convertClob(result, value); return result; } static Object convertArray(Connection conn, Object[] array); static Object convertArray(Connection conn, Collection<?...
TypeHandlerUtils { public static Object convertClob(Connection conn, byte[] value) throws SQLException { Object result = (Object) createClob(conn); result = convertClob(result, value); return result; } static Object convertArray(Connection conn, Object[] array); static Object convertArray(Connection conn, Collection<?...
@Test public void testConvertSqlXmlConnByte() throws Exception { testConvertSqlXmlPrepare(); TypeHandlerUtils.convertSqlXml(conn, "GIF".getBytes()); MappingUtils.invokeFunction(verify(conn, times(1)), "createSQLXML", new Class[]{}, new Object[]{}); testConvertSqlXmlCheck(); }
public static Object convertSqlXml(Connection conn, byte[] value) throws SQLException { Object result = createSQLXML(conn); result = convertSqlXml(result, value); return result; }
TypeHandlerUtils { public static Object convertSqlXml(Connection conn, byte[] value) throws SQLException { Object result = createSQLXML(conn); result = convertSqlXml(result, value); return result; } }
TypeHandlerUtils { public static Object convertSqlXml(Connection conn, byte[] value) throws SQLException { Object result = createSQLXML(conn); result = convertSqlXml(result, value); return result; } }
TypeHandlerUtils { public static Object convertSqlXml(Connection conn, byte[] value) throws SQLException { Object result = createSQLXML(conn); result = convertSqlXml(result, value); return result; } static Object convertArray(Connection conn, Object[] array); static Object convertArray(Connection conn, Collection<?> a...
TypeHandlerUtils { public static Object convertSqlXml(Connection conn, byte[] value) throws SQLException { Object result = createSQLXML(conn); result = convertSqlXml(result, value); return result; } static Object convertArray(Connection conn, Object[] array); static Object convertArray(Connection conn, Collection<?> a...
@Test public void testConvertSqlXmlConnInputStream() throws Exception { testConvertSqlXmlPrepare(); TypeHandlerUtils.convertSqlXml(conn, new ByteArrayInputStream("BMP".getBytes())); MappingUtils.invokeFunction(verify(conn, times(1)), "createSQLXML", new Class[]{}, new Object[]{}); testConvertSqlXmlCheck(); }
public static Object convertSqlXml(Connection conn, byte[] value) throws SQLException { Object result = createSQLXML(conn); result = convertSqlXml(result, value); return result; }
TypeHandlerUtils { public static Object convertSqlXml(Connection conn, byte[] value) throws SQLException { Object result = createSQLXML(conn); result = convertSqlXml(result, value); return result; } }
TypeHandlerUtils { public static Object convertSqlXml(Connection conn, byte[] value) throws SQLException { Object result = createSQLXML(conn); result = convertSqlXml(result, value); return result; } }
TypeHandlerUtils { public static Object convertSqlXml(Connection conn, byte[] value) throws SQLException { Object result = createSQLXML(conn); result = convertSqlXml(result, value); return result; } static Object convertArray(Connection conn, Object[] array); static Object convertArray(Connection conn, Collection<?> a...
TypeHandlerUtils { public static Object convertSqlXml(Connection conn, byte[] value) throws SQLException { Object result = createSQLXML(conn); result = convertSqlXml(result, value); return result; } static Object convertArray(Connection conn, Object[] array); static Object convertArray(Connection conn, Collection<?> a...
@Test public void testConvertSqlXmlConnString() throws Exception { testConvertSqlXmlPrepare(); TypeHandlerUtils.convertSqlXml(conn, "PCX"); MappingUtils.invokeFunction(verify(conn, times(1)), "createSQLXML", new Class[]{}, new Object[]{}); testConvertSqlXmlCheck(); }
public static Object convertSqlXml(Connection conn, byte[] value) throws SQLException { Object result = createSQLXML(conn); result = convertSqlXml(result, value); return result; }
TypeHandlerUtils { public static Object convertSqlXml(Connection conn, byte[] value) throws SQLException { Object result = createSQLXML(conn); result = convertSqlXml(result, value); return result; } }
TypeHandlerUtils { public static Object convertSqlXml(Connection conn, byte[] value) throws SQLException { Object result = createSQLXML(conn); result = convertSqlXml(result, value); return result; } }
TypeHandlerUtils { public static Object convertSqlXml(Connection conn, byte[] value) throws SQLException { Object result = createSQLXML(conn); result = convertSqlXml(result, value); return result; } static Object convertArray(Connection conn, Object[] array); static Object convertArray(Connection conn, Collection<?> a...
TypeHandlerUtils { public static Object convertSqlXml(Connection conn, byte[] value) throws SQLException { Object result = createSQLXML(conn); result = convertSqlXml(result, value); return result; } static Object convertArray(Connection conn, Object[] array); static Object convertArray(Connection conn, Collection<?> a...
@Test public void testConvertSqlXmlByte() throws Exception { testConvertSqlXmlPrepare(); TypeHandlerUtils.convertSqlXml(sqlXml, "JPEG".getBytes()); testConvertSqlXmlCheck(); }
public static Object convertSqlXml(Connection conn, byte[] value) throws SQLException { Object result = createSQLXML(conn); result = convertSqlXml(result, value); return result; }
TypeHandlerUtils { public static Object convertSqlXml(Connection conn, byte[] value) throws SQLException { Object result = createSQLXML(conn); result = convertSqlXml(result, value); return result; } }
TypeHandlerUtils { public static Object convertSqlXml(Connection conn, byte[] value) throws SQLException { Object result = createSQLXML(conn); result = convertSqlXml(result, value); return result; } }
TypeHandlerUtils { public static Object convertSqlXml(Connection conn, byte[] value) throws SQLException { Object result = createSQLXML(conn); result = convertSqlXml(result, value); return result; } static Object convertArray(Connection conn, Object[] array); static Object convertArray(Connection conn, Collection<?> a...
TypeHandlerUtils { public static Object convertSqlXml(Connection conn, byte[] value) throws SQLException { Object result = createSQLXML(conn); result = convertSqlXml(result, value); return result; } static Object convertArray(Connection conn, Object[] array); static Object convertArray(Connection conn, Collection<?> a...
@Test public void testConvertSqlXmlInputStream() throws Exception { testConvertSqlXmlPrepare(); TypeHandlerUtils.convertSqlXml(sqlXml, new ByteArrayInputStream("PNG".getBytes())); testConvertSqlXmlCheck(); }
public static Object convertSqlXml(Connection conn, byte[] value) throws SQLException { Object result = createSQLXML(conn); result = convertSqlXml(result, value); return result; }
TypeHandlerUtils { public static Object convertSqlXml(Connection conn, byte[] value) throws SQLException { Object result = createSQLXML(conn); result = convertSqlXml(result, value); return result; } }
TypeHandlerUtils { public static Object convertSqlXml(Connection conn, byte[] value) throws SQLException { Object result = createSQLXML(conn); result = convertSqlXml(result, value); return result; } }
TypeHandlerUtils { public static Object convertSqlXml(Connection conn, byte[] value) throws SQLException { Object result = createSQLXML(conn); result = convertSqlXml(result, value); return result; } static Object convertArray(Connection conn, Object[] array); static Object convertArray(Connection conn, Collection<?> a...
TypeHandlerUtils { public static Object convertSqlXml(Connection conn, byte[] value) throws SQLException { Object result = createSQLXML(conn); result = convertSqlXml(result, value); return result; } static Object convertArray(Connection conn, Object[] array); static Object convertArray(Connection conn, Collection<?> a...
@Test public void testConvertSqlXmlString() throws Exception { testConvertSqlXmlPrepare(); TypeHandlerUtils.convertSqlXml(sqlXml, "TIFF"); testConvertSqlXmlCheck(); }
public static Object convertSqlXml(Connection conn, byte[] value) throws SQLException { Object result = createSQLXML(conn); result = convertSqlXml(result, value); return result; }
TypeHandlerUtils { public static Object convertSqlXml(Connection conn, byte[] value) throws SQLException { Object result = createSQLXML(conn); result = convertSqlXml(result, value); return result; } }
TypeHandlerUtils { public static Object convertSqlXml(Connection conn, byte[] value) throws SQLException { Object result = createSQLXML(conn); result = convertSqlXml(result, value); return result; } }
TypeHandlerUtils { public static Object convertSqlXml(Connection conn, byte[] value) throws SQLException { Object result = createSQLXML(conn); result = convertSqlXml(result, value); return result; } static Object convertArray(Connection conn, Object[] array); static Object convertArray(Connection conn, Collection<?> a...
TypeHandlerUtils { public static Object convertSqlXml(Connection conn, byte[] value) throws SQLException { Object result = createSQLXML(conn); result = convertSqlXml(result, value); return result; } static Object convertArray(Connection conn, Object[] array); static Object convertArray(Connection conn, Collection<?> a...
@Test public void testConvertJavaClassToSqlType() throws Exception { Assert.assertEquals("VARCHAR", TypeHandlerUtils.convertJavaClassToSqlType("String")); }
public static String convertJavaClassToSqlType(String simpleClassName) throws SQLException { if ("String".equals(simpleClassName) == true) { return "VARCHAR"; } throw new SQLException(String.format("Could not convert java class %s", simpleClassName)); }
TypeHandlerUtils { public static String convertJavaClassToSqlType(String simpleClassName) throws SQLException { if ("String".equals(simpleClassName) == true) { return "VARCHAR"; } throw new SQLException(String.format("Could not convert java class %s", simpleClassName)); } }
TypeHandlerUtils { public static String convertJavaClassToSqlType(String simpleClassName) throws SQLException { if ("String".equals(simpleClassName) == true) { return "VARCHAR"; } throw new SQLException(String.format("Could not convert java class %s", simpleClassName)); } }
TypeHandlerUtils { public static String convertJavaClassToSqlType(String simpleClassName) throws SQLException { if ("String".equals(simpleClassName) == true) { return "VARCHAR"; } throw new SQLException(String.format("Could not convert java class %s", simpleClassName)); } static Object convertArray(Connection conn, Ob...
TypeHandlerUtils { public static String convertJavaClassToSqlType(String simpleClassName) throws SQLException { if ("String".equals(simpleClassName) == true) { return "VARCHAR"; } throw new SQLException(String.format("Could not convert java class %s", simpleClassName)); } static Object convertArray(Connection conn, Ob...
@Test public void testReadBlob() throws Exception { testReadBlob(false); }
public static byte[] readBlob(Object blob, boolean close) throws SQLException { byte[] result = null; InputStream input = null; try { input = (InputStream) MappingUtils.invokeFunction(blob, "getBinaryStream", new Class[]{}, new Object[]{}); } catch (MjdbcException ex) { throw new MjdbcSQLException(ex); } result = toByt...
TypeHandlerUtils { public static byte[] readBlob(Object blob, boolean close) throws SQLException { byte[] result = null; InputStream input = null; try { input = (InputStream) MappingUtils.invokeFunction(blob, "getBinaryStream", new Class[]{}, new Object[]{}); } catch (MjdbcException ex) { throw new MjdbcSQLException(ex...
TypeHandlerUtils { public static byte[] readBlob(Object blob, boolean close) throws SQLException { byte[] result = null; InputStream input = null; try { input = (InputStream) MappingUtils.invokeFunction(blob, "getBinaryStream", new Class[]{}, new Object[]{}); } catch (MjdbcException ex) { throw new MjdbcSQLException(ex...
TypeHandlerUtils { public static byte[] readBlob(Object blob, boolean close) throws SQLException { byte[] result = null; InputStream input = null; try { input = (InputStream) MappingUtils.invokeFunction(blob, "getBinaryStream", new Class[]{}, new Object[]{}); } catch (MjdbcException ex) { throw new MjdbcSQLException(ex...
TypeHandlerUtils { public static byte[] readBlob(Object blob, boolean close) throws SQLException { byte[] result = null; InputStream input = null; try { input = (InputStream) MappingUtils.invokeFunction(blob, "getBinaryStream", new Class[]{}, new Object[]{}); } catch (MjdbcException ex) { throw new MjdbcSQLException(ex...
@Test public void testReadClob() throws Exception { testReadClob(false); }
public static byte[] readClob(Object clob, boolean close) throws SQLException { byte[] result = null; InputStream input = null; try { input = (InputStream) MappingUtils.invokeFunction(clob, "getAsciiStream", new Class[]{}, new Object[]{}); } catch (MjdbcException ex) { throw new MjdbcSQLException(ex); } result = toByte...
TypeHandlerUtils { public static byte[] readClob(Object clob, boolean close) throws SQLException { byte[] result = null; InputStream input = null; try { input = (InputStream) MappingUtils.invokeFunction(clob, "getAsciiStream", new Class[]{}, new Object[]{}); } catch (MjdbcException ex) { throw new MjdbcSQLException(ex)...
TypeHandlerUtils { public static byte[] readClob(Object clob, boolean close) throws SQLException { byte[] result = null; InputStream input = null; try { input = (InputStream) MappingUtils.invokeFunction(clob, "getAsciiStream", new Class[]{}, new Object[]{}); } catch (MjdbcException ex) { throw new MjdbcSQLException(ex)...
TypeHandlerUtils { public static byte[] readClob(Object clob, boolean close) throws SQLException { byte[] result = null; InputStream input = null; try { input = (InputStream) MappingUtils.invokeFunction(clob, "getAsciiStream", new Class[]{}, new Object[]{}); } catch (MjdbcException ex) { throw new MjdbcSQLException(ex)...
TypeHandlerUtils { public static byte[] readClob(Object clob, boolean close) throws SQLException { byte[] result = null; InputStream input = null; try { input = (InputStream) MappingUtils.invokeFunction(clob, "getAsciiStream", new Class[]{}, new Object[]{}); } catch (MjdbcException ex) { throw new MjdbcSQLException(ex)...
@Test public void testInfo() throws Exception { }
@Override public void info(String msg) { if (isSLF4jAvailable() == false) { super.info(msg); } else { try { MappingUtils.invokeFunction(slfLogger, "info", new Class[]{String.class}, new Object[]{msg}); } catch (MjdbcException e) { setSLF4jAvailable(false); super.info(msg); } } }
MidaoLogger extends Logger { @Override public void info(String msg) { if (isSLF4jAvailable() == false) { super.info(msg); } else { try { MappingUtils.invokeFunction(slfLogger, "info", new Class[]{String.class}, new Object[]{msg}); } catch (MjdbcException e) { setSLF4jAvailable(false); super.info(msg); } } } }
MidaoLogger extends Logger { @Override public void info(String msg) { if (isSLF4jAvailable() == false) { super.info(msg); } else { try { MappingUtils.invokeFunction(slfLogger, "info", new Class[]{String.class}, new Object[]{msg}); } catch (MjdbcException e) { setSLF4jAvailable(false); super.info(msg); } } } private Mi...
MidaoLogger extends Logger { @Override public void info(String msg) { if (isSLF4jAvailable() == false) { super.info(msg); } else { try { MappingUtils.invokeFunction(slfLogger, "info", new Class[]{String.class}, new Object[]{msg}); } catch (MjdbcException e) { setSLF4jAvailable(false); super.info(msg); } } } private Mi...
MidaoLogger extends Logger { @Override public void info(String msg) { if (isSLF4jAvailable() == false) { super.info(msg); } else { try { MappingUtils.invokeFunction(slfLogger, "info", new Class[]{String.class}, new Object[]{msg}); } catch (MjdbcException e) { setSLF4jAvailable(false); super.info(msg); } } } private Mi...
@Test public void testReadSqlXml() throws Exception { testReadSqlXml(false); }
public static byte[] readSqlXml(Object sqlXml, boolean close) throws SQLException { byte[] result = null; InputStream input = null; try { input = (InputStream) MappingUtils.invokeFunction(sqlXml, "getBinaryStream", new Class[]{}, new Object[]{}); } catch (MjdbcException ex) { throw new MjdbcSQLException(ex); } result =...
TypeHandlerUtils { public static byte[] readSqlXml(Object sqlXml, boolean close) throws SQLException { byte[] result = null; InputStream input = null; try { input = (InputStream) MappingUtils.invokeFunction(sqlXml, "getBinaryStream", new Class[]{}, new Object[]{}); } catch (MjdbcException ex) { throw new MjdbcSQLExcept...
TypeHandlerUtils { public static byte[] readSqlXml(Object sqlXml, boolean close) throws SQLException { byte[] result = null; InputStream input = null; try { input = (InputStream) MappingUtils.invokeFunction(sqlXml, "getBinaryStream", new Class[]{}, new Object[]{}); } catch (MjdbcException ex) { throw new MjdbcSQLExcept...
TypeHandlerUtils { public static byte[] readSqlXml(Object sqlXml, boolean close) throws SQLException { byte[] result = null; InputStream input = null; try { input = (InputStream) MappingUtils.invokeFunction(sqlXml, "getBinaryStream", new Class[]{}, new Object[]{}); } catch (MjdbcException ex) { throw new MjdbcSQLExcept...
TypeHandlerUtils { public static byte[] readSqlXml(Object sqlXml, boolean close) throws SQLException { byte[] result = null; InputStream input = null; try { input = (InputStream) MappingUtils.invokeFunction(sqlXml, "getBinaryStream", new Class[]{}, new Object[]{}); } catch (MjdbcException ex) { throw new MjdbcSQLExcept...
@Test public void testToByteArray() throws Exception { String data = "ace"; byte[] result = null; result = TypeHandlerUtils.toByteArray(new ByteArrayInputStream(data.getBytes())); Assert.assertEquals(data, new String(result)); }
public static byte[] toByteArray(InputStream input) throws SQLException { byte[] result = null; ByteArrayOutputStream output = new ByteArrayOutputStream(); try { copy(input, output); result = output.toByteArray(); } catch (IOException ex) { throw new MjdbcSQLException(ex); } TypeHandlerUtils.closeQuietly(output); retur...
TypeHandlerUtils { public static byte[] toByteArray(InputStream input) throws SQLException { byte[] result = null; ByteArrayOutputStream output = new ByteArrayOutputStream(); try { copy(input, output); result = output.toByteArray(); } catch (IOException ex) { throw new MjdbcSQLException(ex); } TypeHandlerUtils.closeQui...
TypeHandlerUtils { public static byte[] toByteArray(InputStream input) throws SQLException { byte[] result = null; ByteArrayOutputStream output = new ByteArrayOutputStream(); try { copy(input, output); result = output.toByteArray(); } catch (IOException ex) { throw new MjdbcSQLException(ex); } TypeHandlerUtils.closeQui...
TypeHandlerUtils { public static byte[] toByteArray(InputStream input) throws SQLException { byte[] result = null; ByteArrayOutputStream output = new ByteArrayOutputStream(); try { copy(input, output); result = output.toByteArray(); } catch (IOException ex) { throw new MjdbcSQLException(ex); } TypeHandlerUtils.closeQui...
TypeHandlerUtils { public static byte[] toByteArray(InputStream input) throws SQLException { byte[] result = null; ByteArrayOutputStream output = new ByteArrayOutputStream(); try { copy(input, output); result = output.toByteArray(); } catch (IOException ex) { throw new MjdbcSQLException(ex); } TypeHandlerUtils.closeQui...
@Test public void testToString() throws Exception { String data = "tar.gz"; String result = ""; result = TypeHandlerUtils.toString(new StringReader(data)); Assert.assertEquals(data, result); }
public static String toString(Reader reader) throws SQLException { String result = null; StringBuilder output = new StringBuilder(); try { copy(reader, output); result = output.toString(); } catch (IOException ex) { throw new MjdbcSQLException(ex); } return result; }
TypeHandlerUtils { public static String toString(Reader reader) throws SQLException { String result = null; StringBuilder output = new StringBuilder(); try { copy(reader, output); result = output.toString(); } catch (IOException ex) { throw new MjdbcSQLException(ex); } return result; } }
TypeHandlerUtils { public static String toString(Reader reader) throws SQLException { String result = null; StringBuilder output = new StringBuilder(); try { copy(reader, output); result = output.toString(); } catch (IOException ex) { throw new MjdbcSQLException(ex); } return result; } }
TypeHandlerUtils { public static String toString(Reader reader) throws SQLException { String result = null; StringBuilder output = new StringBuilder(); try { copy(reader, output); result = output.toString(); } catch (IOException ex) { throw new MjdbcSQLException(ex); } return result; } static Object convertArray(Conne...
TypeHandlerUtils { public static String toString(Reader reader) throws SQLException { String result = null; StringBuilder output = new StringBuilder(); try { copy(reader, output); result = output.toString(); } catch (IOException ex) { throw new MjdbcSQLException(ex); } return result; } static Object convertArray(Conne...
@Test public void testCloseQuietlyInput() throws Exception { Mockito.doThrow(new IOException()).when(input).close(); try { TypeHandlerUtils.closeQuietly(input); } catch (Exception ex) { fail(); } }
public static void closeQuietly(InputStream input) { try { input.close(); } catch (IOException ex) { } }
TypeHandlerUtils { public static void closeQuietly(InputStream input) { try { input.close(); } catch (IOException ex) { } } }
TypeHandlerUtils { public static void closeQuietly(InputStream input) { try { input.close(); } catch (IOException ex) { } } }
TypeHandlerUtils { public static void closeQuietly(InputStream input) { try { input.close(); } catch (IOException ex) { } } static Object convertArray(Connection conn, Object[] array); static Object convertArray(Connection conn, Collection<?> array); static Object convertBlob(Connection conn, byte[] value); static Obj...
TypeHandlerUtils { public static void closeQuietly(InputStream input) { try { input.close(); } catch (IOException ex) { } } static Object convertArray(Connection conn, Object[] array); static Object convertArray(Connection conn, Collection<?> array); static Object convertBlob(Connection conn, byte[] value); static Obj...
@Test public void testCloseQuietlyOutput() throws Exception { Mockito.doThrow(new IOException()).when(output).close(); try { TypeHandlerUtils.closeQuietly(output); } catch (Exception ex) { fail(); } }
public static void closeQuietly(InputStream input) { try { input.close(); } catch (IOException ex) { } }
TypeHandlerUtils { public static void closeQuietly(InputStream input) { try { input.close(); } catch (IOException ex) { } } }
TypeHandlerUtils { public static void closeQuietly(InputStream input) { try { input.close(); } catch (IOException ex) { } } }
TypeHandlerUtils { public static void closeQuietly(InputStream input) { try { input.close(); } catch (IOException ex) { } } static Object convertArray(Connection conn, Object[] array); static Object convertArray(Connection conn, Collection<?> array); static Object convertBlob(Connection conn, byte[] value); static Obj...
TypeHandlerUtils { public static void closeQuietly(InputStream input) { try { input.close(); } catch (IOException ex) { } } static Object convertArray(Connection conn, Object[] array); static Object convertArray(Connection conn, Collection<?> array); static Object convertBlob(Connection conn, byte[] value); static Obj...
@Test public void testIsJDBC3() { Overrider overrider = new Overrider(); Assert.assertEquals(false, TypeHandlerUtils.isJDBC3(overrider)); overrider.override(MjdbcConstants.OVERRIDE_INT_JDBC3, true); Assert.assertEquals(true, TypeHandlerUtils.isJDBC3(overrider)); overrider.override(MjdbcConstants.OVERRIDE_INT_JDBC3, fal...
public static boolean isJDBC3(Overrider overrider) { boolean result = false; if (overrider.hasOverride(MjdbcConstants.OVERRIDE_INT_JDBC3) == true) { result = (Boolean) overrider.getOverride(MjdbcConstants.OVERRIDE_INT_JDBC3); } return result; }
TypeHandlerUtils { public static boolean isJDBC3(Overrider overrider) { boolean result = false; if (overrider.hasOverride(MjdbcConstants.OVERRIDE_INT_JDBC3) == true) { result = (Boolean) overrider.getOverride(MjdbcConstants.OVERRIDE_INT_JDBC3); } return result; } }
TypeHandlerUtils { public static boolean isJDBC3(Overrider overrider) { boolean result = false; if (overrider.hasOverride(MjdbcConstants.OVERRIDE_INT_JDBC3) == true) { result = (Boolean) overrider.getOverride(MjdbcConstants.OVERRIDE_INT_JDBC3); } return result; } }
TypeHandlerUtils { public static boolean isJDBC3(Overrider overrider) { boolean result = false; if (overrider.hasOverride(MjdbcConstants.OVERRIDE_INT_JDBC3) == true) { result = (Boolean) overrider.getOverride(MjdbcConstants.OVERRIDE_INT_JDBC3); } return result; } static Object convertArray(Connection conn, Object[] ar...
TypeHandlerUtils { public static boolean isJDBC3(Overrider overrider) { boolean result = false; if (overrider.hasOverride(MjdbcConstants.OVERRIDE_INT_JDBC3) == true) { result = (Boolean) overrider.getOverride(MjdbcConstants.OVERRIDE_INT_JDBC3); } return result; } static Object convertArray(Connection conn, Object[] ar...
@Test public void testCopy() throws Exception { String data = "rar"; ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); InputStream inputStream = new ByteArrayInputStream(data.getBytes()); TypeHandlerUtils.copy(inputStream, outputStream); Assert.assertEquals(data, new String(outputStream.toByteArray()));...
public static long copy(InputStream input, OutputStream output) throws IOException { return copy(input, output, new byte[DEFAULT_BUFFER_SIZE]); }
TypeHandlerUtils { public static long copy(InputStream input, OutputStream output) throws IOException { return copy(input, output, new byte[DEFAULT_BUFFER_SIZE]); } }
TypeHandlerUtils { public static long copy(InputStream input, OutputStream output) throws IOException { return copy(input, output, new byte[DEFAULT_BUFFER_SIZE]); } }
TypeHandlerUtils { public static long copy(InputStream input, OutputStream output) throws IOException { return copy(input, output, new byte[DEFAULT_BUFFER_SIZE]); } static Object convertArray(Connection conn, Object[] array); static Object convertArray(Connection conn, Collection<?> array); static Object convertBlob(C...
TypeHandlerUtils { public static long copy(InputStream input, OutputStream output) throws IOException { return copy(input, output, new byte[DEFAULT_BUFFER_SIZE]); } static Object convertArray(Connection conn, Object[] array); static Object convertArray(Connection conn, Collection<?> array); static Object convertBlob(C...
@Test public void testProcessInput() throws Exception { QueryParameters result = new UniversalTypeHandler(new Overrider()).processInput(stmt, params); MappingUtils.invokeFunction(verify(conn, never()), "createBlob", new Class[]{}, new Object[]{}); MappingUtils.invokeFunction(verify(conn, never()), "createClob", new Cla...
@Override public QueryParameters processInput(Statement stmt, QueryParameters params) throws SQLException { QueryParameters result = new QueryParameters(params); Object value = null; Object convertedValue = null; Integer convertedType = null; Connection conn = stmt.getConnection(); for (String parameterName : params.ke...
UniversalTypeHandler extends BaseTypeHandler { @Override public QueryParameters processInput(Statement stmt, QueryParameters params) throws SQLException { QueryParameters result = new QueryParameters(params); Object value = null; Object convertedValue = null; Integer convertedType = null; Connection conn = stmt.getConn...
UniversalTypeHandler extends BaseTypeHandler { @Override public QueryParameters processInput(Statement stmt, QueryParameters params) throws SQLException { QueryParameters result = new QueryParameters(params); Object value = null; Object convertedValue = null; Integer convertedType = null; Connection conn = stmt.getConn...
UniversalTypeHandler extends BaseTypeHandler { @Override public QueryParameters processInput(Statement stmt, QueryParameters params) throws SQLException { QueryParameters result = new QueryParameters(params); Object value = null; Object convertedValue = null; Integer convertedType = null; Connection conn = stmt.getConn...
UniversalTypeHandler extends BaseTypeHandler { @Override public QueryParameters processInput(Statement stmt, QueryParameters params) throws SQLException { QueryParameters result = new QueryParameters(params); Object value = null; Object convertedValue = null; Integer convertedType = null; Connection conn = stmt.getConn...
@Test public void testProcessInputJDBC3() throws Exception { Overrider overrider = new Overrider(); overrider.override(MjdbcConstants.OVERRIDE_INT_JDBC3, true); QueryParameters result = new UniversalTypeHandler(overrider).processInput(stmt, params); MappingUtils.invokeFunction(verify(conn, never()), "createBlob", new C...
@Override public QueryParameters processInput(Statement stmt, QueryParameters params) throws SQLException { QueryParameters result = new QueryParameters(params); Object value = null; Object convertedValue = null; Integer convertedType = null; Connection conn = stmt.getConnection(); for (String parameterName : params.ke...
UniversalTypeHandler extends BaseTypeHandler { @Override public QueryParameters processInput(Statement stmt, QueryParameters params) throws SQLException { QueryParameters result = new QueryParameters(params); Object value = null; Object convertedValue = null; Integer convertedType = null; Connection conn = stmt.getConn...
UniversalTypeHandler extends BaseTypeHandler { @Override public QueryParameters processInput(Statement stmt, QueryParameters params) throws SQLException { QueryParameters result = new QueryParameters(params); Object value = null; Object convertedValue = null; Integer convertedType = null; Connection conn = stmt.getConn...
UniversalTypeHandler extends BaseTypeHandler { @Override public QueryParameters processInput(Statement stmt, QueryParameters params) throws SQLException { QueryParameters result = new QueryParameters(params); Object value = null; Object convertedValue = null; Integer convertedType = null; Connection conn = stmt.getConn...
UniversalTypeHandler extends BaseTypeHandler { @Override public QueryParameters processInput(Statement stmt, QueryParameters params) throws SQLException { QueryParameters result = new QueryParameters(params); Object value = null; Object convertedValue = null; Integer convertedType = null; Connection conn = stmt.getConn...
@Test public void testAfterExecute() throws Exception { QueryParameters processedParams = new QueryParameters(params); processedParams.set("array_list", processedParams.getValue("array")); processedParams.set("blob_byte", processedParams.getValue("blob")); processedParams.set("clob_byte", processedParams.getValue("clob...
@Override public void afterExecute(Statement stmt, QueryParameters processedInput, QueryParameters params) throws SQLException { Object value = null; Object convertedValue = null; Connection conn = stmt.getConnection(); for (String parameterName : params.keySet()) { value = params.getValue(parameterName); convertedValu...
UniversalTypeHandler extends BaseTypeHandler { @Override public void afterExecute(Statement stmt, QueryParameters processedInput, QueryParameters params) throws SQLException { Object value = null; Object convertedValue = null; Connection conn = stmt.getConnection(); for (String parameterName : params.keySet()) { value ...
UniversalTypeHandler extends BaseTypeHandler { @Override public void afterExecute(Statement stmt, QueryParameters processedInput, QueryParameters params) throws SQLException { Object value = null; Object convertedValue = null; Connection conn = stmt.getConnection(); for (String parameterName : params.keySet()) { value ...
UniversalTypeHandler extends BaseTypeHandler { @Override public void afterExecute(Statement stmt, QueryParameters processedInput, QueryParameters params) throws SQLException { Object value = null; Object convertedValue = null; Connection conn = stmt.getConnection(); for (String parameterName : params.keySet()) { value ...
UniversalTypeHandler extends BaseTypeHandler { @Override public void afterExecute(Statement stmt, QueryParameters processedInput, QueryParameters params) throws SQLException { Object value = null; Object convertedValue = null; Connection conn = stmt.getConnection(); for (String parameterName : params.keySet()) { value ...
@Test public void testWarning() throws Exception { }
@Override public void warning(String msg) { if (isSLF4jAvailable() == false) { super.warning(msg); } else { try { MappingUtils.invokeFunction(slfLogger, "warn", new Class[]{String.class}, new Object[]{msg}); } catch (MjdbcException e) { setSLF4jAvailable(false); super.warning(msg); } } }
MidaoLogger extends Logger { @Override public void warning(String msg) { if (isSLF4jAvailable() == false) { super.warning(msg); } else { try { MappingUtils.invokeFunction(slfLogger, "warn", new Class[]{String.class}, new Object[]{msg}); } catch (MjdbcException e) { setSLF4jAvailable(false); super.warning(msg); } } } }
MidaoLogger extends Logger { @Override public void warning(String msg) { if (isSLF4jAvailable() == false) { super.warning(msg); } else { try { MappingUtils.invokeFunction(slfLogger, "warn", new Class[]{String.class}, new Object[]{msg}); } catch (MjdbcException e) { setSLF4jAvailable(false); super.warning(msg); } } } pr...
MidaoLogger extends Logger { @Override public void warning(String msg) { if (isSLF4jAvailable() == false) { super.warning(msg); } else { try { MappingUtils.invokeFunction(slfLogger, "warn", new Class[]{String.class}, new Object[]{msg}); } catch (MjdbcException e) { setSLF4jAvailable(false); super.warning(msg); } } } pr...
MidaoLogger extends Logger { @Override public void warning(String msg) { if (isSLF4jAvailable() == false) { super.warning(msg); } else { try { MappingUtils.invokeFunction(slfLogger, "warn", new Class[]{String.class}, new Object[]{msg}); } catch (MjdbcException e) { setSLF4jAvailable(false); super.warning(msg); } } } pr...
@Test public void testProcessInput() throws Exception { new BaseTypeHandler(new Overrider()).processInput(stmt, params); MappingUtils.invokeFunction(verify(conn, times(1)), "createBlob", new Class[]{}, new Object[]{}); MappingUtils.invokeFunction(verify(conn, times(1)), "createClob", new Class[]{}, new Object[]{}); Map...
public QueryParameters processInput(Statement stmt, QueryParameters params) throws SQLException { QueryParameters result = new QueryParameters(params); Object value = null; Object convertedValue = null; Connection conn = stmt.getConnection(); for (String parameterName : params.keySet()) { value = params.getValue(parame...
BaseTypeHandler implements TypeHandler { public QueryParameters processInput(Statement stmt, QueryParameters params) throws SQLException { QueryParameters result = new QueryParameters(params); Object value = null; Object convertedValue = null; Connection conn = stmt.getConnection(); for (String parameterName : params.k...
BaseTypeHandler implements TypeHandler { public QueryParameters processInput(Statement stmt, QueryParameters params) throws SQLException { QueryParameters result = new QueryParameters(params); Object value = null; Object convertedValue = null; Connection conn = stmt.getConnection(); for (String parameterName : params.k...
BaseTypeHandler implements TypeHandler { public QueryParameters processInput(Statement stmt, QueryParameters params) throws SQLException { QueryParameters result = new QueryParameters(params); Object value = null; Object convertedValue = null; Connection conn = stmt.getConnection(); for (String parameterName : params.k...
BaseTypeHandler implements TypeHandler { public QueryParameters processInput(Statement stmt, QueryParameters params) throws SQLException { QueryParameters result = new QueryParameters(params); Object value = null; Object convertedValue = null; Connection conn = stmt.getConnection(); for (String parameterName : params.k...
@Test public void testAfterExecute() throws Exception { QueryParameters processedParams = new QueryParameters(params); processedParams.set("array_list", processedParams.getValue("array")); processedParams.set("blob_byte", processedParams.getValue("blob")); processedParams.set("clob_byte", processedParams.getValue("clob...
public void afterExecute(Statement stmt, QueryParameters processedInput, QueryParameters params) throws SQLException { Object value = null; Object convertedValue = null; Connection conn = stmt.getConnection(); for (String parameterName : params.keySet()) { value = params.getValue(parameterName); convertedValue = proces...
BaseTypeHandler implements TypeHandler { public void afterExecute(Statement stmt, QueryParameters processedInput, QueryParameters params) throws SQLException { Object value = null; Object convertedValue = null; Connection conn = stmt.getConnection(); for (String parameterName : params.keySet()) { value = params.getValu...
BaseTypeHandler implements TypeHandler { public void afterExecute(Statement stmt, QueryParameters processedInput, QueryParameters params) throws SQLException { Object value = null; Object convertedValue = null; Connection conn = stmt.getConnection(); for (String parameterName : params.keySet()) { value = params.getValu...
BaseTypeHandler implements TypeHandler { public void afterExecute(Statement stmt, QueryParameters processedInput, QueryParameters params) throws SQLException { Object value = null; Object convertedValue = null; Connection conn = stmt.getConnection(); for (String parameterName : params.keySet()) { value = params.getValu...
BaseTypeHandler implements TypeHandler { public void afterExecute(Statement stmt, QueryParameters processedInput, QueryParameters params) throws SQLException { Object value = null; Object convertedValue = null; Connection conn = stmt.getConnection(); for (String parameterName : params.keySet()) { value = params.getValu...
@Test public void testProcessOutput() throws Exception { QueryParameters result = new BaseTypeHandler(new Overrider()).processOutput(stmt, params); verify(array, times(1)).getArray(); verify(blob, times(1)).getBinaryStream(); verify(clob, times(1)).getAsciiStream(); MappingUtils.invokeFunction(verify(sqlXml, times(1)),...
public QueryParameters processOutput(Statement stmt, QueryParameters params) throws SQLException { Object value = null; Object convertedValue = null; for (String parameterName : params.keySet()) { value = params.getValue(parameterName); convertedValue = null; try { if (params.getType(parameterName) == MjdbcTypes.ARRAY)...
BaseTypeHandler implements TypeHandler { public QueryParameters processOutput(Statement stmt, QueryParameters params) throws SQLException { Object value = null; Object convertedValue = null; for (String parameterName : params.keySet()) { value = params.getValue(parameterName); convertedValue = null; try { if (params.ge...
BaseTypeHandler implements TypeHandler { public QueryParameters processOutput(Statement stmt, QueryParameters params) throws SQLException { Object value = null; Object convertedValue = null; for (String parameterName : params.keySet()) { value = params.getValue(parameterName); convertedValue = null; try { if (params.ge...
BaseTypeHandler implements TypeHandler { public QueryParameters processOutput(Statement stmt, QueryParameters params) throws SQLException { Object value = null; Object convertedValue = null; for (String parameterName : params.keySet()) { value = params.getValue(parameterName); convertedValue = null; try { if (params.ge...
BaseTypeHandler implements TypeHandler { public QueryParameters processOutput(Statement stmt, QueryParameters params) throws SQLException { Object value = null; Object convertedValue = null; for (String parameterName : params.keySet()) { value = params.getValue(parameterName); convertedValue = null; try { if (params.ge...
@Test public void testProcessOutputList() throws Exception { List<QueryParameters> paramsList = new ArrayList<QueryParameters>(); QueryParameters paramsClone = new QueryParameters(params); paramsList.add(new QueryParameters()); paramsList.add(params); paramsList.add(paramsClone); new BaseTypeHandler(new Overrider()).pr...
public QueryParameters processOutput(Statement stmt, QueryParameters params) throws SQLException { Object value = null; Object convertedValue = null; for (String parameterName : params.keySet()) { value = params.getValue(parameterName); convertedValue = null; try { if (params.getType(parameterName) == MjdbcTypes.ARRAY)...
BaseTypeHandler implements TypeHandler { public QueryParameters processOutput(Statement stmt, QueryParameters params) throws SQLException { Object value = null; Object convertedValue = null; for (String parameterName : params.keySet()) { value = params.getValue(parameterName); convertedValue = null; try { if (params.ge...
BaseTypeHandler implements TypeHandler { public QueryParameters processOutput(Statement stmt, QueryParameters params) throws SQLException { Object value = null; Object convertedValue = null; for (String parameterName : params.keySet()) { value = params.getValue(parameterName); convertedValue = null; try { if (params.ge...
BaseTypeHandler implements TypeHandler { public QueryParameters processOutput(Statement stmt, QueryParameters params) throws SQLException { Object value = null; Object convertedValue = null; for (String parameterName : params.keySet()) { value = params.getValue(parameterName); convertedValue = null; try { if (params.ge...
BaseTypeHandler implements TypeHandler { public QueryParameters processOutput(Statement stmt, QueryParameters params) throws SQLException { Object value = null; Object convertedValue = null; for (String parameterName : params.keySet()) { value = params.getValue(parameterName); convertedValue = null; try { if (params.ge...
@Test public void testProcessInput() throws Exception { QueryParameters result = new OracleTypeHandler(new Overrider()).processInput(stmt, params); MappingUtils.invokeFunction(verify(conn, never()), "createBlob", new Class[]{}, new Object[]{}); MappingUtils.invokeFunction(verify(conn, never()), "createClob", new Class[...
public QueryParameters processInput(Statement stmt, QueryParameters params) throws SQLException { QueryParameters result = new QueryParameters(params); Object value = null; Object convertedValue = null; Connection conn = stmt.getConnection(); for (String parameterName : params.keySet()) { value = params.getValue(parame...
OracleTypeHandler implements TypeHandler { public QueryParameters processInput(Statement stmt, QueryParameters params) throws SQLException { QueryParameters result = new QueryParameters(params); Object value = null; Object convertedValue = null; Connection conn = stmt.getConnection(); for (String parameterName : params...
OracleTypeHandler implements TypeHandler { public QueryParameters processInput(Statement stmt, QueryParameters params) throws SQLException { QueryParameters result = new QueryParameters(params); Object value = null; Object convertedValue = null; Connection conn = stmt.getConnection(); for (String parameterName : params...
OracleTypeHandler implements TypeHandler { public QueryParameters processInput(Statement stmt, QueryParameters params) throws SQLException { QueryParameters result = new QueryParameters(params); Object value = null; Object convertedValue = null; Connection conn = stmt.getConnection(); for (String parameterName : params...
OracleTypeHandler implements TypeHandler { public QueryParameters processInput(Statement stmt, QueryParameters params) throws SQLException { QueryParameters result = new QueryParameters(params); Object value = null; Object convertedValue = null; Connection conn = stmt.getConnection(); for (String parameterName : params...
@Test public void testProcessInputJDBC3() throws Exception { Overrider overrider = new Overrider(); overrider.override(MjdbcConstants.OVERRIDE_INT_JDBC3, true); QueryParameters result = new UniversalTypeHandler(overrider).processInput(stmt, params); MappingUtils.invokeFunction(verify(conn, never()), "createBlob", new C...
public QueryParameters processInput(Statement stmt, QueryParameters params) throws SQLException { QueryParameters result = new QueryParameters(params); Object value = null; Object convertedValue = null; Connection conn = stmt.getConnection(); for (String parameterName : params.keySet()) { value = params.getValue(parame...
OracleTypeHandler implements TypeHandler { public QueryParameters processInput(Statement stmt, QueryParameters params) throws SQLException { QueryParameters result = new QueryParameters(params); Object value = null; Object convertedValue = null; Connection conn = stmt.getConnection(); for (String parameterName : params...
OracleTypeHandler implements TypeHandler { public QueryParameters processInput(Statement stmt, QueryParameters params) throws SQLException { QueryParameters result = new QueryParameters(params); Object value = null; Object convertedValue = null; Connection conn = stmt.getConnection(); for (String parameterName : params...
OracleTypeHandler implements TypeHandler { public QueryParameters processInput(Statement stmt, QueryParameters params) throws SQLException { QueryParameters result = new QueryParameters(params); Object value = null; Object convertedValue = null; Connection conn = stmt.getConnection(); for (String parameterName : params...
OracleTypeHandler implements TypeHandler { public QueryParameters processInput(Statement stmt, QueryParameters params) throws SQLException { QueryParameters result = new QueryParameters(params); Object value = null; Object convertedValue = null; Connection conn = stmt.getConnection(); for (String parameterName : params...
@Test public void testAfterExecute() throws Exception { QueryParameters processedParams = new QueryParameters(params); processedParams.set("array_list", processedParams.getValue("array")); processedParams.set("blob_byte", processedParams.getValue("blob")); processedParams.set("clob_byte", processedParams.getValue("clob...
public void afterExecute(Statement stmt, QueryParameters processedInput, QueryParameters params) throws SQLException { Object value = null; Object convertedValue = null; Connection conn = stmt.getConnection(); for (String parameterName : params.keySet()) { value = params.getValue(parameterName); convertedValue = proces...
OracleTypeHandler implements TypeHandler { public void afterExecute(Statement stmt, QueryParameters processedInput, QueryParameters params) throws SQLException { Object value = null; Object convertedValue = null; Connection conn = stmt.getConnection(); for (String parameterName : params.keySet()) { value = params.getVa...
OracleTypeHandler implements TypeHandler { public void afterExecute(Statement stmt, QueryParameters processedInput, QueryParameters params) throws SQLException { Object value = null; Object convertedValue = null; Connection conn = stmt.getConnection(); for (String parameterName : params.keySet()) { value = params.getVa...
OracleTypeHandler implements TypeHandler { public void afterExecute(Statement stmt, QueryParameters processedInput, QueryParameters params) throws SQLException { Object value = null; Object convertedValue = null; Connection conn = stmt.getConnection(); for (String parameterName : params.keySet()) { value = params.getVa...
OracleTypeHandler implements TypeHandler { public void afterExecute(Statement stmt, QueryParameters processedInput, QueryParameters params) throws SQLException { Object value = null; Object convertedValue = null; Connection conn = stmt.getConnection(); for (String parameterName : params.keySet()) { value = params.getVa...
@Test public void testProcessOutput() throws Exception { new OracleTypeHandler(new Overrider()).processOutput(stmt, params); verify(array, never()).getArray(); verify(blob, never()).getBinaryStream(); verify(clob, never()).getAsciiStream(); MappingUtils.invokeFunction(verify(array, never()), "free", new Class[]{}, new ...
public QueryParameters processOutput(Statement stmt, QueryParameters params) throws SQLException { Object value = null; Object convertedValue = null; int oracleCursorType = -1; try { Class oracleTypesClazz = Class.forName("oracle.jdbc.OracleTypes"); oracleCursorType = (Integer) MappingUtils.returnStaticField(oracleType...
OracleTypeHandler implements TypeHandler { public QueryParameters processOutput(Statement stmt, QueryParameters params) throws SQLException { Object value = null; Object convertedValue = null; int oracleCursorType = -1; try { Class oracleTypesClazz = Class.forName("oracle.jdbc.OracleTypes"); oracleCursorType = (Integer...
OracleTypeHandler implements TypeHandler { public QueryParameters processOutput(Statement stmt, QueryParameters params) throws SQLException { Object value = null; Object convertedValue = null; int oracleCursorType = -1; try { Class oracleTypesClazz = Class.forName("oracle.jdbc.OracleTypes"); oracleCursorType = (Integer...
OracleTypeHandler implements TypeHandler { public QueryParameters processOutput(Statement stmt, QueryParameters params) throws SQLException { Object value = null; Object convertedValue = null; int oracleCursorType = -1; try { Class oracleTypesClazz = Class.forName("oracle.jdbc.OracleTypes"); oracleCursorType = (Integer...
OracleTypeHandler implements TypeHandler { public QueryParameters processOutput(Statement stmt, QueryParameters params) throws SQLException { Object value = null; Object convertedValue = null; int oracleCursorType = -1; try { Class oracleTypesClazz = Class.forName("oracle.jdbc.OracleTypes"); oracleCursorType = (Integer...
@Test public void testProcessOutputList() throws Exception { List<QueryParameters> paramsList = new ArrayList<QueryParameters>(); QueryParameters paramsClone = new QueryParameters(params); paramsList.add(new QueryParameters()); paramsList.add(params); paramsList.add(paramsClone); new OracleTypeHandler(new Overrider())....
public QueryParameters processOutput(Statement stmt, QueryParameters params) throws SQLException { Object value = null; Object convertedValue = null; int oracleCursorType = -1; try { Class oracleTypesClazz = Class.forName("oracle.jdbc.OracleTypes"); oracleCursorType = (Integer) MappingUtils.returnStaticField(oracleType...
OracleTypeHandler implements TypeHandler { public QueryParameters processOutput(Statement stmt, QueryParameters params) throws SQLException { Object value = null; Object convertedValue = null; int oracleCursorType = -1; try { Class oracleTypesClazz = Class.forName("oracle.jdbc.OracleTypes"); oracleCursorType = (Integer...
OracleTypeHandler implements TypeHandler { public QueryParameters processOutput(Statement stmt, QueryParameters params) throws SQLException { Object value = null; Object convertedValue = null; int oracleCursorType = -1; try { Class oracleTypesClazz = Class.forName("oracle.jdbc.OracleTypes"); oracleCursorType = (Integer...
OracleTypeHandler implements TypeHandler { public QueryParameters processOutput(Statement stmt, QueryParameters params) throws SQLException { Object value = null; Object convertedValue = null; int oracleCursorType = -1; try { Class oracleTypesClazz = Class.forName("oracle.jdbc.OracleTypes"); oracleCursorType = (Integer...
OracleTypeHandler implements TypeHandler { public QueryParameters processOutput(Statement stmt, QueryParameters params) throws SQLException { Object value = null; Object convertedValue = null; int oracleCursorType = -1; try { Class oracleTypesClazz = Class.forName("oracle.jdbc.OracleTypes"); oracleCursorType = (Integer...
@Test public void testIsFunctionCall() throws Exception { Assert.assertEquals(true, CallableUtils.isFunctionCall("{? = call make_me_some_tea()}")); }
public static boolean isFunctionCall(String decodedSql) { Pattern regexPattern = null; Matcher regexMatcher = null; regexPattern = Pattern.compile(REGEX_IS_FUNCTION, Pattern.CASE_INSENSITIVE); regexMatcher = regexPattern.matcher(decodedSql); return regexMatcher.find(); }
CallableUtils { public static boolean isFunctionCall(String decodedSql) { Pattern regexPattern = null; Matcher regexMatcher = null; regexPattern = Pattern.compile(REGEX_IS_FUNCTION, Pattern.CASE_INSENSITIVE); regexMatcher = regexPattern.matcher(decodedSql); return regexMatcher.find(); } }
CallableUtils { public static boolean isFunctionCall(String decodedSql) { Pattern regexPattern = null; Matcher regexMatcher = null; regexPattern = Pattern.compile(REGEX_IS_FUNCTION, Pattern.CASE_INSENSITIVE); regexMatcher = regexPattern.matcher(decodedSql); return regexMatcher.find(); } }
CallableUtils { public static boolean isFunctionCall(String decodedSql) { Pattern regexPattern = null; Matcher regexMatcher = null; regexPattern = Pattern.compile(REGEX_IS_FUNCTION, Pattern.CASE_INSENSITIVE); regexMatcher = regexPattern.matcher(decodedSql); return regexMatcher.find(); } static boolean isFunctionCall(S...
CallableUtils { public static boolean isFunctionCall(String decodedSql) { Pattern regexPattern = null; Matcher regexMatcher = null; regexPattern = Pattern.compile(REGEX_IS_FUNCTION, Pattern.CASE_INSENSITIVE); regexMatcher = regexPattern.matcher(decodedSql); return regexMatcher.find(); } static boolean isFunctionCall(S...
@Test public void testSevere() throws Exception { }
@Override public void severe(String msg) { if (isSLF4jAvailable() == false) { super.severe(msg); } else { try { MappingUtils.invokeFunction(slfLogger, "error", new Class[]{String.class}, new Object[]{msg}); } catch (MjdbcException e) { setSLF4jAvailable(false); super.severe(msg); } } }
MidaoLogger extends Logger { @Override public void severe(String msg) { if (isSLF4jAvailable() == false) { super.severe(msg); } else { try { MappingUtils.invokeFunction(slfLogger, "error", new Class[]{String.class}, new Object[]{msg}); } catch (MjdbcException e) { setSLF4jAvailable(false); super.severe(msg); } } } }
MidaoLogger extends Logger { @Override public void severe(String msg) { if (isSLF4jAvailable() == false) { super.severe(msg); } else { try { MappingUtils.invokeFunction(slfLogger, "error", new Class[]{String.class}, new Object[]{msg}); } catch (MjdbcException e) { setSLF4jAvailable(false); super.severe(msg); } } } priv...
MidaoLogger extends Logger { @Override public void severe(String msg) { if (isSLF4jAvailable() == false) { super.severe(msg); } else { try { MappingUtils.invokeFunction(slfLogger, "error", new Class[]{String.class}, new Object[]{msg}); } catch (MjdbcException e) { setSLF4jAvailable(false); super.severe(msg); } } } priv...
MidaoLogger extends Logger { @Override public void severe(String msg) { if (isSLF4jAvailable() == false) { super.severe(msg); } else { try { MappingUtils.invokeFunction(slfLogger, "error", new Class[]{String.class}, new Object[]{msg}); } catch (MjdbcException e) { setSLF4jAvailable(false); super.severe(msg); } } } priv...
@Test public void testGetStoredProcedureShortNameFromSql() throws Exception { Assert.assertEquals("function_name", CallableUtils.getStoredProcedureShortNameFromSql("{call schema.package.function_name()}")); }
public static String getStoredProcedureShortNameFromSql(String decodedSql) { String spName = null; Pattern regexPattern = null; Matcher regexMatcher = null; String procedureFullName = getStoredProcedureFullName(decodedSql); String[] procedurePath = procedureFullName.split("[.]"); if (procedurePath.length > 0) { spName ...
CallableUtils { public static String getStoredProcedureShortNameFromSql(String decodedSql) { String spName = null; Pattern regexPattern = null; Matcher regexMatcher = null; String procedureFullName = getStoredProcedureFullName(decodedSql); String[] procedurePath = procedureFullName.split("[.]"); if (procedurePath.lengt...
CallableUtils { public static String getStoredProcedureShortNameFromSql(String decodedSql) { String spName = null; Pattern regexPattern = null; Matcher regexMatcher = null; String procedureFullName = getStoredProcedureFullName(decodedSql); String[] procedurePath = procedureFullName.split("[.]"); if (procedurePath.lengt...
CallableUtils { public static String getStoredProcedureShortNameFromSql(String decodedSql) { String spName = null; Pattern regexPattern = null; Matcher regexMatcher = null; String procedureFullName = getStoredProcedureFullName(decodedSql); String[] procedurePath = procedureFullName.split("[.]"); if (procedurePath.lengt...
CallableUtils { public static String getStoredProcedureShortNameFromSql(String decodedSql) { String spName = null; Pattern regexPattern = null; Matcher regexMatcher = null; String procedureFullName = getStoredProcedureFullName(decodedSql); String[] procedurePath = procedureFullName.split("[.]"); if (procedurePath.lengt...
@Test public void testGetStoredProcedureFullName() throws Exception { Assert.assertEquals("schema.package.function_name", CallableUtils.getStoredProcedureFullName("{call schema.package.function_name()}")); }
public static String getStoredProcedureFullName(String decodedSql) { String spName = null; Pattern regexPattern = null; Matcher regexMatcher = null; regexPattern = Pattern.compile(REGEX_PROCEDURE_FULL_NAME, Pattern.CASE_INSENSITIVE); regexMatcher = regexPattern.matcher(decodedSql); if (regexMatcher.find() == true) { sp...
CallableUtils { public static String getStoredProcedureFullName(String decodedSql) { String spName = null; Pattern regexPattern = null; Matcher regexMatcher = null; regexPattern = Pattern.compile(REGEX_PROCEDURE_FULL_NAME, Pattern.CASE_INSENSITIVE); regexMatcher = regexPattern.matcher(decodedSql); if (regexMatcher.find...
CallableUtils { public static String getStoredProcedureFullName(String decodedSql) { String spName = null; Pattern regexPattern = null; Matcher regexMatcher = null; regexPattern = Pattern.compile(REGEX_PROCEDURE_FULL_NAME, Pattern.CASE_INSENSITIVE); regexMatcher = regexPattern.matcher(decodedSql); if (regexMatcher.find...
CallableUtils { public static String getStoredProcedureFullName(String decodedSql) { String spName = null; Pattern regexPattern = null; Matcher regexMatcher = null; regexPattern = Pattern.compile(REGEX_PROCEDURE_FULL_NAME, Pattern.CASE_INSENSITIVE); regexMatcher = regexPattern.matcher(decodedSql); if (regexMatcher.find...
CallableUtils { public static String getStoredProcedureFullName(String decodedSql) { String spName = null; Pattern regexPattern = null; Matcher regexMatcher = null; regexPattern = Pattern.compile(REGEX_PROCEDURE_FULL_NAME, Pattern.CASE_INSENSITIVE); regexMatcher = regexPattern.matcher(decodedSql); if (regexMatcher.find...
@Test public void testUpdateDirections() throws Exception { QueryParameters params = new QueryParameters(); params.set("first", "age"); params.set("second", "knowledge"); QueryParameters paramsDirections = new QueryParameters(); paramsDirections.set("first", "age", QueryParameters.Direction.IN); paramsDirections.set("s...
public static QueryParameters updateDirections(QueryParameters original, QueryParameters source) { QueryParameters updatedParams = new QueryParameters(original); Integer position = null; String originalKey = null; if (source != null) { for (String sourceKey : source.keySet()) { position = source.getFirstPosition(source...
CallableUtils { public static QueryParameters updateDirections(QueryParameters original, QueryParameters source) { QueryParameters updatedParams = new QueryParameters(original); Integer position = null; String originalKey = null; if (source != null) { for (String sourceKey : source.keySet()) { position = source.getFirs...
CallableUtils { public static QueryParameters updateDirections(QueryParameters original, QueryParameters source) { QueryParameters updatedParams = new QueryParameters(original); Integer position = null; String originalKey = null; if (source != null) { for (String sourceKey : source.keySet()) { position = source.getFirs...
CallableUtils { public static QueryParameters updateDirections(QueryParameters original, QueryParameters source) { QueryParameters updatedParams = new QueryParameters(original); Integer position = null; String originalKey = null; if (source != null) { for (String sourceKey : source.keySet()) { position = source.getFirs...
CallableUtils { public static QueryParameters updateDirections(QueryParameters original, QueryParameters source) { QueryParameters updatedParams = new QueryParameters(original); Integer position = null; String originalKey = null; if (source != null) { for (String sourceKey : source.keySet()) { position = source.getFirs...
@Test public void testUpdateTypes() throws Exception { QueryParameters params = new QueryParameters(); params.set("first", "age"); params.set("second", "knowledge"); QueryParameters paramsTypes = new QueryParameters(); paramsTypes.set("first", "age", 10); paramsTypes.set("second", "knowledge", 11); Assert.assertEquals(...
public static QueryParameters updateTypes(QueryParameters original, QueryParameters source) { QueryParameters updatedParams = new QueryParameters(original); Integer position = null; String originalKey = null; if (source != null) { for (String sourceKey : source.keySet()) { position = source.getFirstPosition(sourceKey);...
CallableUtils { public static QueryParameters updateTypes(QueryParameters original, QueryParameters source) { QueryParameters updatedParams = new QueryParameters(original); Integer position = null; String originalKey = null; if (source != null) { for (String sourceKey : source.keySet()) { position = source.getFirstPosi...
CallableUtils { public static QueryParameters updateTypes(QueryParameters original, QueryParameters source) { QueryParameters updatedParams = new QueryParameters(original); Integer position = null; String originalKey = null; if (source != null) { for (String sourceKey : source.keySet()) { position = source.getFirstPosi...
CallableUtils { public static QueryParameters updateTypes(QueryParameters original, QueryParameters source) { QueryParameters updatedParams = new QueryParameters(original); Integer position = null; String originalKey = null; if (source != null) { for (String sourceKey : source.keySet()) { position = source.getFirstPosi...
CallableUtils { public static QueryParameters updateTypes(QueryParameters original, QueryParameters source) { QueryParameters updatedParams = new QueryParameters(original); Integer position = null; String originalKey = null; if (source != null) { for (String sourceKey : source.keySet()) { position = source.getFirstPosi...
@Test public void testUpdateDirectionsByName() throws Exception { QueryParameters params = new QueryParameters(); params.set("first", "age"); params.set("second", "knowledge"); QueryParameters paramsDirections = new QueryParameters(); paramsDirections.set("first", "age", QueryParameters.Direction.IN); paramsDirections....
public static QueryParameters updateDirectionsByName(QueryParameters original, QueryParameters source) { QueryParameters updatedParams = new QueryParameters(original); if (source != null) { for (String sourceKey : source.keySet()) { if (updatedParams.containsKey(sourceKey) == true) { updatedParams.updateDirection(sourc...
CallableUtils { public static QueryParameters updateDirectionsByName(QueryParameters original, QueryParameters source) { QueryParameters updatedParams = new QueryParameters(original); if (source != null) { for (String sourceKey : source.keySet()) { if (updatedParams.containsKey(sourceKey) == true) { updatedParams.updat...
CallableUtils { public static QueryParameters updateDirectionsByName(QueryParameters original, QueryParameters source) { QueryParameters updatedParams = new QueryParameters(original); if (source != null) { for (String sourceKey : source.keySet()) { if (updatedParams.containsKey(sourceKey) == true) { updatedParams.updat...
CallableUtils { public static QueryParameters updateDirectionsByName(QueryParameters original, QueryParameters source) { QueryParameters updatedParams = new QueryParameters(original); if (source != null) { for (String sourceKey : source.keySet()) { if (updatedParams.containsKey(sourceKey) == true) { updatedParams.updat...
CallableUtils { public static QueryParameters updateDirectionsByName(QueryParameters original, QueryParameters source) { QueryParameters updatedParams = new QueryParameters(original); if (source != null) { for (String sourceKey : source.keySet()) { if (updatedParams.containsKey(sourceKey) == true) { updatedParams.updat...
@Test public void testUpdateTypesByName() throws Exception { QueryParameters params = new QueryParameters(); params.set("first", "age"); params.set("second", "knowledge"); QueryParameters paramsTypes = new QueryParameters(); paramsTypes.set("first", "age", 10); paramsTypes.set("second", "knowledge", 11); Assert.assertE...
public static QueryParameters updateTypesByName(QueryParameters original, QueryParameters source) { QueryParameters updatedParams = new QueryParameters(original); if (source != null) { for (String sourceKey : source.keySet()) { if (updatedParams.containsKey(sourceKey) == true) { updatedParams.updateType(sourceKey, sour...
CallableUtils { public static QueryParameters updateTypesByName(QueryParameters original, QueryParameters source) { QueryParameters updatedParams = new QueryParameters(original); if (source != null) { for (String sourceKey : source.keySet()) { if (updatedParams.containsKey(sourceKey) == true) { updatedParams.updateType...
CallableUtils { public static QueryParameters updateTypesByName(QueryParameters original, QueryParameters source) { QueryParameters updatedParams = new QueryParameters(original); if (source != null) { for (String sourceKey : source.keySet()) { if (updatedParams.containsKey(sourceKey) == true) { updatedParams.updateType...
CallableUtils { public static QueryParameters updateTypesByName(QueryParameters original, QueryParameters source) { QueryParameters updatedParams = new QueryParameters(original); if (source != null) { for (String sourceKey : source.keySet()) { if (updatedParams.containsKey(sourceKey) == true) { updatedParams.updateType...
CallableUtils { public static QueryParameters updateTypesByName(QueryParameters original, QueryParameters source) { QueryParameters updatedParams = new QueryParameters(original); if (source != null) { for (String sourceKey : source.keySet()) { if (updatedParams.containsKey(sourceKey) == true) { updatedParams.updateType...
@Test public void testToMap() throws Exception { int age = 5; String name = "whiskers"; Cat cat = new Cat(); cat.setAge(age); cat.setName(name); Map<String, Object> map = MappingUtils.toMap(cat, MappingUtils.propertyDescriptors(cat.getClass())); Assert.assertEquals(cat.getAge(), map.get("age")); Assert.assertEquals(cat...
public static Map<String, Object> toMap(Object inputParameter, PropertyDescriptor[] propertyDescriptors) { Map<String, Object> resultMap = new HashMap<String, Object>(); Object propertyValue = null; for (PropertyDescriptor property : propertyDescriptors) { propertyValue = callGetter(inputParameter, property); if ("clas...
MappingUtils { public static Map<String, Object> toMap(Object inputParameter, PropertyDescriptor[] propertyDescriptors) { Map<String, Object> resultMap = new HashMap<String, Object>(); Object propertyValue = null; for (PropertyDescriptor property : propertyDescriptors) { propertyValue = callGetter(inputParameter, prope...
MappingUtils { public static Map<String, Object> toMap(Object inputParameter, PropertyDescriptor[] propertyDescriptors) { Map<String, Object> resultMap = new HashMap<String, Object>(); Object propertyValue = null; for (PropertyDescriptor property : propertyDescriptors) { propertyValue = callGetter(inputParameter, prope...
MappingUtils { public static Map<String, Object> toMap(Object inputParameter, PropertyDescriptor[] propertyDescriptors) { Map<String, Object> resultMap = new HashMap<String, Object>(); Object propertyValue = null; for (PropertyDescriptor property : propertyDescriptors) { propertyValue = callGetter(inputParameter, prope...
MappingUtils { public static Map<String, Object> toMap(Object inputParameter, PropertyDescriptor[] propertyDescriptors) { Map<String, Object> resultMap = new HashMap<String, Object>(); Object propertyValue = null; for (PropertyDescriptor property : propertyDescriptors) { propertyValue = callGetter(inputParameter, prope...
@Test public void testPropertyDescriptors() throws Exception { PropertyDescriptor props[] = MappingUtils.propertyDescriptors(Cat.class); Assert.assertEquals("age", props[0].getName()); Assert.assertEquals("name", props[2].getName()); }
public static PropertyDescriptor[] propertyDescriptors(Class<?> clazz) { BeanInfo beanInfo = null; try { beanInfo = Introspector.getBeanInfo(clazz); } catch (IntrospectionException ex) { throw new IllegalArgumentException( "Bean introspection failed: " + ex.getMessage()); } return beanInfo.getPropertyDescriptors(); }
MappingUtils { public static PropertyDescriptor[] propertyDescriptors(Class<?> clazz) { BeanInfo beanInfo = null; try { beanInfo = Introspector.getBeanInfo(clazz); } catch (IntrospectionException ex) { throw new IllegalArgumentException( "Bean introspection failed: " + ex.getMessage()); } return beanInfo.getPropertyDes...
MappingUtils { public static PropertyDescriptor[] propertyDescriptors(Class<?> clazz) { BeanInfo beanInfo = null; try { beanInfo = Introspector.getBeanInfo(clazz); } catch (IntrospectionException ex) { throw new IllegalArgumentException( "Bean introspection failed: " + ex.getMessage()); } return beanInfo.getPropertyDes...
MappingUtils { public static PropertyDescriptor[] propertyDescriptors(Class<?> clazz) { BeanInfo beanInfo = null; try { beanInfo = Introspector.getBeanInfo(clazz); } catch (IntrospectionException ex) { throw new IllegalArgumentException( "Bean introspection failed: " + ex.getMessage()); } return beanInfo.getPropertyDes...
MappingUtils { public static PropertyDescriptor[] propertyDescriptors(Class<?> clazz) { BeanInfo beanInfo = null; try { beanInfo = Introspector.getBeanInfo(clazz); } catch (IntrospectionException ex) { throw new IllegalArgumentException( "Bean introspection failed: " + ex.getMessage()); } return beanInfo.getPropertyDes...
@Test public void testMapPropertyDescriptors() throws Exception { Map<String, PropertyDescriptor> mapProps = MappingUtils.mapPropertyDescriptors(Cat.class); Assert.assertEquals("age", mapProps.get("age").getName()); Assert.assertEquals("name", mapProps.get("name").getName()); }
public static Map<String, PropertyDescriptor> mapPropertyDescriptors(Class<?> clazz) { PropertyDescriptor[] properties = propertyDescriptors(clazz); Map<String, PropertyDescriptor> mappedProperties = new HashMap<String, PropertyDescriptor>(); for (PropertyDescriptor property : properties) { if ("class".equals(property....
MappingUtils { public static Map<String, PropertyDescriptor> mapPropertyDescriptors(Class<?> clazz) { PropertyDescriptor[] properties = propertyDescriptors(clazz); Map<String, PropertyDescriptor> mappedProperties = new HashMap<String, PropertyDescriptor>(); for (PropertyDescriptor property : properties) { if ("class".e...
MappingUtils { public static Map<String, PropertyDescriptor> mapPropertyDescriptors(Class<?> clazz) { PropertyDescriptor[] properties = propertyDescriptors(clazz); Map<String, PropertyDescriptor> mappedProperties = new HashMap<String, PropertyDescriptor>(); for (PropertyDescriptor property : properties) { if ("class".e...
MappingUtils { public static Map<String, PropertyDescriptor> mapPropertyDescriptors(Class<?> clazz) { PropertyDescriptor[] properties = propertyDescriptors(clazz); Map<String, PropertyDescriptor> mappedProperties = new HashMap<String, PropertyDescriptor>(); for (PropertyDescriptor property : properties) { if ("class".e...
MappingUtils { public static Map<String, PropertyDescriptor> mapPropertyDescriptors(Class<?> clazz) { PropertyDescriptor[] properties = propertyDescriptors(clazz); Map<String, PropertyDescriptor> mappedProperties = new HashMap<String, PropertyDescriptor>(); for (PropertyDescriptor property : properties) { if ("class".e...
@Test public void testCallGetter() throws Exception { int age = 5; String name = "whiskers"; Cat cat = new Cat(); cat.setAge(age); cat.setName(name); Assert.assertEquals(age, MappingUtils.callGetter(cat, MappingUtils.propertyDescriptors(cat.getClass())[0])); Assert.assertEquals(name, MappingUtils.callGetter(cat, Mappin...
public static Object callGetter(Object target, PropertyDescriptor prop) { Object result = null; Method getter = prop.getReadMethod(); if (getter == null) { throw new RuntimeException("No read method for bean property " + target.getClass() + " " + prop.getName()); } try { result = getter.invoke(target, new Object[0]); }...
MappingUtils { public static Object callGetter(Object target, PropertyDescriptor prop) { Object result = null; Method getter = prop.getReadMethod(); if (getter == null) { throw new RuntimeException("No read method for bean property " + target.getClass() + " " + prop.getName()); } try { result = getter.invoke(target, ne...
MappingUtils { public static Object callGetter(Object target, PropertyDescriptor prop) { Object result = null; Method getter = prop.getReadMethod(); if (getter == null) { throw new RuntimeException("No read method for bean property " + target.getClass() + " " + prop.getName()); } try { result = getter.invoke(target, ne...
MappingUtils { public static Object callGetter(Object target, PropertyDescriptor prop) { Object result = null; Method getter = prop.getReadMethod(); if (getter == null) { throw new RuntimeException("No read method for bean property " + target.getClass() + " " + prop.getName()); } try { result = getter.invoke(target, ne...
MappingUtils { public static Object callGetter(Object target, PropertyDescriptor prop) { Object result = null; Method getter = prop.getReadMethod(); if (getter == null) { throw new RuntimeException("No read method for bean property " + target.getClass() + " " + prop.getName()); } try { result = getter.invoke(target, ne...
@Test public void testIsSLF4jAvailable() throws Exception { Assert.assertEquals(false, MidaoLogger.isSLF4jAvailable()); }
public static boolean isSLF4jAvailable() { if (SLF4jAvailable == null) { try { Class.forName("org.slf4j.Logger"); setSLF4jAvailable(true); } catch (ClassNotFoundException e) { setSLF4jAvailable(false); } } return SLF4jAvailable; }
MidaoLogger extends Logger { public static boolean isSLF4jAvailable() { if (SLF4jAvailable == null) { try { Class.forName("org.slf4j.Logger"); setSLF4jAvailable(true); } catch (ClassNotFoundException e) { setSLF4jAvailable(false); } } return SLF4jAvailable; } }
MidaoLogger extends Logger { public static boolean isSLF4jAvailable() { if (SLF4jAvailable == null) { try { Class.forName("org.slf4j.Logger"); setSLF4jAvailable(true); } catch (ClassNotFoundException e) { setSLF4jAvailable(false); } } return SLF4jAvailable; } private MidaoLogger(String name, String resourceBundleName)...
MidaoLogger extends Logger { public static boolean isSLF4jAvailable() { if (SLF4jAvailable == null) { try { Class.forName("org.slf4j.Logger"); setSLF4jAvailable(true); } catch (ClassNotFoundException e) { setSLF4jAvailable(false); } } return SLF4jAvailable; } private MidaoLogger(String name, String resourceBundleName)...
MidaoLogger extends Logger { public static boolean isSLF4jAvailable() { if (SLF4jAvailable == null) { try { Class.forName("org.slf4j.Logger"); setSLF4jAvailable(true); } catch (ClassNotFoundException e) { setSLF4jAvailable(false); } } return SLF4jAvailable; } private MidaoLogger(String name, String resourceBundleName)...
@Test public void testGetQueryRunnerDataSourceTypeHandler() throws Exception { Assert.assertEquals(true, MidaoFactory.getQueryRunner(ds, EmptyTypeHandler.class) instanceof QueryRunner); }
public static QueryRunnerService getQueryRunner(DataSource ds) { return (QueryRunnerService) ProfilerFactory.newInstance(new QueryRunner(ds)); }
MidaoFactory { public static QueryRunnerService getQueryRunner(DataSource ds) { return (QueryRunnerService) ProfilerFactory.newInstance(new QueryRunner(ds)); } }
MidaoFactory { public static QueryRunnerService getQueryRunner(DataSource ds) { return (QueryRunnerService) ProfilerFactory.newInstance(new QueryRunner(ds)); } }
MidaoFactory { public static QueryRunnerService getQueryRunner(DataSource ds) { return (QueryRunnerService) ProfilerFactory.newInstance(new QueryRunner(ds)); } static QueryRunnerService getQueryRunner(DataSource ds); static QueryRunnerService getQueryRunner(DataSource ds, Class<? extends TypeHandler> typeHandlerClazz)...
MidaoFactory { public static QueryRunnerService getQueryRunner(DataSource ds) { return (QueryRunnerService) ProfilerFactory.newInstance(new QueryRunner(ds)); } static QueryRunnerService getQueryRunner(DataSource ds); static QueryRunnerService getQueryRunner(DataSource ds, Class<? extends TypeHandler> typeHandlerClazz)...
@Test public void testCallSetter() throws Exception { int age = 5; String name = "whiskers"; Cat cat = new Cat(); MappingUtils.callSetter(cat, MappingUtils.propertyDescriptors(cat.getClass())[0], age); MappingUtils.callSetter(cat, MappingUtils.propertyDescriptors(cat.getClass())[2], name); Assert.assertEquals(age, cat....
public static void callSetter(Object target, PropertyDescriptor prop, Object value) { Method setter = prop.getWriteMethod(); if (setter == null) { return; } try { setter.invoke(target, new Object[]{value}); } catch (IllegalArgumentException e) { throw new RuntimeException( "Cannot set " + prop.getName() + ": " + e.getM...
MappingUtils { public static void callSetter(Object target, PropertyDescriptor prop, Object value) { Method setter = prop.getWriteMethod(); if (setter == null) { return; } try { setter.invoke(target, new Object[]{value}); } catch (IllegalArgumentException e) { throw new RuntimeException( "Cannot set " + prop.getName() ...
MappingUtils { public static void callSetter(Object target, PropertyDescriptor prop, Object value) { Method setter = prop.getWriteMethod(); if (setter == null) { return; } try { setter.invoke(target, new Object[]{value}); } catch (IllegalArgumentException e) { throw new RuntimeException( "Cannot set " + prop.getName() ...
MappingUtils { public static void callSetter(Object target, PropertyDescriptor prop, Object value) { Method setter = prop.getWriteMethod(); if (setter == null) { return; } try { setter.invoke(target, new Object[]{value}); } catch (IllegalArgumentException e) { throw new RuntimeException( "Cannot set " + prop.getName() ...
MappingUtils { public static void callSetter(Object target, PropertyDescriptor prop, Object value) { Method setter = prop.getWriteMethod(); if (setter == null) { return; } try { setter.invoke(target, new Object[]{value}); } catch (IllegalArgumentException e) { throw new RuntimeException( "Cannot set " + prop.getName() ...
@Test public void testConvertResultSet() throws Exception { ResultSet rs = mock(ResultSet.class); ResultSetMetaData rsmd = mock(ResultSetMetaData.class); when(rsmd.getColumnCount()).thenReturn(1); when(rsmd.getColumnLabel(1)).thenReturn("name"); when(rs.getMetaData()).thenReturn(rsmd); String name1 = "Bruce Lee"; Strin...
public static List<QueryParameters> convertResultSet(ResultSet rs) throws SQLException { List<QueryParameters> result = new ArrayList<QueryParameters>(); String columnName = null; while (rs.next() == true) { QueryParameters params = new QueryParameters(); ResultSetMetaData rsmd = rs.getMetaData(); int cols = rsmd.getCo...
MappingUtils { public static List<QueryParameters> convertResultSet(ResultSet rs) throws SQLException { List<QueryParameters> result = new ArrayList<QueryParameters>(); String columnName = null; while (rs.next() == true) { QueryParameters params = new QueryParameters(); ResultSetMetaData rsmd = rs.getMetaData(); int co...
MappingUtils { public static List<QueryParameters> convertResultSet(ResultSet rs) throws SQLException { List<QueryParameters> result = new ArrayList<QueryParameters>(); String columnName = null; while (rs.next() == true) { QueryParameters params = new QueryParameters(); ResultSetMetaData rsmd = rs.getMetaData(); int co...
MappingUtils { public static List<QueryParameters> convertResultSet(ResultSet rs) throws SQLException { List<QueryParameters> result = new ArrayList<QueryParameters>(); String columnName = null; while (rs.next() == true) { QueryParameters params = new QueryParameters(); ResultSetMetaData rsmd = rs.getMetaData(); int co...
MappingUtils { public static List<QueryParameters> convertResultSet(ResultSet rs) throws SQLException { List<QueryParameters> result = new ArrayList<QueryParameters>(); String columnName = null; while (rs.next() == true) { QueryParameters params = new QueryParameters(); ResultSetMetaData rsmd = rs.getMetaData(); int co...
@Test public void testNewInstance() throws Exception { Cat cat = MappingUtils.newInstance(Cat.class); Assert.assertEquals(true, cat != null && cat instanceof Cat); }
public static <T> T newInstance(Class<T> clazz) throws MjdbcException { try { return clazz.newInstance(); } catch (InstantiationException ex) { throw new MjdbcException( "Failed to create instance: " + clazz.getName() + " - " + ex.getMessage()); } catch (IllegalAccessException ex) { throw new MjdbcException( "Failed to...
MappingUtils { public static <T> T newInstance(Class<T> clazz) throws MjdbcException { try { return clazz.newInstance(); } catch (InstantiationException ex) { throw new MjdbcException( "Failed to create instance: " + clazz.getName() + " - " + ex.getMessage()); } catch (IllegalAccessException ex) { throw new MjdbcExcept...
MappingUtils { public static <T> T newInstance(Class<T> clazz) throws MjdbcException { try { return clazz.newInstance(); } catch (InstantiationException ex) { throw new MjdbcException( "Failed to create instance: " + clazz.getName() + " - " + ex.getMessage()); } catch (IllegalAccessException ex) { throw new MjdbcExcept...
MappingUtils { public static <T> T newInstance(Class<T> clazz) throws MjdbcException { try { return clazz.newInstance(); } catch (InstantiationException ex) { throw new MjdbcException( "Failed to create instance: " + clazz.getName() + " - " + ex.getMessage()); } catch (IllegalAccessException ex) { throw new MjdbcExcept...
MappingUtils { public static <T> T newInstance(Class<T> clazz) throws MjdbcException { try { return clazz.newInstance(); } catch (InstantiationException ex) { throw new MjdbcException( "Failed to create instance: " + clazz.getName() + " - " + ex.getMessage()); } catch (IllegalAccessException ex) { throw new MjdbcExcept...
@Test public void testInvokeConnectionSetter() throws MjdbcException { MappingUtils.invokeConnectionSetter(conn, "readOnly", false); MappingUtils.invokeConnectionSetter(conn, "catalog", ""); MappingUtils.invokeConnectionSetter(conn, "typeMap", null); MappingUtils.invokeConnectionSetter(conn, "holdability", 0); MappingU...
public static void invokeConnectionSetter(Connection conn, String functionName, Object value) throws MjdbcException { if (MjdbcConstants.connectionBeanDescription.containsKey(functionName) == true) { MappingUtils.callSetter(conn, MjdbcConstants.connectionBeanDescription.get(functionName), value); } else { throw new Mjd...
MappingUtils { public static void invokeConnectionSetter(Connection conn, String functionName, Object value) throws MjdbcException { if (MjdbcConstants.connectionBeanDescription.containsKey(functionName) == true) { MappingUtils.callSetter(conn, MjdbcConstants.connectionBeanDescription.get(functionName), value); } else ...
MappingUtils { public static void invokeConnectionSetter(Connection conn, String functionName, Object value) throws MjdbcException { if (MjdbcConstants.connectionBeanDescription.containsKey(functionName) == true) { MappingUtils.callSetter(conn, MjdbcConstants.connectionBeanDescription.get(functionName), value); } else ...
MappingUtils { public static void invokeConnectionSetter(Connection conn, String functionName, Object value) throws MjdbcException { if (MjdbcConstants.connectionBeanDescription.containsKey(functionName) == true) { MappingUtils.callSetter(conn, MjdbcConstants.connectionBeanDescription.get(functionName), value); } else ...
MappingUtils { public static void invokeConnectionSetter(Connection conn, String functionName, Object value) throws MjdbcException { if (MjdbcConstants.connectionBeanDescription.containsKey(functionName) == true) { MappingUtils.callSetter(conn, MjdbcConstants.connectionBeanDescription.get(functionName), value); } else ...
@Test public void testInvokeFunction() throws MjdbcException { Assert.assertEquals(true, MappingUtils.invokeFunction("", "isEmpty", new Class[]{}, new Object[]{})); Assert.assertEquals(false, MappingUtils.invokeFunction("bla", "isEmpty", new Class[]{}, new Object[]{})); }
public static Object invokeFunction(Object object, String functionName, Class[] parameters, Object[] values) throws MjdbcException { Object result = null; try { Method method = object.getClass().getMethod(functionName, parameters); method.setAccessible(true); result = method.invoke(object, values); } catch (Exception e...
MappingUtils { public static Object invokeFunction(Object object, String functionName, Class[] parameters, Object[] values) throws MjdbcException { Object result = null; try { Method method = object.getClass().getMethod(functionName, parameters); method.setAccessible(true); result = method.invoke(object, values); } cat...
MappingUtils { public static Object invokeFunction(Object object, String functionName, Class[] parameters, Object[] values) throws MjdbcException { Object result = null; try { Method method = object.getClass().getMethod(functionName, parameters); method.setAccessible(true); result = method.invoke(object, values); } cat...
MappingUtils { public static Object invokeFunction(Object object, String functionName, Class[] parameters, Object[] values) throws MjdbcException { Object result = null; try { Method method = object.getClass().getMethod(functionName, parameters); method.setAccessible(true); result = method.invoke(object, values); } cat...
MappingUtils { public static Object invokeFunction(Object object, String functionName, Class[] parameters, Object[] values) throws MjdbcException { Object result = null; try { Method method = object.getClass().getMethod(functionName, parameters); method.setAccessible(true); result = method.invoke(object, values); } cat...
@Test public void testInvokeStaticFunction() throws MjdbcException { Assert.assertEquals("1", MappingUtils.invokeStaticFunction(String.class, "valueOf", new Class[]{int.class}, new Object[]{1})); Assert.assertEquals("3", MappingUtils.invokeStaticFunction(String.class, "valueOf", new Class[]{int.class}, new Object[]{3})...
public static Object invokeStaticFunction(Class clazz, String functionName, Class[] parameters, Object[] values) throws MjdbcException { Object result = null; try { Method method = clazz.getMethod(functionName, parameters); method.setAccessible(true); result = method.invoke(null, values); } catch (Exception ex) { throw...
MappingUtils { public static Object invokeStaticFunction(Class clazz, String functionName, Class[] parameters, Object[] values) throws MjdbcException { Object result = null; try { Method method = clazz.getMethod(functionName, parameters); method.setAccessible(true); result = method.invoke(null, values); } catch (Except...
MappingUtils { public static Object invokeStaticFunction(Class clazz, String functionName, Class[] parameters, Object[] values) throws MjdbcException { Object result = null; try { Method method = clazz.getMethod(functionName, parameters); method.setAccessible(true); result = method.invoke(null, values); } catch (Except...
MappingUtils { public static Object invokeStaticFunction(Class clazz, String functionName, Class[] parameters, Object[] values) throws MjdbcException { Object result = null; try { Method method = clazz.getMethod(functionName, parameters); method.setAccessible(true); result = method.invoke(null, values); } catch (Except...
MappingUtils { public static Object invokeStaticFunction(Class clazz, String functionName, Class[] parameters, Object[] values) throws MjdbcException { Object result = null; try { Method method = clazz.getMethod(functionName, parameters); method.setAccessible(true); result = method.invoke(null, values); } catch (Except...
@Test public void testHasFunction() { Assert.assertEquals(true, MappingUtils.hasFunction("", "length", new Class[]{})); Assert.assertEquals(false, MappingUtils.hasFunction("", "bla", new Class[]{})); }
public static boolean hasFunction(Object object, String functionName, Class[] parameters) { boolean result = false; try { Method method = object.getClass().getMethod(functionName, parameters); if (method != null) { result = true; } } catch (NoSuchMethodException ex) { result = false; } return result; }
MappingUtils { public static boolean hasFunction(Object object, String functionName, Class[] parameters) { boolean result = false; try { Method method = object.getClass().getMethod(functionName, parameters); if (method != null) { result = true; } } catch (NoSuchMethodException ex) { result = false; } return result; } }
MappingUtils { public static boolean hasFunction(Object object, String functionName, Class[] parameters) { boolean result = false; try { Method method = object.getClass().getMethod(functionName, parameters); if (method != null) { result = true; } } catch (NoSuchMethodException ex) { result = false; } return result; } ...
MappingUtils { public static boolean hasFunction(Object object, String functionName, Class[] parameters) { boolean result = false; try { Method method = object.getClass().getMethod(functionName, parameters); if (method != null) { result = true; } } catch (NoSuchMethodException ex) { result = false; } return result; } ...
MappingUtils { public static boolean hasFunction(Object object, String functionName, Class[] parameters) { boolean result = false; try { Method method = object.getClass().getMethod(functionName, parameters); if (method != null) { result = true; } } catch (NoSuchMethodException ex) { result = false; } return result; } ...