public class DslTemplateImpl extends DslAccessor implements DslTemplate
dslSession
Constructor and Description |
---|
DslTemplateImpl() |
DslTemplateImpl(DslSession dslSession) |
Modifier and Type | Method and Description |
---|---|
<T> int[] |
batchDelete(List<T> objects,
DeleteGenerateCallback<T> callback)
批量删除,批量执行生成的多句delete语句
|
<T> int[] |
batchDelete(List<T> objs,
NoParamDeleteGenerateCallback callback)
批量删除
|
<T> int[] |
batchInsert(boolean autoGeneratedKeys,
List<T> objects,
InsertGenerateCallback<T> callback)
批量新增,批量执行生成的多句insert语句
|
<T> int[] |
batchInsert(boolean autoGeneratedKeys,
List<T> objs,
NoParamInsertGenerateCallback callback)
批量新增,主键值由框架生成
|
<T> int[] |
batchInsert(List<T> objs,
NoParamInsertGenerateCallback callback)
批量新增,主键值需要设置到参数对象中
|
<T> int[] |
batchUpdate(List<T> objs,
NoParamUpdateGenerateCallback callback)
批量更改
|
<T> int[] |
batchUpdate(List<T> objects,
UpdateGenerateCallback<T> callback)
批量更改,批量执行生成的多句update语句
|
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)
根据主键查询记录
|
<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)
分页查询
|
<T> int |
update(T t,
UpdateGenerateCallback<T> callback)
更新操作,默认会忽略值为null的字段
|
<T> int |
update(T t,
UpdateGenerateCallback<T> callback,
boolean ignore)
更新操作
|
afterPropertiesSet, getDslSession, setDslSession
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDslSession, setDslSession
public DslTemplateImpl()
public DslTemplateImpl(DslSession dslSession)
public <T> T insert(T t, InsertGenerateCallback<T> callback)
DslTemplate
insert
in interface DslTemplate
public <T> T insertAndReturnKey(T t, InsertGenerateCallback<T> callback)
DslTemplate
insertAndReturnKey
in interface DslTemplate
public <T> T insertAndReturnKey(boolean autoGeneratedKeys, T t, InsertGenerateCallback<T> callback)
DslTemplate
insertAndReturnKey
in interface DslTemplate
public <T> int update(T t, UpdateGenerateCallback<T> callback, boolean ignore)
DslTemplate
update
in interface DslTemplate
ignore
- true:忽略更新值为null的字段public <T> int update(T t, UpdateGenerateCallback<T> callback)
DslTemplate
update
in interface DslTemplate
public int deleteByKey(Serializable pk, DeleteGenerateCallback<Serializable> callback)
DslTemplate
deleteByKey
in interface DslTemplate
public <T> T getByKey(Serializable pk, Class<T> requiredType, SelectGenerateCallback<Serializable> callback)
DslTemplate
getByKey
in interface DslTemplate
public int deleteByKeys(DeleteGenerateCallback<Serializable[]> callback, Serializable... pks)
DslTemplate
deleteByKeys
in interface DslTemplate
public <T> List<T> query(T t, SelectGenerateCallback<T> callback)
DslTemplate
query
in interface DslTemplate
public <T> Pager<T> queryPager(int start, int limit, T t, boolean isCursor, SelectGenerateCallback<T> callback)
DslTemplate
queryPager
in interface DslTemplate
public <T> int[] batchInsert(List<T> objs, NoParamInsertGenerateCallback callback)
DslTemplate
batchInsert
in interface DslTemplate
public <T> int[] batchInsert(boolean autoGeneratedKeys, List<T> objs, NoParamInsertGenerateCallback callback)
DslTemplate
batchInsert
in interface DslTemplate
public <T> int[] batchUpdate(List<T> objs, NoParamUpdateGenerateCallback callback)
DslTemplate
batchUpdate
in interface DslTemplate
public <T> int[] batchDelete(List<T> objs, NoParamDeleteGenerateCallback callback)
DslTemplate
batchDelete
in interface DslTemplate
public int delete(NoParamDeleteGenerateCallback callback)
delete
in interface DslTemplate
public <T> int[] batchInsert(boolean autoGeneratedKeys, List<T> objects, InsertGenerateCallback<T> callback)
DslTemplate
batchInsert
in interface DslTemplate
public <T> int[] batchUpdate(List<T> objects, UpdateGenerateCallback<T> callback)
DslTemplate
batchUpdate
in interface DslTemplate
public <T> int[] batchDelete(List<T> objects, DeleteGenerateCallback<T> callback)
DslTemplate
batchDelete
in interface DslTemplate
Copyright © 2006–2018 TinyGroup. All rights reserved.