public class QueryParamEntity
extends org.hswebframework.ezorm.core.param.QueryParam
QueryParam,
序列化表格| 构造器和说明 |
|---|
QueryParamEntity() |
| 限定符和类型 | 方法和说明 |
|---|---|
QueryParamEntity |
clone() |
Set<String> |
getExcludes() |
Set<String> |
getIncludes() |
int |
getPageIndexTmp() |
List<org.hswebframework.ezorm.core.param.Term> |
getTerms() |
int |
getThinkPageIndex() |
boolean |
isForUpdate() |
static <T> org.hswebframework.ezorm.core.dsl.Query<T,QueryParamEntity> |
newQuery() |
QueryParamEntity |
noPaging() |
static QueryParamEntity |
of()
创建一个空的查询参数实体,该实体无任何参数.
|
static QueryParamEntity |
of(String field,
Object value) |
void |
setOrderBy(String orderBy)
表达式方式排序
|
void |
setWhere(String where)
表达式查询条件,没有SQL注入问题,放心使用
|
<T> org.hswebframework.ezorm.core.dsl.Query<T,QueryParamEntity> |
toNestQuery()
将已有的条件包装到一个嵌套的条件里,并返回一个Query对象.例如:
entity.toNestQuery().and("userId",userId);
原有条件: name=?
|
<T> org.hswebframework.ezorm.core.dsl.Query<T,QueryParamEntity> |
toNestQuery(java.util.function.Consumer<org.hswebframework.ezorm.core.dsl.Query<T,QueryParamEntity>> before)
将已有的条件包装到一个嵌套的条件里,并返回一个Query对象.例如:
entity.toNestQuery(query->query.and("userId",userId));
原有条件: name=?
|
<T> org.hswebframework.ezorm.core.dsl.Query<T,QueryParamEntity> |
toQuery() |
doPaging, doPaging, getFirstPageIndex, getPageIndex, getPageSize, getSorts, isPaging, orderBy, rePaging, setFirstPageIndex, setForUpdate, setPageIndex, setPageIndexTmp, setPageSize, setPaging, setSortspublic boolean isForUpdate()
isForUpdate 在类中 org.hswebframework.ezorm.core.param.QueryParampublic int getThinkPageIndex()
getThinkPageIndex 在类中 org.hswebframework.ezorm.core.param.QueryParampublic int getPageIndexTmp()
getPageIndexTmp 在类中 org.hswebframework.ezorm.core.param.QueryParampublic Set<String> getIncludes()
getIncludes 在类中 org.hswebframework.ezorm.core.param.Parampublic Set<String> getExcludes()
getExcludes 在类中 org.hswebframework.ezorm.core.param.Parampublic static QueryParamEntity of()
public static QueryParamEntity of(String field, Object value)
this#of(String, Object)public static <T> org.hswebframework.ezorm.core.dsl.Query<T,QueryParamEntity> newQuery()
public <T> org.hswebframework.ezorm.core.dsl.Query<T,QueryParamEntity> toQuery()
public <T> org.hswebframework.ezorm.core.dsl.Query<T,QueryParamEntity> toNestQuery()
entity.toNestQuery().and("userId",userId);
原有条件: name=? or type=?
执行后条件: (name=? or type=?) and userId=?
this#toNestQuery(Consumer)public <T> org.hswebframework.ezorm.core.dsl.Query<T,QueryParamEntity> toNestQuery(java.util.function.Consumer<org.hswebframework.ezorm.core.dsl.Query<T,QueryParamEntity>> before)
entity.toNestQuery(query->query.and("userId",userId));
原有条件: name=? or type=?
执行后条件: userId=? (name=? or type=?)
before - 在包装之前执行,将条件包装到已有条件之前public void setOrderBy(String orderBy)
orderBy - 表达式public void setWhere(String where)
where - 表达式public List<org.hswebframework.ezorm.core.param.Term> getTerms()
getTerms 在类中 org.hswebframework.ezorm.core.param.Parampublic QueryParamEntity noPaging()
noPaging 在类中 org.hswebframework.ezorm.core.param.QueryParampublic QueryParamEntity clone()
clone 在类中 org.hswebframework.ezorm.core.param.QueryParamCopyright © 2016–2020. All rights reserved.