public interface SuidRich extends Suid
| 限定符和类型 | 方法和说明 |
|---|---|
<T> int |
count(T entity)
统计记录总数.total number of statistical records.
|
<T> int |
count(T entity,
Condition condition)
统计记录总数.total number of statistical records.
|
<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> boolean |
exist(T entity)
检测实体对应记录是否存在.Check whether the entity corresponding record exist
|
<T> int |
insert(List<T> entityList)
批量插入数据.Insert records by batch type.
|
<T> int |
insert(List<T> entityList,
int batchSize)
批量插入数据.Insert records by batch type.
|
<T> int |
insert(List<T> entityList,
int batchSize,
String excludeFields)
批量插入数据,且可以指定不用插入的字段列表
Insert record by batch type,and can point out which field(s) don't need to insert. |
<T> int |
insert(List<T> entityList,
String excludeFields)
批量插入数据,且可以声明不用插入的字段列表
Insert record by batch type,and can point out which field(s) don't need to insert. |
<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.can set includeType via condition. |
<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> T |
selectById(T entity,
Integer id)
根据id查询记录.Select record by id.
|
<T> T |
selectById(T entity,
Long id)
根据id查询记录.Select record by id.
|
<T> T |
selectById(T entity,
String id)
根据id查询记录.Select record by id.
|
<T> List<T> |
selectByIds(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,
Condition condition)
根据实体对象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)
已过时。
selectJson(Object,Condition)方法中,可以通过condition设置includeType.can set includeType via condition. |
<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,
Condition condition)
不以具体实体结构返回数据,而是用字符数组的List
Instead of returning data in a entity structure, it uses a character array in List. |
<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 one function,Just select one function.
|
<T> String |
selectWithFun(T entity,
FunctionType functionType,
String fieldForFun,
Condition condition)
使用函数查询一个统计结果,通过Condition可添加复杂过滤条件(一次只查询一个统计结果)
Select result with one function,just select one function at a time.
|
SuidRich |
setDynamicParameter(String para,
String value)
为动态表名、实体名参数设置值.set dynamic parameter for dynamic table & entity name
本方法的调用要早于select,update,insert,delete等方法. |
<T> int |
update(T entity,
Condition condition)
更新记录,高级条件可通过Condition参数设置 Update record,and can help with Condition.
|
<T> int |
update(T entity,
IncludeType includeType)
根据实体对象entity中id更新该实体对象的数据.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> int |
updateById(T entity,
Condition condition)
此方法,相当于调用SuidRich接口的 updateBy(entity,"id",condition); it is equivalent to updateBy(entity,"id",condition)
|
beginSameConnection, delete, delete, endSameConnection, insert, insertAndReturnId, select, select, update<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 - 实体类对象,且不能为空.table's entity(do not allow null).selectFields - 需要查询的字段,多个用逗号隔开. select fields,if more than one,separate with comma.<T> List<T> select(T entity, String selectFields, int start, int size)
entity - 实体类对象,且不能为空.table's entity(do not allow null).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 - 实体类对象,且不能为空.table's entity(do not allow null).<T> List<String[]> selectString(T entity, String selectFields)
entity - 实体类对象,且不能为空.table's entity(do not allow null).selectFields - 需要查询的字段,多个用逗号隔开. Select fields,if more than one,separate with comma.<T> List<String[]> selectString(T entity, Condition condition)
entity - 实体类对象,且不能为空.table's entity(do not allow null).condition - condition.若condition没有设置IncludeType,默认过滤NULL和空字符串(但condition中op,between,notBetween方法设置的字段,不受includeType的值影响.)<T> String selectJson(T entity)
entity - 与表对应的实体对象,且不能为空.table's entity(do not allow null).
entity中非null与非空字符串作为过虑条件,操作符是等号.eg:field=value<T> T selectOne(T entity)
entity - 实体类对象<T> String selectWithFun(T entity, FunctionType functionType, String fieldForFun)
entity - 传入的实体对象,且不能为空.table's entity(do not allow null).functionType - MAX,MIN,SUM,AVG,COUNTfieldForFun - 需要使用函数的字段.field for function.<T> String selectWithFun(T entity, FunctionType functionType, String fieldForFun, Condition condition)
entity - 传入的实体对象,且不能为空.table's entity(do not allow null).functionType - MAX,MIN,SUM,AVG,COUNTfieldForFun - 需要使用函数的字段.field for function.condition - condition.若condition没有设置IncludeType,默认过滤NULL和空字符串(但condition中op,between,notBetween方法设置的字段,不受includeType的值影响.)
<T> int count(T entity)
entity - 实体类对象,且不能为空. table's entity(do not allow null).<T> int count(T entity,
Condition condition)
entity - 实体类对象,且不能为空. table's entity(do not allow null).condition - condition用于设置过滤条件.condition as filter the record.<T> List<T> selectOrderBy(T entity, String orderFields)
entity - 传入的实体对象,且不能为空.table's entity(do not allow null).orderFields - 排序字段列表,多个用逗号隔开<T> List<T> selectOrderBy(T entity, String orderFields, OrderType[] orderTypes)
entity - 传入的实体对象,且不能为空.table's entity(do not allow null).orderFields - 排序字段列表,多个用逗号隔开.order fields,if more than one,separate with comma.orderTypes - 排序类型列表<T> int update(T entity,
String updateFields)
entity - 实体类对象,不能为空.table's entity(do not allow null).updateFields - 需要更新的字段列表,多个字段用逗号隔开(列表中有的字段都会更新),该属性不允许为空,
<T> int update(T entity,
String updateFields,
IncludeType includeType)
entity - 与表对应的实体对象,且不能为空.table's entity(do not allow null).
id为null不作为过滤条件updateFields - 需要更新的字段列表,多个字段用逗号隔开(列表中有的字段都会更新),该属性不允许为空,且不受includeType参数的影响,默认每个字段会被转化成SQL update的set表达式
includeType - 空字符串与null是否作为过滤条件.whether null string and null as a filter conditions.<T> int insert(T[] entity)
entity - 与表对应的实体对象数组,且不能为空. table's entity array(do not allow null).<T> int insert(T[] entity,
int batchSize)
entity - 与表对应的实体对象,且不能为空. table's entity array(do not allow null).batchSize - 批操作数量大小.batch size.<T> int insert(T[] entity,
String excludeFields)
entity - 与表对应的实体对象数组,且不能为空. table's entity array(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 array(do not allow null).batchSize - 批操作数量大小.batch size.excludeFields - 声明不用插入的字段列表.Don't insert fields list.<T> int insert(List<T> entityList)
entityList - 与表对应的实体对象链表,且不能为空. table's entity list(do not allow null).<T> int insert(List<T> entityList, int batchSize)
entityList - 与表对应的实体对象链表,且不能为空. table's entity list(do not allow null).batchSize - 批操作数量大小.batch size.<T> int insert(List<T> entityList, String excludeFields)
entityList - 与表对应的实体对象链表,且不能为空. table's entity list(do not allow null).excludeFields - 声明不用插入的字段列表.fields list that don't need to insert .<T> int insert(List<T> entityList, int batchSize, String excludeFields)
entityList - 与表对应的实体对象链表,且不能为空. table's entity list(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将引发ObjSQLException.
includeType - 空字符串与null是否包含设置<T> int insert(T entity,
IncludeType includeType)
entity - 与表对应的实体对象,且不能为空.table's entity(do not allow null).includeType - 空字符串与null是否包含设置<T> int delete(T entity,
IncludeType includeType)
entity - 与表对应的实体对象,且不能为空,id为null不作为过滤条件.table's entity(do not allow null).includeType - 空字符串与null是否包含设置<T> String selectJson(T entity, IncludeType includeType)
entity - 与表对应的实体对象,且不能为空,id为null不作为过滤条件.table's entity(do not allow null).includeType - 空字符串与null是否包含设置<T> T selectById(T entity,
Integer id)
entity - 实体类对象,且不能为空.table's entity(do not allow null).id - 实体id字段的值.value of entity's id field.<T> T selectById(T entity,
Long id)
entity - 实体类对象,且不能为空.table's entity(do not allow null).id - 实体id字段的值.value of entity's id field.<T> T selectById(T entity,
String id)
entity - 实体类对象,且不能为空.table's entity(do not allow null).id - 实体id字段的值.value of entity's id field.<T> List<T> selectByIds(T entity, String ids)
entity - 实体类对象,且不能为空.table's entity(do not allow null).ids - 实体id字段的值,多个用逗号隔开.values of entity's id field,if more than one,separate with comma.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,if more than one,separate with comma.@Deprecated <T> List<T> select(T entity, IncludeType includeType, Condition condition)
Suid.select(Object,Condition)方法中,可以通过condition设置includeType.can set includeType via condition.entity - 与表对应的实体对象,且不能为空,id为null不作为过滤条件.table's entity(do not allow null).includeType - 空字符串与null是否包含设置condition - entity默认有值的字段会转成field=value的形式,其它形式可通过condition指定.@Deprecated <T> String selectJson(T entity, IncludeType includeType, Condition condition)
selectJson(Object,Condition)方法中,可以通过condition设置includeType.can set includeType via condition.entity - 与表对应的实体对象,且不能为空,id为null不作为过滤条件.table's entity(do not allow null).includeType - 空字符串与null是否包含设置condition - entity默认有值的字段会转成field=value的形式,其它形式可通过condition指定.<T> String selectJson(T entity, Condition condition)
entity - 与表对应的实体对象,且不能为空, id为null不作为过滤条件.table's entity(do not allow null).condition - entity默认有值的字段会转成field=value的形式,其它形式可通过condition指定.<T> int updateBy(T entity,
String whereFields)
entity - 实体类对象,不能为空.table's entity(do not allow null).
没指定为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是否作为过滤条件.whether null string and null as a filter conditions.<T> int updateBy(T entity,
String whereFields,
Condition condition)
entity - 实体类对象,不能为空.table's entity(do not allow null).
没指定为whereFields的字段,作为set部分(默认只处理非空,非null的字段)whereFields - 作为SQL中where条件的字段列表,多个字段用逗号隔开(列表中有的字段都会作为条件);
指定作为条件的,都转换.id为null不作为过滤条件.
condition - 用来设置默认情况不能表达的条件.
若condition没有设置IncludeType,默认过滤NULL和空字符串(但condition中op,between,notBetween方法设置的字段,不受includeType的值影响.)<T> int updateById(T entity,
Condition condition)
entity - 实体类对象,不能为空.table's entity(do not allow null).
entity中除了id字段,作为set部分(默认只处理非空,非null的字段)condition - 用来设置默认情况不能表达的条件.
若condition没有设置IncludeType,默认过滤NULL和空字符串(但condition中op,between,notBetween方法设置的字段,不受includeType的值影响.)
<T> int update(T entity,
String updateFields,
Condition condition)
entity - 实体类对象,不能为空.table's entity(do not allow null).
entity默认有值的字段会转成field=value的形式,其它形式可通过condition指定.updateFields - 需要更新的字段列表,多个字段用逗号隔开(列表中有的字段都会更新),该属性不允许为空,
condition - 若condition没有设置IncludeType,默认过滤NULL和空字符串(但condition中op,between,notBetween方法设置的字段,不受includeType的值影响.)<T> int update(T entity,
Condition condition)
entity - 实体类对象,不能为空.table's entity(do not allow null).
entity默认有值的字段会转成field=value的形式,其它形式可通过condition指定.condition - 若condition没有设置IncludeType,默认过滤NULL和空字符串(但condition中op,between,notBetween方法设置的字段,不受includeType的值影响.)SuidRich setDynamicParameter(String para, String value)
setDynamicParameter 在接口中 Suidpara - parameter namevalue - parameter value<T> boolean exist(T entity)
entity - 实体类对象,不能为空.table's entity(do not allow null).Copyright © 2021. All rights reserved.