public interface DslTemplate
Modifier and Type | Method and Description |
---|---|
<T> int[] |
batchDelete(List<T> objects,
DeleteGenerateCallback<T> callback)
批量删除,批量执行生成的多句delete语句
|
<T> int[] |
batchDelete(List<T> objects,
NoParamDeleteGenerateCallback callback)
批量删除
|
<T> int[] |
batchInsert(boolean autoGeneratedKeys,
List<T> objects,
InsertGenerateCallback<T> callback)
批量新增,批量执行生成的多句insert语句
|
<T> int[] |
batchInsert(boolean autoGeneratedKeys,
List<T> objects,
NoParamInsertGenerateCallback callback)
批量新增,主键值由框架生成
|
<T> int[] |
batchInsert(List<T> objects,
NoParamInsertGenerateCallback callback)
批量新增,主键值需要设置到参数对象中
|
<T> int[] |
batchUpdate(List<T> objects,
NoParamUpdateGenerateCallback callback)
批量更改
|
<T> int[] |
batchUpdate(List<T> objects,
UpdateGenerateCallback<T> callback)
批量更改,批量执行生成的多句update语句
|
<T> int |
delete(NoParamDeleteGenerateCallback callback) |
int |
deleteByKey(Serializable pk,
DeleteGenerateCallback<Serializable> callback)
根据主键删除记录
|
int |
deleteByKeys(DeleteGenerateCallback<Serializable[]> callback,
Serializable... pks)
根据主键数组删除记录
|
<T> T |
getByKey(Serializable pk,
Class<T> requiredType,
SelectGenerateCallback<Serializable> callback)
根据主键查询记录
|
DslSession |
getDslSession() |
<T> T |
insert(T t,
InsertGenerateCallback<T> callback)
插入记录,主键值需要自己传人
|
<T> T |
insertAndReturnKey(boolean autoGeneratedKeys,
T t,
InsertGenerateCallback<T> callback)
插入记录操作,主键值可以自动生成
|
<T> T |
insertAndReturnKey(T t,
InsertGenerateCallback<T> callback)
插入记录操作,主键值可以自动生成
|
<T> List<T> |
query(T t,
SelectGenerateCallback<T> callback)
查询操作
|
<T> Pager<T> |
queryPager(int start,
int limit,
T t,
boolean isCursor,
SelectGenerateCallback<T> callback)
分页查询
|
void |
setDslSession(DslSession dslSession) |
<T> int |
update(T t,
UpdateGenerateCallback<T> callback)
更新操作,默认会忽略值为null的字段
|
<T> int |
update(T t,
UpdateGenerateCallback<T> callback,
boolean ignore)
更新操作
|
DslSession getDslSession()
void setDslSession(DslSession dslSession)
<T> T insert(T t, InsertGenerateCallback<T> callback)
t
- callback
- <T> T insertAndReturnKey(T t, InsertGenerateCallback<T> callback)
t
- callback
- <T> T insertAndReturnKey(boolean autoGeneratedKeys, T t, InsertGenerateCallback<T> callback)
autoGeneratedKeys
- t
- callback
- <T> int update(T t, UpdateGenerateCallback<T> callback)
t
- callback
- <T> int update(T t, UpdateGenerateCallback<T> callback, boolean ignore)
t
- callback
- ignore
- true:忽略更新值为null的字段int deleteByKey(Serializable pk, DeleteGenerateCallback<Serializable> callback)
pk
- callback
- <T> T getByKey(Serializable pk, Class<T> requiredType, SelectGenerateCallback<Serializable> callback)
pk
- callback
- int deleteByKeys(DeleteGenerateCallback<Serializable[]> callback, Serializable... pks)
callback
- pks
- <T> List<T> query(T t, SelectGenerateCallback<T> callback)
t
- callback
- <T> Pager<T> queryPager(int start, int limit, T t, boolean isCursor, SelectGenerateCallback<T> callback)
start
- limit
- t
- callback
- <T> int[] batchInsert(List<T> objects, NoParamInsertGenerateCallback callback)
objects
- callback
- <T> int[] batchInsert(boolean autoGeneratedKeys, List<T> objects, NoParamInsertGenerateCallback callback)
autoGeneratedKeys
- objects
- callback
- <T> int[] batchUpdate(List<T> objects, NoParamUpdateGenerateCallback callback)
objects
- callback
- <T> int[] batchDelete(List<T> objects, NoParamDeleteGenerateCallback callback)
objects
- callback
- <T> int delete(NoParamDeleteGenerateCallback callback)
<T> int[] batchInsert(boolean autoGeneratedKeys, List<T> objects, InsertGenerateCallback<T> callback)
autoGeneratedKeys
- objects
- callback
- <T> int[] batchUpdate(List<T> objects, UpdateGenerateCallback<T> callback)
objects
- callback
- <T> int[] batchDelete(List<T> objects, DeleteGenerateCallback<T> callback)
objects
- callback
- Copyright © 2006–2018 TinyGroup. All rights reserved.