| Package | Description |
|---|---|
| org.teasoft.bee.osql |
Function about Object SQL.
|
| org.teasoft.bee.osql.service |
Interface and class about service layer.
|
| Modifier and Type | Method and Description |
|---|---|
Condition |
Condition.and()
Default will automatically add 'and'.
|
Condition |
Condition.between(String field,
Number low,
Number high)
transform to: field between low and high;
|
Condition |
Condition.between(String field,
String low,
String high)
field between 'low' and 'high';
|
Condition |
Condition.forUpdate()
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.opOn(String field,
Op op,
Object value)
The expression will correspond to: table1 JoinType table2 on field Op value
eg: opOn("table2.valid",Op.eq,"1") table1 left join table2 on table1.id=table2.id and table2.valid='1' it is different from where part: table1 left join table2 on table1.id=table2.id where valid='1' |
Condition |
Condition.opWithField(String field1,
Op op,
String field2)
Add a expression condition.
|
Condition |
Condition.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)
set fieldName for distinct(fieldName)
eg: selectDistinctField(fieldName) --> distinct(fieldName) |
Condition |
Condition.selectDistinctField(String fieldName,
String alias)
set fieldName for distinct(fieldName)
eg: selectDistinctField(fieldName,alias) --> distinct(fieldName) as alias
|
Condition |
Condition.selectField(String... fieldList)
Specify the partial fields to be queried (only for select of SQL).
|
Condition |
Condition.selectFun(FunctionType functionType,
String fieldForFun)
set for select result with function.
|
Condition |
Condition.selectFun(FunctionType functionType,
String fieldForFun,
String alias)
set for select result with function.
|
Condition |
Condition.set(String fieldName,
Number num)
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)
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)
Set the fields to be updated (for only update of SQL),and the field change on itself.
|
Condition |
Condition.setAdd(String field,
String otherFieldName)
Set the fields to be updated (for only update of SQL),and the field change on itself.
|
Condition |
Condition.setIncludeType(IncludeType includeType)
Set the IncludeType filter parameter.
|
Condition |
Condition.setMultiply(String field,
Number num)
Set the fields to be updated (for only update of SQL),and the field change on itself.
|
Condition |
Condition.setMultiply(String field,
String otherFieldName)
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)
For setting the size of the page(only for select of SQL).
|
Condition |
Condition.start(Integer start)
For setting the start of the page(only for select of SQL).
|
| Modifier and Type | Method and Description |
|---|---|
<T> int |
SuidRich.count(T entity,
Condition condition)
total number of statistical records.
|
<T> int |
Suid.delete(T entity,
Condition condition)
Delete the records according to entity and condition.
|
<T> List<T> |
Suid.select(T entity,
Condition condition)
Select the records according to entity and condition.
|
<T> List<T> |
MoreTable.select(T entity,
Condition condition)
Select the records according to entity and condition.
|
<T> List<T> |
SuidRich.select(T entity,
IncludeType includeType,
Condition condition)
Deprecated.
Suid.select(Object,Condition) can set includeType via condition. |
<T> String |
SuidRich.selectJson(T entity,
Condition condition)
Select and return data in Json format according to entity object.
|
<T> String |
SuidRich.selectJson(T entity,
IncludeType includeType,
Condition condition)
Deprecated.
SuidRich.selectJson(Object,Condition) can set includeType via condition. |
<T> List<String[]> |
SuidRich.selectString(T entity,
Condition condition)
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)
Select result with one function,just select one function at a time.
|
<T> String |
ObjToSQL.toDeleteSQL(T entity,
Condition condition)
Convert to delete SQL statement according to entity and condition
|
<T> String |
ObjToSQLRich.toSelectFunSQL(T entity,
FunctionType functionType,
String fieldForFun,
Condition condition) |
<T> String |
ObjToSQL.toSelectSQL(T entity,
Condition condition)
Convert to select SQL statement according to entity and condition.
|
<T> String |
MoreObjToSQL.toSelectSQL(T entity,
Condition condition)
Convert to SQL statement according to entity and condition.
|
<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)
Update record,and can help with Condition.
|
<T> int |
SuidRich.update(T entity,
String updateFields,
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)
it is equivalent to updateBy(entity,"id",condition)
|
| Modifier and Type | Method and Description |
|---|---|
<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 © 2022. All rights reserved.