Add methods from jdbc data query to data factory
This commit is contained in:
parent
0f2c0f8fa1
commit
295cfc3707
@ -1,6 +1,7 @@
|
||||
package com.cubetiqs.sql;
|
||||
|
||||
import com.cubetiqs.mapper.MapperProvider;
|
||||
import com.cubetiqs.mapper.RowMapperProvider;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@ -14,6 +15,14 @@ public final class DataFactory {
|
||||
return manager.queryForList(sql, args);
|
||||
}
|
||||
|
||||
public static <R> IExecuteResult<List<R>> queryForList(JdbcDataQuery manager, String sql, RowMapperProvider<R> mapper) {
|
||||
return manager.queryForList(sql, mapper);
|
||||
}
|
||||
|
||||
public static <R> IExecuteResult<List<R>> queryForList(JdbcDataQuery manager, String sql, RowMapperProvider<R> mapper, Object... args) {
|
||||
return manager.queryForList(sql, mapper, args);
|
||||
}
|
||||
|
||||
public static IExecuteResult<Object> queryForObject(JdbcDataQuery manager, String sql) {
|
||||
return manager.queryForObject(sql);
|
||||
}
|
||||
@ -30,10 +39,22 @@ public final class DataFactory {
|
||||
return manager.query(mapper, sql, clazz, args);
|
||||
}
|
||||
|
||||
public static <R> IExecuteResult<R> query(JdbcDataQuery manager, String sql, RowMapperProvider<R> mapper) {
|
||||
return manager.query(sql, mapper);
|
||||
}
|
||||
|
||||
public static <R> IExecuteResult<R> query(JdbcDataQuery manager, String sql, RowMapperProvider<R> mapper, Object... args) {
|
||||
return manager.query(sql, mapper, args);
|
||||
}
|
||||
|
||||
public static IExecuteResult<List<Object>> queryForList(JdbcDataQuery manager, ISqlMapParameter parameter) {
|
||||
return manager.queryForList(parameter);
|
||||
}
|
||||
|
||||
public static <R> IExecuteResult<List<R>> queryForList(JdbcDataQuery manager, ISqlMapParameter parameter, RowMapperProvider<R> mapper) {
|
||||
return manager.queryForList(parameter, mapper);
|
||||
}
|
||||
|
||||
public static IExecuteResult<Object> queryForObject(JdbcDataQuery manager, ISqlMapParameter parameter) {
|
||||
return manager.queryForObject(parameter);
|
||||
}
|
||||
@ -41,4 +62,8 @@ public final class DataFactory {
|
||||
public static <R> IExecuteResult<R> query(JdbcDataQuery manager, MapperProvider<Map<String, Object>, R> mapper, ISqlMapParameter parameter, Class<R> clazz) {
|
||||
return manager.query(mapper, parameter, clazz);
|
||||
}
|
||||
|
||||
public static <R> IExecuteResult<R> query(JdbcDataQuery manager, ISqlMapParameter parameter, RowMapperProvider<R> mapper) {
|
||||
return manager.query(parameter, mapper);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user