Class MyBatis3Utils
java.lang.Object
org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils
Utility functions for building MyBatis3 mappers.
- Author:
- Jeff Butler
-
Method Summary
Modifier and TypeMethodDescriptionstatic long
count
(ToLongFunction<SelectStatementProvider> mapper, BasicColumn column, SqlTable table, CountDSLCompleter completer) static SelectStatementProvider
count
(BasicColumn column, SqlTable table, CountDSLCompleter completer) static long
countDistinct
(ToLongFunction<SelectStatementProvider> mapper, BasicColumn column, SqlTable table, CountDSLCompleter completer) static SelectStatementProvider
countDistinct
(BasicColumn column, SqlTable table, CountDSLCompleter completer) static long
countFrom
(ToLongFunction<SelectStatementProvider> mapper, CountDSL<SelectModel> start, CountDSLCompleter completer) static long
countFrom
(ToLongFunction<SelectStatementProvider> mapper, SqlTable table, CountDSLCompleter completer) static SelectStatementProvider
countFrom
(CountDSL<SelectModel> start, CountDSLCompleter completer) static SelectStatementProvider
countFrom
(SqlTable table, CountDSLCompleter completer) static int
deleteFrom
(ToIntFunction<DeleteStatementProvider> mapper, SqlTable table, DeleteDSLCompleter completer) static DeleteStatementProvider
deleteFrom
(SqlTable table, DeleteDSLCompleter completer) static int
generalInsert
(ToIntFunction<GeneralInsertStatementProvider> mapper, SqlTable table, UnaryOperator<GeneralInsertDSL> completer) generalInsert
(SqlTable table, UnaryOperator<GeneralInsertDSL> completer) static <R> int
insert
(ToIntFunction<InsertStatementProvider<R>> mapper, R row, SqlTable table, UnaryOperator<InsertDSL<R>> completer) static <R> InsertStatementProvider
<R> insert
(R row, SqlTable table, UnaryOperator<InsertDSL<R>> completer) static <R> MultiRowInsertStatementProvider
<R> insertMultiple
(Collection<R> records, SqlTable table, UnaryOperator<MultiRowInsertDSL<R>> completer) static <R> int
insertMultiple
(ToIntFunction<MultiRowInsertStatementProvider<R>> mapper, Collection<R> records, SqlTable table, UnaryOperator<MultiRowInsertDSL<R>> completer) static <R> int
insertMultipleWithGeneratedKeys
(ToIntBiFunction<String, List<R>> mapper, Collection<R> records, SqlTable table, UnaryOperator<MultiRowInsertDSL<R>> completer) static SelectStatementProvider
select
(BasicColumn[] selectList, SqlTable table, SelectDSLCompleter completer) static SelectStatementProvider
select
(QueryExpressionDSL<SelectModel> start, SelectDSLCompleter completer) static <R> List
<R> selectDistinct
(Function<SelectStatementProvider, List<R>> mapper, BasicColumn[] selectList, SqlTable table, SelectDSLCompleter completer) static SelectStatementProvider
selectDistinct
(BasicColumn[] selectList, SqlTable table, SelectDSLCompleter completer) static <R> List
<R> selectList
(Function<SelectStatementProvider, List<R>> mapper, BasicColumn[] selectList, SqlTable table, SelectDSLCompleter completer) static <R> List
<R> selectList
(Function<SelectStatementProvider, List<R>> mapper, QueryExpressionDSL<SelectModel> start, SelectDSLCompleter completer) static <R> R
selectOne
(Function<SelectStatementProvider, R> mapper, BasicColumn[] selectList, SqlTable table, SelectDSLCompleter completer) static <R> R
selectOne
(Function<SelectStatementProvider, R> mapper, QueryExpressionDSL<SelectModel> start, SelectDSLCompleter completer) static int
update
(ToIntFunction<UpdateStatementProvider> mapper, SqlTable table, UpdateDSLCompleter completer) static UpdateStatementProvider
update
(SqlTable table, UpdateDSLCompleter completer)
-
Method Details
-
count
public static long count(ToLongFunction<SelectStatementProvider> mapper, BasicColumn column, SqlTable table, CountDSLCompleter completer) -
count
public static SelectStatementProvider count(BasicColumn column, SqlTable table, CountDSLCompleter completer) -
countDistinct
public static long countDistinct(ToLongFunction<SelectStatementProvider> mapper, BasicColumn column, SqlTable table, CountDSLCompleter completer) -
countDistinct
public static SelectStatementProvider countDistinct(BasicColumn column, SqlTable table, CountDSLCompleter completer) -
countFrom
-
countFrom
public static long countFrom(ToLongFunction<SelectStatementProvider> mapper, SqlTable table, CountDSLCompleter completer) -
countFrom
public static SelectStatementProvider countFrom(CountDSL<SelectModel> start, CountDSLCompleter completer) -
countFrom
public static long countFrom(ToLongFunction<SelectStatementProvider> mapper, CountDSL<SelectModel> start, CountDSLCompleter completer) -
deleteFrom
-
deleteFrom
public static int deleteFrom(ToIntFunction<DeleteStatementProvider> mapper, SqlTable table, DeleteDSLCompleter completer) -
insert
public static <R> InsertStatementProvider<R> insert(R row, SqlTable table, UnaryOperator<InsertDSL<R>> completer) -
insert
public static <R> int insert(ToIntFunction<InsertStatementProvider<R>> mapper, R row, SqlTable table, UnaryOperator<InsertDSL<R>> completer) -
generalInsert
public static GeneralInsertStatementProvider generalInsert(SqlTable table, UnaryOperator<GeneralInsertDSL> completer) -
generalInsert
public static int generalInsert(ToIntFunction<GeneralInsertStatementProvider> mapper, SqlTable table, UnaryOperator<GeneralInsertDSL> completer) -
insertMultiple
public static <R> MultiRowInsertStatementProvider<R> insertMultiple(Collection<R> records, SqlTable table, UnaryOperator<MultiRowInsertDSL<R>> completer) -
insertMultiple
public static <R> int insertMultiple(ToIntFunction<MultiRowInsertStatementProvider<R>> mapper, Collection<R> records, SqlTable table, UnaryOperator<MultiRowInsertDSL<R>> completer) -
insertMultipleWithGeneratedKeys
public static <R> int insertMultipleWithGeneratedKeys(ToIntBiFunction<String, List<R>> mapper, Collection<R> records, SqlTable table, UnaryOperator<MultiRowInsertDSL<R>> completer) -
select
public static SelectStatementProvider select(BasicColumn[] selectList, SqlTable table, SelectDSLCompleter completer) -
select
public static SelectStatementProvider select(QueryExpressionDSL<SelectModel> start, SelectDSLCompleter completer) -
selectDistinct
public static SelectStatementProvider selectDistinct(BasicColumn[] selectList, SqlTable table, SelectDSLCompleter completer) -
selectDistinct
public static <R> List<R> selectDistinct(Function<SelectStatementProvider, List<R>> mapper, BasicColumn[] selectList, SqlTable table, SelectDSLCompleter completer) -
selectList
public static <R> List<R> selectList(Function<SelectStatementProvider, List<R>> mapper, BasicColumn[] selectList, SqlTable table, SelectDSLCompleter completer) -
selectList
public static <R> List<R> selectList(Function<SelectStatementProvider, List<R>> mapper, QueryExpressionDSL<SelectModel> start, SelectDSLCompleter completer) -
selectOne
public static <R> R selectOne(Function<SelectStatementProvider, R> mapper, BasicColumn[] selectList, SqlTable table, SelectDSLCompleter completer) -
selectOne
public static <R> R selectOne(Function<SelectStatementProvider, R> mapper, QueryExpressionDSL<SelectModel> start, SelectDSLCompleter completer) -
update
-
update
public static int update(ToIntFunction<UpdateStatementProvider> mapper, SqlTable table, UpdateDSLCompleter completer)
-