public interface Dao<T,I>
限定符和类型 | 方法和说明 |
---|---|
int |
create(Collection<T> paramT)
新建一组数据对象
|
int |
create(T paramT)
新建一个数据对象
|
int |
delete(Collection<T> paramCollection)
删除数据对象集合
|
int |
delete(DeleteBuilder deleteBuilder)
根据条件删除
|
int |
delete(T paramT)
删除数据对象
|
int |
deleteAll()
清空表删
|
int |
deleteById(I paramID)
更具ID删除
|
int |
deleteByIds(Collection<I> paramCollection)
根据ID列表执行删除
|
Class<T> |
getEntityClass()
获取实体类
|
List<T> |
query(QueryBuilder queryBuilder,
String... columns)
条件查询
|
List<T> |
queryForAll(String... columns)
查询所有
|
T |
queryForId(I paramK,
String... columns)
根据K查询
|
T |
refresh(T paramT,
String... columns)
刷新数据对象
|
void |
showSql(boolean showSql)
设置是否显示执行的sql语句
|
int |
update(Collection<T> paramT,
String... columns)
更新数据对象
|
int |
update(T paramT,
String... column)
更新数据对象
|
int |
update(UpdateBuilder updateBuilder)
更新数据
|
int |
updateById(T paramT,
I paramID,
String... columns)
更新数据对象根据
|
void showSql(boolean showSql) throws SQLException
showSql
- SQLException
int create(T paramT) throws SQLException
paramT
- SQLException
int create(Collection<T> paramT) throws SQLException
paramT
- SQLException
List<T> query(QueryBuilder queryBuilder, String... columns) throws SQLException
queryBuilder
- SQLException
T queryForId(I paramK, String... columns) throws SQLException
paramK
- SQLException
T refresh(T paramT, String... columns) throws SQLException
paramT
- SQLException
int update(UpdateBuilder updateBuilder) throws SQLException
updateBuilder
- SQLException
int update(T paramT, String... column) throws SQLException
paramT
- SQLException
int update(Collection<T> paramT, String... columns) throws SQLException
paramT
- columns
- SQLException
int updateById(T paramT, I paramID, String... columns) throws SQLException
paramT
- paramID
- columns
- SQLException
int delete(DeleteBuilder deleteBuilder) throws SQLException
deleteBuilder
- SQLException
int delete(T paramT) throws SQLException
paramT
- SQLException
int delete(Collection<T> paramCollection) throws SQLException
paramCollection
- SQLException
int deleteById(I paramID) throws SQLException
paramID
- SQLException
int deleteByIds(Collection<I> paramCollection) throws SQLException
paramCollection
- SQLException
int deleteAll() throws SQLException
SQLException