public interface SuidRich extends Suid
| Modifier and Type | Method and Description |
|---|---|
<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)
Delete record according to entity.
|
int |
deleteById(Class c,
Integer id)
Delete record by id.
|
int |
deleteById(Class c,
Long id)
Delete record by id.
|
int |
deleteById(Class c,
String ids)
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)
Insert record according to entity.
|
<T> long |
insertAndReturnId(T entity,
IncludeType includeType)
According to entity object insert record and return id value.
|
<T> int |
save(T entity)
save one entity(one record).
|
<T> List<T> |
select(T entity,
IncludeType includeType)
Select record according to entity.
|
<T> List<T> |
select(T entity,
IncludeType includeType,
Condition condition)
Deprecated.
Suid.select(Object,Condition) can set includeType via condition. |
<T> List<T> |
select(T entity,
int size)
Select record(s) according to entity object,and can specify page information.
|
<T> List<T> |
select(T entity,
int start,
int size)
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 returnType,
Integer id)
Select record by id.
|
<T> T |
selectById(T returnType,
Long id)
Select record by id.
|
<T> T |
selectById(T returnType,
String id)
Select record by id.
|
<T> List<T> |
selectByIds(T returnType,
String ids)
Select record by id.
|
<T> String |
selectJson(T entity)
Select and return data in Json format according to entity object.
|
<T> String |
selectJson(T entity,
Condition condition)
Select and return data in Json format according to entity object.
|
<T> String |
selectJson(T entity,
IncludeType includeType)
Select and return data in Json format according to entity object.
|
<T> String |
selectJson(T entity,
IncludeType includeType,
Condition condition)
Deprecated.
selectJson(Object,Condition) can set includeType via condition. |
<T> String |
selectJson(T entity,
String selectFields)
Just select some fields,and return Json string.
|
<T> String |
selectJson(T entity,
String selectFields,
int start,
int size)
Just select some fields,and can specify page information.
|
<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)
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)
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
This method is called earlier than the select, update, insert, delete methods. |
<T> int |
update(T entity,
Condition condition)
Update record,and can help with Condition.
|
<T> int |
update(T entity,
IncludeType includeType)
Update record according to entity by primary key.
|
<T> int |
update(T entity,
String updateFields)
Update record, can list update fields.
|
<T> int |
update(T entity,
String updateFields,
Condition condition)
Update record, can list update fields.
|
<T> int |
update(T entity,
String updateFields,
IncludeType includeType)
Update record according to entity.
|
<T> int |
update(T oldEntity,
T newEntity)
Update the 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)
it is equivalent to updateBy(entity,"id",condition)
|
beginSameConnection, delete, delete, endSameConnection, insert, insertAndReturnId, select, select, updategetDataSourceName, getInterceptorChain, setDataSourceName, setNameTranslate<T> List<T> select(T entity, int size)
entity - table's entity(do not allow null).
size - fetch result size (>0).<T> List<T> select(T entity, int start, int size)
entity - table's entity(do not allow null).
start - start index,min value is 0 or 1(eg:MySQL is 0,Oracle is 1).size - 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 - start index,min value is 0 or 1(eg:MySQL is 0,Oracle is 1).size - 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 as filter the record.<T> String selectJson(T entity)
entity - table's entity(do not allow null).
<T> T selectOne(T entity)
entity - table's entity(do not allow null).<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 as filter the record.
<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 as filter the record.<T> List<T> selectOrderBy(T entity, String orderFields)
entity - table's entity(do not allow null).orderFields - order fields,if more than one,separate with comma.<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 - Sort type list.<T> int update(T entity,
String updateFields)
entity - table's entity(do not allow null).updateFields - update fields.
<T> int update(T entity,
String updateFields,
IncludeType includeType)
entity - table's entity(do not allow null).if id's value is null can not as filter condition.updateFields - update fields.
includeType - 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).
includeType - whether null string and null as a filter conditions.<T> int update(T entity,
IncludeType includeType)
entity - table's entity(do not allow null),The id field in entity cannot be empty as a filtering condition.includeType - whether null string and null as a filter conditions.<T> int insert(T entity,
IncludeType includeType)
entity - table's entity(do not allow null).includeType - whether null string and null as a filter conditions.<T> long insertAndReturnId(T entity,
IncludeType includeType)
entity - table's entity(do not allow null).
includeType - whether null string and null as a filter conditions.<T> int delete(T entity,
IncludeType includeType)
entity - table's entity(do not allow null).includeType - whether null string and null as a filter conditions.<T> String selectJson(T entity, IncludeType includeType)
entity - table's entity(do not allow null).includeType - whether null string and null as a filter conditions.<T> String selectJson(T entity, String selectFields)
entity - table's entity(do not allow null).selectFields - select fields,if more than one,separate with comma.<T> String selectJson(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 - start index,min value is 0 or 1(eg:MySQL is 0,Oracle is 1).size - fetch result size (>0).<T> T selectById(T returnType,
Integer id)
returnType - table's entity(do not allow null).id - value of entity's id field.<T> T selectById(T returnType,
Long id)
returnType - table's entity(do not allow null).
id - value of entity's id field.<T> T selectById(T returnType,
String id)
returnType - table's entity(do not allow null).
id - value of entity's id field.<T> List<T> selectByIds(T returnType, String ids)
returnType - table's entity(do not allow null).
ids - values of entity's id field,if more than one,separate with comma.int deleteById(Class c, Integer id)
c - table's entity class(do not allow null).id - value of entity's id field.int deleteById(Class c, Long id)
c - table's entity class(do not allow null).id - value of entity's id field.int deleteById(Class c, String ids)
c - table's entity class(do not allow null).ids - 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) can set includeType via condition.entity - table's entity(do not allow null).if id's value is null can not as filter condition.includeType - whether null string and null as a filter conditions.condition - Condition as filter the record.@Deprecated <T> String selectJson(T entity, IncludeType includeType, Condition condition)
selectJson(Object,Condition) can set includeType via condition.entity - table's entity(do not allow null).if id's value is null can not as filter condition.includeType - whether null string and null as a filter conditions.condition - Condition as filter the record.<T> String selectJson(T entity, Condition condition)
entity - table's entity(do not allow null).condition - Condition as filter the record.<T> int updateBy(T entity,
String whereFields)
entity - table's entity(do not allow null).
whereFields - As a field list of where part in SQL, multiple fields are separated by commas
<T> int updateBy(T entity,
String whereFields,
IncludeType includeType)
entity - table's entity(do not allow null).
whereFields - As a field list of where part in SQL, multiple fields are separated by commas
includeType - 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 - As a field list of where part in SQL, multiple fields are separated by commas
condition - Condition as filter the record.<T> int updateById(T entity,
Condition condition)
entity - table's entity(do not allow null).
condition - Condition as filter the record.
<T> int update(T entity,
String updateFields,
Condition condition)
entity - table's entity(do not allow null).
updateFields - update fields.The methods setMultiply,setAdd,set in condition are not subject to this restriction.
condition - Condition as filter the record.
<T> int update(T entity,
Condition condition)
entity - table's entity(do not allow null).
condition - Condition as filter the record.<T> int update(T oldEntity,
T newEntity)
oldEntity - Entity with old value field.newEntity - Entity with new value field.SuidRich setDynamicParameter(String para, String value)
setDynamicParameter in interface Suidpara - parameter namevalue - parameter value<T> boolean exist(T entity)
entity - table's entity(do not allow null).<T> int save(T entity)
entity - Copyright © 2022. All rights reserved.