Constructor and Description |
---|
Query(Collection<String> fields,
String[] tableNames,
Condition[] where,
Page page)
构造
|
Query(Condition[] where,
Page page,
String... tableNames)
构造
|
Query(Condition[] where,
String... tableNames)
构造
|
Query(String... tableNames)
构造
|
Modifier and Type | Method and Description |
---|---|
Collection<String> |
getFields()
获得查询的字段名列表
|
String |
getFirstTableName()
获得第一个表名
|
Page |
getPage()
获得分页对象,无分页返回
null |
String[] |
getTableNames()
获得表名数组
|
Condition[] |
getWhere()
获得条件语句
|
static Query |
of(Entity where)
从
Entity 构建Query |
Query |
setFields(Collection<String> fields)
设置查询的字段名列表
|
Query |
setFields(String... fields)
设置查询的字段名列表
|
Query |
setPage(Page page)
设置分页对象
|
Query |
setTableNames(String... tableNames)
设置表名
|
Query |
setWhere(Condition... where)
设置条件语句
|
public Query(String... tableNames)
tableNames
- 表名public Query(Condition[] where, String... tableNames)
where
- 条件语句tableNames
- 表名public Query(Condition[] where, Page page, String... tableNames)
where
- 条件语句page
- 分页tableNames
- 表名public Query(Collection<String> fields, String[] tableNames, Condition[] where, Page page)
fields
- 字段tableNames
- 表名where
- 条件page
- 分页public static Query of(Entity where)
Entity
构建Querywhere
- 条件查询Entity
,包含条件Map和表名public Collection<String> getFields()
public Query setFields(Collection<String> fields)
fields
- 查询的字段名列表public Query setFields(String... fields)
fields
- 查询的字段名列表public String[] getTableNames()
public Query setTableNames(String... tableNames)
tableNames
- 表名public Condition[] getWhere()
public Page getPage()
null
null
public String getFirstTableName() throws DbRuntimeException
DbRuntimeException
- 没有表Copyright © 2024. All rights reserved.