Package top.codef.dao
Class BaseDao
java.lang.Object
top.codef.dao.AbstractDao
top.codef.dao.BaseDao
- All Implemented Interfaces:
AmebaDao
- Direct Known Subclasses:
CommonDao
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<T> Long
count
(Class<T> clazz, CommonFilter commonFilter) 数量<T> Long
countDistinct
(Class<T> clazz, String field, CommonFilter commonFilter) 数量<T> int
delete
(Class<T> clazz, CommonFilter commonFilter) <T> List<T>
获取所有数据<T,
K> List<T> getList
(Class<T> tarClazz, Class<K> rootClazz, CommonFilter commonFilter) <T,
R> List<T> getList
(Class<T> tarClazz, Class<R> rootClazz, Pageable page, CommonFilter commonFilter) <T> List<T>
getList
(Class<T> clazz, Pageable page, CommonFilter commonFilter) 分页所做查询列表<T> List<T>
getList
(Class<T> clazz, CommonFilter commonFilter) 获取列表<T,
R> Page<T> getPage
(Class<T> tarClazz, Class<R> rootClazz, Pageable pageable, CommonFilter filter) <T> Page<T>
getPage
(Class<T> clazz, Pageable pageable, CommonFilter filter) <T,
K> T getSingle
(Class<T> tarClazz, Class<K> rootClass, CommonFilter commonFilter) 获取单个实例<T> T
getSingle
(Class<T> clazz, CommonFilter commonFilter) 获取单个实例<T> Integer
update
(Class<T> clazz, CommonFilter commonFilter) <T> Integer
updateWithNull
(Class<T> clazz, CommonFilter commonFilter) Methods inherited from class top.codef.dao.AbstractDao
create, createOrUpdate, delete, delete, detach, flush, get, getEntityManager, getSession, lock, merge, refresh
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface top.codef.dao.AmebaDao
conditionHandle, conditionHandle, generateUid, groupBy, groupBy, joinTable, limit, orderBy, orderBy, orderBy, orderBy, select, seperate, where
-
Constructor Details
-
BaseDao
public BaseDao()
-
-
Method Details
-
getSingle
获取单个实例- Parameters:
clazz
-commonFilter
-- Returns:
-
getSingle
获取单个实例- Type Parameters:
T
-K
-- Parameters:
tarClazz
-rootClass
-commonFilter
-- Returns:
-
getList
-
getList
分页所做查询列表- Type Parameters:
T
-- Parameters:
clazz
-page
-commonFilter
-- Returns:
-
getList
public <T,R> List<T> getList(Class<T> tarClazz, Class<R> rootClazz, Pageable page, CommonFilter commonFilter) - Parameters:
tarClazz
-rootClazz
-page
-commonFilter
-- Returns:
-
getPage
-
getPage
public <T,R> Page<T> getPage(Class<T> tarClazz, Class<R> rootClazz, Pageable pageable, CommonFilter filter) -
getList
获取所有数据- Parameters:
clazz
-- Returns:
-
getList
获取列表- Type Parameters:
T
-- Parameters:
clazz
-commonFilter
-- Returns:
-
count
数量- Type Parameters:
T
-- Parameters:
clazz
-commonFilter
-- Returns:
-
countDistinct
数量- Type Parameters:
T
-- Parameters:
clazz
-field
-commonFilter
-- Returns:
-
update
-
updateWithNull
-
delete
-