public interface SuidRich extends Suid
| 限定符和类型 | 方法和说明 |
|---|---|
<T> int |
delete(T entity,
IncludeType includeType)
根据实体对象entity删除数据.Delete record according to entity.
|
int |
deleteById(Class c,
Integer id)
根据id删除记录.Delete record by id.
|
int |
deleteById(Class c,
Long id)
根据id删除记录.Delete record by id.
|
int |
deleteById(Class c,
String ids)
根据id删除记录.Delete record by id.
|
<T> int |
insert(T[] entity)
批量插入数据.Insert records by batch type.
|
<T> int |
insert(T[] entity,
int batchSize)
批量插入数据.Insert records by batch type.
|
<T> int |
insert(T[] entity,
int batchSize,
String excludeFields)
批量插入数据,且可以指定不用插入的字段列表
Insert record by batch type,and can point out which field(s) don't need to insert. |
<T> int |
insert(T[] entity,
String excludeFields)
批量插入数据,且可以声明不用插入的字段列表
Insert record by batch type,and can point out which field(s) don't need to insert. |
<T> int |
insert(T entity,
IncludeType includeType)
根据实体对象entity插入数据.Insert record according to entity.
|
<T> List<T> |
select(T entity,
IncludeType includeType)
根据实体对象entity查询数据.Select record according to entity.
|
<T> List<T> |
select(T entity,
IncludeType includeType,
Condition condition)
已过时。
Suid.select(Object,Condition)方法中,可以通过condition设置includeType. |
<T> List<T> |
select(T entity,
int size)
根据实体对象entity查询数据,且可以分页
Select record(s) according to entity object,and can specify page information. |
<T> List<T> |
select(T entity,
int start,
int size)
根据实体对象entity查询数据,且可以分页
Select record(s) according to entity object,and can specify page information. |
<T> List<T> |
select(T entity,
String selectFields)
查询实体时,只查询部分一部分字段.Just select some fields.
|
<T> List<T> |
select(T entity,
String selectFields,
int start,
int size)
查询实体时,只查询部分一部分字段,且可以分页
Just select some fields,and can specify page information. |
<T> List<T> |
selectById(T entity,
Integer id)
根据id查询记录.Select record by id.
|
<T> List<T> |
selectById(T entity,
Long id)
根据id查询记录.Select record by id.
|
<T> List<T> |
selectById(T entity,
String ids)
根据id查询记录.Select record by id.
|
<T> String |
selectJson(T entity)
根据实体对象entity查询数据,并返回Json格式结果
Select and return data in Json format according to entity object. |
<T> String |
selectJson(T entity,
IncludeType includeType)
根据实体对象entity查询并返回Json格式的数据
Select and return data in Json format according to entity object. |
<T> String |
selectJson(T entity,
IncludeType includeType,
Condition condition)
根据实体对象entity查询数据,并以Json格式返回
Select and return data in Json format according to entity object. |
<T> T |
selectOne(T entity)
查询一个实体.Select one record.
|
<T> List<T> |
selectOrderBy(T entity,
String orderFields)
查询应用排序的结果,排序的字段默认按升序排列
Select result with order,order type default is:asc
|
<T> List<T> |
selectOrderBy(T entity,
String orderFields,
OrderType[] orderTypes)
查询应用排序的结果
Select result with order.
|
<T> List<String[]> |
selectString(T entity)
查询实体,每个字段都是以字符串类型返回
Select entity,every field will return the string type. |
<T> List<String[]> |
selectString(T entity,
String selectFields)
查询部分字段,每个字段都是以字符串类型返回
Select some field, every field will return the string type. |
<T> String |
selectWithFun(T entity,
FunctionType functionType,
String fieldForFun)
使用函数查询结果.Select result with function.
|
<T> int |
update(T entity,
Condition condition)
当SQL update的set表达式通过Condition定义时,可以不用再指定set使用的字段.
|
<T> int |
update(T entity,
IncludeType includeType)
根据实体对象entity更新数据.Update record according to entity.
|
<T> int |
update(T entity,
String updateFields)
更新记录,且可以指定需要更新的字段.Update record, can list update fields.
|
<T> int |
update(T entity,
String updateFields,
Condition condition)
更新记录,且可以指定需要更新的字段,高级条件可通过Condition参数设置.Update record, can list update fields.
|
<T> int |
update(T entity,
String updateFields,
IncludeType includeType)
根据实体对象entity更新数据,可以指定需要更新的字段.Update record according to entity.
|
<T> int |
updateBy(T entity,
String whereFields)
更新记录,且可以指定作为条件的字段.Update record according to whereFields.
|
<T> int |
updateBy(T entity,
String whereFields,
Condition condition)
更新记录,且可以指定作为条件的字段.Update record according to whereFields.
|
<T> int |
updateBy(T entity,
String whereFields,
IncludeType includeType)
更新记录,且可以指定作为条件的字段和指定字段的过滤类型.Update record according to whereFields.
|
<T> List<T> select(T entity, int size)
entity - 实体类对象,且不能为空. table's entity(do not allow null).
entity中非null且非空字符串作为过虑条件,操作符是等号.eg:field=value.size - 结果集大小 大于等于1. fetch result size (>0).<T> List<T> select(T entity, int start, int size)
entity - 实体类对象,且不能为空. table's entity(do not allow null).
entity中非null且非空字符串作为过虑条件,操作符是等号.eg:field=value.start - 开始下标(从0或1开始,eg:MySQL是0,Oracle是1).
size - 结果集大小 大于等于1. fetch result size (>0).<T> List<T> select(T entity, String selectFields)
entity - 实体类对象,且不能为空selectFields - 需要查询的字段,多个用逗号隔开. select fields,if more than one,separate with comma.<T> List<T> select(T entity, String selectFields, int start, int size)
entity - 实体类对象,且不能为空selectFields - 需要查询的字段,多个用逗号隔开. select fields,if more than one,separate with comma.start - 开始下标(从0或1开始,eg:MySQL是0,Oracle是1).
size - 结果集大小 大于等于1. fetch result size (>0).<T> List<String[]> selectString(T entity)
entity - 实体类对象,且不能为空<T> List<String[]> selectString(T entity, String selectFields)
entity - 实体类对象,且不能为空selectFields - 需要查询的字段,多个用逗号隔开. Select fields,if more than one,separate with comma.<T> String selectJson(T entity)
entity - 与表对应的实体对象,且不能为空
entity中非null与非空字符串作为过虑条件,操作符是等号.eg:field=value<T> T selectOne(T entity)
entity - 实体类对象<T> String selectWithFun(T entity, FunctionType functionType, String fieldForFun)
entity - 传入的实体对象,且不能为空fieldForFun - 需要使用函数的字段functionType - MAX,MIN,SUM,AVG,COUNT<T> List<T> selectOrderBy(T entity, String orderFields)
entity - 传入的实体对象,且不能为空orderFields - 排序字段列表,多个用逗号隔开<T> List<T> selectOrderBy(T entity, String orderFields, OrderType[] orderTypes)
entity - 传入的实体对象,且不能为空orderFields - 排序字段列表,多个用逗号隔开orderTypes - 排序类型列表<T> int update(T entity,
String updateFields)
entity - 实体类对象,不能为空updateFields - 需要更新的字段列表,多个字段用逗号隔开(列表中有的字段都会更新),该属性不允许为空,
<T> int update(T entity,
String updateFields,
IncludeType includeType)
entity - 与表对应的实体对象,且不能为空
id为null不作为过滤条件updateFields - 需要更新的字段列表,多个字段用逗号隔开(列表中有的字段都会更新),该属性不允许为空,且不受includeType参数的影响,默认每个字段会被转化成SQL update的set表达式includeType - 空字符串与null是否包含设置(是否作为过滤条件)<T> int insert(T[] entity)
entity - 与表对应的实体对象,且不能为空. table's entity(do not allow null).<T> int insert(T[] entity,
int batchSize)
entity - 与表对应的实体对象,且不能为空. table's entity(do not allow null).batchSize - <T> int insert(T[] entity,
String excludeFields)
entity - 与表对应的实体对象,且不能为空. table's entity(do not allow null).excludeFields - 声明不用插入的字段列表.fields list that don't need to insert .<T> int insert(T[] entity,
int batchSize,
String excludeFields)
entity - 与表对应的实体对象,且不能为空. table's entity(do not allow null).batchSize - 批操作数量大小.batch size.excludeFields - 声明不用插入的字段列表.Don't insert fields list.<T> List<T> select(T entity, IncludeType includeType)
entity - 实体类对象,且不能为空. table's entity(do not allow null).
entity中非null且非空字符串作为过虑条件,操作符是等号.eg:field=value.includeType - 空字符串与null是否包含设置<T> int update(T entity,
IncludeType includeType)
entity - 与表对应的实体对象,且不能为空;entity中id字段不能为空,作为过虑条件
id为null不作为过滤条件includeType - 空字符串与null是否包含设置<T> int insert(T entity,
IncludeType includeType)
entity - 与表对应的实体对象,且不能为空includeType - 空字符串与null是否包含设置<T> int delete(T entity,
IncludeType includeType)
entity - 与表对应的实体对象,且不能为空
id为null不作为过滤条件includeType - 空字符串与null是否包含设置<T> String selectJson(T entity, IncludeType includeType)
entity - 与表对应的实体对象,且不能为空
id为null不作为过滤条件includeType - 空字符串与null是否包含设置<T> List<T> selectById(T entity, Integer id)
entity - 实体类对象,且不能为空id - 实体id字段的值.value of entity's id field.<T> List<T> selectById(T entity, Long id)
entity - 实体类对象,且不能为空id - 实体id字段的值.value of entity's id field.<T> List<T> selectById(T entity, String ids)
entity - 实体类对象,且不能为空ids - 实体id字段的值,多个用逗号隔开.values of entity's id field.int deleteById(Class c, Integer id)
c - 实体类类型,且不能为空id - 实体id字段的值. value of entity's id field.int deleteById(Class c, Long id)
c - 实体类类型,且不能为空id - 实体id字段的值. value of entity's id field.int deleteById(Class c, String ids)
c - 实体类类型,且不能为空ids - 实体id字段的值,多个用逗号隔开.ids values of entity's id field.@Deprecated <T> List<T> select(T entity, IncludeType includeType, Condition condition)
Suid.select(Object,Condition)方法中,可以通过condition设置includeType.entity - 与表对应的实体对象,且不能为空
id为null时不作为过滤条件includeType - 空字符串与null是否包含设置condition - entity默认有值的字段会转成field=value的形式,其它形式可通过condition指定.condition使用过的字段,默认情况不会再处理.<T> String selectJson(T entity, IncludeType includeType, Condition condition)
entity - 与表对应的实体对象,且不能为空
id为null不作为过滤条件includeType - 空字符串与null是否包含设置condition - entity默认有值的字段会转成field=value的形式,其它形式可通过condition指定.condition使用过的字段,默认情况不会再处理.<T> int updateBy(T entity,
String whereFields)
entity - 实体类对象,不能为空
没指定为whereFields的字段,作为set部分,默认只处理非空,非null的字段whereFields - 作为SQL中where条件的字段列表,多个字段用逗号隔开(列表中有的字段都会作为条件);
指定作为条件的,都转换.id为null不作为过滤条件<T> int updateBy(T entity,
String whereFields,
IncludeType includeType)
entity - 与表对应的实体对象,且不能为空
没指定为whereFields的字段,作为set部分.whereFields - 作为SQL中where条件的字段列表,多个字段用逗号隔开(列表中有的字段都会作为条件);
指定作为条件的,都转换.id为null不作为过滤条件includeType - 空字符串与null是否包含设置(是否作为过滤条件)<T> int updateBy(T entity,
String whereFields,
Condition condition)
entity - 实体类对象,不能为空
没指定为whereFields的字段,作为set部分(默认只处理非空,非null的字段)whereFields - 作为SQL中where条件的字段列表,多个字段用逗号隔开(列表中有的字段都会作为条件);
指定作为条件的,都转换.id为null不作为过滤条件condition - 用来设置默认情况不能表达的条件.
若condition没有设置IncludeType,默认过滤NULL和空字符串(但condition中op,between,notBetween方法设置的字段,不受includeType的值影响.)<T> int update(T entity,
String updateFields,
Condition condition)
entity - 实体类对象,不能为空
entity默认有值的字段会转成field=value的形式,其它形式可通过condition指定.condition中op,between等方法设置的转换到where中的字段,默认情况不会再处理.updateFields - 需要更新的字段列表,多个字段用逗号隔开(列表中有的字段都会更新),该属性不允许为空,
condition - 若condition没有设置IncludeType,默认过滤NULL和空字符串(但condition中op,between,notBetween方法设置的字段,不受includeType的值影响.)<T> int update(T entity,
Condition condition)
entity - 实体类对象,不能为空
entity默认有值的字段会转成field=value的形式,其它形式可通过condition指定.condition中op,between等方法设置的转换到where中的字段,默认情况不会再处理.condition - 若condition没有设置IncludeType,默认过滤NULL和空字符串(但condition中op,between,notBetween方法设置的字段,不受includeType的值影响.)Copyright © 2020. All rights reserved.