public interface BaseSelectRepository<E,ID extends Serializable>
| 限定符和类型 | 方法和说明 |
|---|---|
long |
count(Clause clause) |
List<E> |
getAll() |
E |
getById(ID id) |
List<E> |
page(Clause clause,
Paging page,
Sorting[] sorts) |
List<E> |
query(Clause clause) |
List<Map<String,Object>> |
querySelective(String table,
List<QueryField> fields,
Clause clause,
Integer startIndex,
Integer endIndex,
Sorting[] sortings)
选择性查询
|
List<E> |
seek(Clause clause) |
E |
seekById(ID id) |
List<E> |
take(Clause clause,
int startIndex,
int endIndex,
Sorting[] sorts) |
@SelectProvider(type=BaseSelectProvider.class, method="dynamicSQL") E getById(@Param(value="_key") ID id)
@SelectProvider(type=BaseSelectProvider.class, method="dynamicSQL") E seekById(@Param(value="_key") ID id)
@SelectProvider(type=BaseSelectProvider.class, method="dynamicSQL") List<E> seek(@Param(value="_clause") Clause clause)
@SelectProvider(type=BaseSelectProvider.class, method="dynamicSQL") long count(@Param(value="_clause") Clause clause)
@SelectProvider(type=BaseSelectProvider.class, method="dynamicSQL") List<E> query(@Param(value="_clause") Clause clause)
@SelectProvider(type=BaseSelectProvider.class, method="dynamicSQL") List<E> page(@Param(value="_clause") Clause clause, @Param(value="_paging") Paging page, @Param(value="_sorts") Sorting[] sorts)
@SelectProvider(type=BaseSelectProvider.class, method="dynamicSQL") List<E> take(@Param(value="_clause") Clause clause, @Param(value="_startIndex") int startIndex, @Param(value="_endIndex") int endIndex, @Param(value="_sorts") Sorting[] sorts)
@SelectProvider(type=BaseSelectProvider.class, method="dynamicSQL") List<E> getAll()
@SelectProvider(type=BaseSelectProvider.class, method="dynamicSQL") List<Map<String,Object>> querySelective(@Param(value="_table") String table, @Param(value="_fields") List<QueryField> fields, @Param(value="_clause") Clause clause, @Param(value="_startIndex") Integer startIndex, @Param(value="_endIndex") Integer endIndex, @Param(value="_sortings") Sorting[] sortings)
table - 表名fields - 要查询的字段clause - 条件sortings - 排序条件Copyright © 2018. All rights reserved.