| 程序包 | 说明 |
|---|---|
| org.teasoft.bee.osql |
面向对象SQL相关.Function about Object SQL.
|
| org.teasoft.bee.osql.service |
service层相关服务的类与接口.Interface and class about service layer.
|
| 限定符和类型 | 方法和说明 |
|---|---|
Condition |
Condition.and()
默认自动加 'and'.Default will automatically add 'and'.
|
Condition |
Condition.between(String field,
Number low,
Number high) |
Condition |
Condition.between(String field,
String low,
String high)
between
|
Condition |
Condition.forUpdate()
锁定查询的部分记录(仅用于SQL的单个表select).lock the select record with 'for update'.
|
Condition |
Condition.groupBy(String field)
group by
|
Condition |
Condition.having(FunctionType functionType,
String field,
Op Op,
Number value)
having
eg: having(FunctionType.MIN, "field", Op.ge, 60)-->having min(field)>=60
|
Condition |
Condition.lParentheses()
添加左括号.Add left parentheses.
|
Condition |
Condition.notBetween(String field,
Number low,
Number high)
not between
|
Condition |
Condition.notBetween(String field,
String low,
String high)
not between
|
Condition |
Condition.op(String field,
Op Op,
Object value)
添加一个表达式条件.Add a expression condition.
|
Condition |
Condition.opWithField(String field1,
Op Op,
String field2)
添加一个表达式条件.Add a expression condition.
|
Condition |
Condition.or()
添加 'or'.Add 'or'.
|
Condition |
Condition.orderBy(FunctionType functionType,
String field,
OrderType orderType)
order by
eg: orderBy(FunctionType.MAX, "total", OrderType.DESC)-->order by max(total) desc
|
Condition |
Condition.orderBy(String field)
order by
eg: orderBy("price")-->order by price
|
Condition |
Condition.orderBy(String field,
OrderType orderType)
order by
eg: orderBy("price", OrderType.DESC)-->order by price desc
|
Condition |
Condition.rParentheses()
添加右括号.Add right parentheses.
|
Condition |
Condition.selectDistinctField(String fieldName)
设置字段fieldName为distinct(fieldName)
eg: selectDistinctField(fieldName) --> distinct(fieldName)
|
Condition |
Condition.selectDistinctField(String fieldName,
String alias)
设置字段fieldName为distinct(fieldName)
eg: selectDistinctField(fieldName,alias) --> distinct(fieldName) as alias
|
Condition |
Condition.selectField(String fieldList)
指定需要查询的部分字段(仅用于SQL的select).Specify the partial fields to be queried (only for select of SQL).
|
Condition |
Condition.selectFun(FunctionType functionType,
String fieldForFun)
设置使用函数查询结果.set select result with function.
|
Condition |
Condition.selectFun(FunctionType functionType,
String fieldForFun,
String alias)
设置使用函数查询结果.set select result with function.
|
Condition |
Condition.set(String fieldName,
Number num)
设置需要更新的字段(仅用于SQL的update set);当要更新的字段也需要用于where条件时,可用该方法
Set the fields that need to be updated (only for update of SQL ); this method can be used when the set fields also need to be used for the where expression. |
Condition |
Condition.set(String fieldName,
String value)
设置需要更新的字段(仅用于SQL的update set);当要更新的字段也需要用于where条件时,可用该方法
Set the fields that need to be updated (only for update of SQL); this method can be used when the set fields also need to be used for the where expression. |
Condition |
Condition.setAdd(String field,
Number num)
设置需要更新的字段(仅用于SQL的update set),字段在自身基础上变化.Set the fields to be updated (for only update of SQL),and the field change on itself.
|
Condition |
Condition.setAdd(String field,
String otherFieldName)
设置需要更新的字段(仅用于SQL的update set),字段在自身基础上变化.Set the fields to be updated (for only update of SQL),and the field change on itself.
|
Condition |
Condition.setIncludeType(IncludeType includeType)
设置IncludeType过滤参数.op,between,notBetween方法设置的字段,不受includeType的值影响.Set IncludeType.
|
Condition |
Condition.setMultiply(String field,
Number num)
设置需要更新的字段(仅用于SQL的update set),字段在自身基础上变化.Set the fields to be updated (for only update of SQL),and the field change on itself.
|
Condition |
Condition.setMultiply(String field,
String otherFieldName)
设置需要更新的字段(仅用于SQL的update set),字段在自身基础上变化.Set the fields to be updated (for only update of SQL),and the field change on itself.
|
Condition |
Condition.setWithField(String field1,
String field2)
set one field with other field value
eg: setWithField(field1,field2)--> set field1=field2
|
Condition |
Condition.size(Integer size)
添加用于分页时设置每页返回的记录数量(仅用于SQL的select).For setting the size of the page(only for select of SQL).
|
Condition |
Condition.start(Integer start)
添加用于分页时设置开始的页数(仅用于SQL的select).For setting the start of the page(only for select of SQL).
|
| 限定符和类型 | 方法和说明 |
|---|---|
<T> int |
SuidRich.count(T entity,
Condition condition)
统计记录总数.total number of statistical records.
|
<T> int |
Suid.delete(T entity,
Condition condition)
根据实体对象和Condition删记录.Delete the records according to entity and condition.
|
<T> List<T> |
Suid.select(T entity,
Condition condition)
根据实体对象和Condition查询数据.Select the records according to entity and condition.
|
<T> List<T> |
MoreTable.select(T entity,
Condition condition)
根据实体对象和Condition查询数据.Select the records according to entity and condition.
|
<T> List<T> |
SuidRich.select(T entity,
IncludeType includeType,
Condition condition)
已过时。
Suid.select(Object,Condition)方法中,可以通过condition设置includeType.can set includeType via condition. |
<T> String |
SuidRich.selectJson(T entity,
Condition condition)
根据实体对象entity查询数据,并以Json格式返回
Select and return data in Json format according to entity object. |
<T> String |
SuidRich.selectJson(T entity,
IncludeType includeType,
Condition condition)
已过时。
SuidRich.selectJson(Object,Condition)方法中,可以通过condition设置includeType.can set includeType via condition. |
<T> List<String[]> |
SuidRich.selectString(T entity,
Condition condition)
不以具体实体结构返回数据,而是用字符数组的List
Instead of returning data in a entity structure, it uses a character array in List. |
<T> String |
SuidRich.selectWithFun(T entity,
FunctionType functionType,
String fieldForFun,
Condition condition)
使用函数查询一个统计结果,通过Condition可添加复杂过滤条件(一次只查询一个统计结果)
Select result with one function,just select one function at a time.
|
<T> String |
ObjToSQL.toDeleteSQL(T entity,
Condition condition)
根据entity和Condition转换成sql语句
|
<T> String |
ObjToSQLRich.toSelectFunSQL(T entity,
FunctionType functionType,
String FieldForFun,
Condition condition) |
<T> String |
ObjToSQL.toSelectSQL(T entity,
Condition condition)
根据entity和Condition转换成sql语句
|
<T> String |
MoreObjToSQL.toSelectSQL(T entity,
Condition condition)
根据entity和Condition转换成sql语句
|
<T> String |
ObjToSQLRich.toSelectSQL(T entity,
IncludeType includeType,
Condition condition) |
<T> String |
ObjToSQLRich.toUpdateBySQL(T entity,
String whereFields,
Condition condition) |
<T> String |
ObjToSQLRich.toUpdateSQL(T entity,
String updateFields,
Condition condition) |
<T> int |
SuidRich.update(T entity,
Condition condition)
更新记录,高级条件可通过Condition参数设置 Update record,and can help with Condition.
|
<T> int |
SuidRich.update(T entity,
String updateFields,
Condition condition)
更新记录,且可以指定需要更新的字段,高级条件可通过Condition参数设置.Update record, can list update fields.
|
<T> int |
SuidRich.updateBy(T entity,
String whereFields,
Condition condition)
更新记录,且可以指定作为条件的字段.Update record according to whereFields.
|
<T> int |
SuidRich.updateById(T entity,
Condition condition)
此方法,相当于调用SuidRich接口的 updateBy(entity,"id",condition); it is equivalent to updateBy(entity,"id",condition)
|
| 限定符和类型 | 方法和说明 |
|---|---|
<T> int |
ObjSQLRichAbstractServiceImpl.count(T entity,
Condition condition) |
<T> int |
ObjSQLAbstractServiceImpl.delete(T entity,
Condition condition) |
<T> List<T> |
ObjSQLAbstractServiceImpl.select(T entity,
Condition condition) |
<T> List<T> |
ObjSQLRichAbstractServiceImpl.select(T entity,
IncludeType includeType,
Condition condition) |
<T> String |
ObjSQLRichAbstractServiceImpl.selectJson(T entity,
Condition condition) |
<T> String |
ObjSQLRichAbstractServiceImpl.selectJson(T entity,
IncludeType includeType,
Condition condition) |
<T> List<String[]> |
ObjSQLRichAbstractServiceImpl.selectString(T entity,
Condition condition) |
<T> String |
ObjSQLRichAbstractServiceImpl.selectWithFun(T entity,
FunctionType functionType,
String fieldForFun,
Condition condition) |
<T> int |
ObjSQLRichAbstractServiceImpl.update(T entity,
Condition condition) |
<T> int |
ObjSQLRichAbstractServiceImpl.update(T entity,
String updateFields,
Condition condition) |
<T> int |
ObjSQLRichAbstractServiceImpl.updateBy(T entity,
String whereFields,
Condition condition) |
<T> int |
ObjSQLRichAbstractServiceImpl.updateById(T entity,
Condition condition) |
Copyright © 2021. All rights reserved.