public interface SuidRich extends Suid
| 限定符和类型 | 方法和说明 |
|---|---|
<T> int |
delete(T entity,
IncludeType includeType)
根据实体对象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.
|
<T> int[] |
insert(T[] entity,
int batchSize) |
<T> int[] |
insert(T[] entity,
int batchSize,
String excludeFieldList)
批量插入数据,可以指定不插入的字段.
|
<T> int[] |
insert(T[] entity,
String excludeFieldList) |
<T> int |
insert(T entity,
IncludeType includeType)
根据实体对象entity插入数据
|
<T> List<T> |
select(T entity,
IncludeType includeType)
根据实体对象entity查询数据.
|
<T> List<T> |
select(T entity,
IncludeType includeType,
Condition condition)
已过时。
Suid的 select(T entity,Condition condition)方法中,可以通过condition设置includeType.
|
<T> List<T> |
select(T entity,
int size)
根据实体对象entity查询数据
According to entity object select records from database.
|
<T> List<T> |
select(T entity,
int start,
int size)
根据实体对象entity查询数据
According to entity object select records from database.
|
<T> List<T> |
select(T entity,
String selectFields) |
<T> List<T> |
select(T entity,
String selectFields,
int start,
int size) |
<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格式结果.
|
<T> String |
selectJson(T entity,
IncludeType includeType)
根据实体对象entity查询数据
|
<T> String |
selectJson(T entity,
IncludeType includeType,
Condition condition)
根据实体对象entity查询数据,并以Json格式返回
|
<T> T |
selectOne(T entity)
查询一个实体.
|
<T> List<T> |
selectOrderBy(T entity,
String orderFieldList)
应用排序查询结果,排序的字段默认按升序排列.
|
<T> List<T> |
selectOrderBy(T entity,
String orderFieldList,
OrderType[] orderTypes)
应用排序查询结果.
|
<T> List<String[]> |
selectString(T entity)
查询实体,每个字段都是以字符串类型返回.
|
<T> List<String[]> |
selectString(T entity,
String selectFields)
查询部分字段,每个字段都是以字符串类型返回.
|
<T> String |
selectWithFun(T entity,
FunctionType functionType,
String fieldForFun)
使用函数查询结果.select result with function.
|
<T> int |
update(T entity,
IncludeType includeType)
根据实体对象entity更新数据
|
<T> int |
update(T entity,
String updateFieldList)
更新记录,且可以指定需要更新的字段.
|
<T> int |
update(T entity,
String updateFieldList,
IncludeType includeType)
根据实体对象entity更新数据,可以指定需要更新的字段.
|
<T> int |
updateBy(T entity,
String whereFieldList)
更新记录,且可以指定作为条件的字段.
|
<T> int |
updateBy(T entity,
String whereFieldList,
IncludeType includeType)
更新记录,且可以指定作为条件的字段和指定字段的过滤类型
update record according to whereFieldList.
|
<T> List<T> select(T entity, int size)
entity - 实体类对象,且不能为空. table's entity(do not allow null).
entity中非null且非空字符串作为过虑条件,操作符是等号.eg:field=value
entity corresponding to table and can not be null.
If the field value is not null and not empty string as filter condition,
the operator is equal sign.eg:field=valuesize - 结果集大小 大于等于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
entity corresponding to table and can not be null.
If the field value is not null and not empty string as filter condition,
the operator is equal sign.eg:field=valuestart - 开始下标(从0或1开始,eg:MySQL是0,Oracle是1). start index,min value is 0 or 1(eg:MySQL is 0,Oracle is 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). start index,min value is 0 or 1(eg:MySQL is 0,Oracle is 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 orderFieldList)
entity - 传入的实体对象,且不能为空orderFieldList - 排序字段列表,多个用逗号隔开<T> List<T> selectOrderBy(T entity, String orderFieldList, OrderType[] orderTypes)
entity - 传入的实体对象,且不能为空orderFieldList - 排序字段列表,多个用逗号隔开orderTypes - 排序类型列表<T> int update(T entity,
String updateFieldList)
entity - 实体类对象,不能为空updateFieldList - 需要更新的字段列表,多个字段用逗号隔开(列表中有的字段都会更新);其它非空,非null的字段作为过滤条件<T> int update(T entity,
String updateFieldList,
IncludeType includeType)
entity - 与表对应的实体对象,且不能为空
id为null不作为过滤条件updateFieldList - 需要更新的字段列表,多个字段用逗号隔开(列表中有的字段都会更新)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 excludeFieldList)
entity - 与表对应的实体对象,且不能为空. table's entity(do not allow null).excludeFieldList - <T> int[] insert(T[] entity,
int batchSize,
String excludeFieldList)
entity - 与表对应的实体对象,且不能为空. table's entity(do not allow null).batchSize - 批操作数量大小.batch size.excludeFieldList - 不插入的字段列表.don't insert fields list.<T> List<T> select(T entity, IncludeType includeType)
entity - 与表对应的实体对象,且不能为空
id为时null不作为过滤条件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 - 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)
entity - 与表对应的实体对象,且不能为空
id为时null不作为过滤条件includeType - 空字符串与null是否包含设置condition - 默认有值的字段会转成field=value的形式,其它形式可通过condition指定.condition使用过的字段,默认情况不会再处理.
if the field is not null or empty, it will be translate to field=value.Other can define with condition.<T> String selectJson(T entity, IncludeType includeType, Condition condition)
entity - 与表对应的实体对象,且不能为空
id为null不作为过滤条件includeType - 空字符串与null是否包含设置condition - 默认有值的字段会转成field=value的形式,其它形式可通过condition指定.condition使用过的字段,默认情况不会再处理.
if the field is not null or empty, it will be translate to field=value.Other can define with condition.
若condition没有设置IncludeType,默认过滤NULL和空字符串(但condition中op,between,notBetween方法设置的字段,不受includeType的值影响.)<T> int updateBy(T entity,
String whereFieldList)
entity - 实体类对象,不能为空
没指定为whereFieldList的字段,作为set部分,默认只处理非空,非null的字段whereFieldList - 作为条件的字段列表,多个字段用逗号隔开(列表中有的字段都会作为条件);
指定作为条件的,都转换.id为null不作为过滤条件<T> int updateBy(T entity,
String whereFieldList,
IncludeType includeType)
entity - 与表对应的实体对象,且不能为空
没指定为whereFieldList的字段,作为set部分.whereFieldList - 作为条件的字段列表,多个字段用逗号隔开(列表中有的字段都会作为条件);
指定作为条件的,都转换.id为null不作为过滤条件includeType - 空字符串与null是否包含设置(是否作为过滤条件)Copyright © 2020. All rights reserved.