public class QueryBuilder extends Object
| 构造器和说明 |
|---|
QueryBuilder(Class<?> clazz) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addQuery(String pName,
Object pValue1,
Object pValue2,
String pType,
boolean isOr)
添加between条件
|
void |
addQuery(String pName,
Object pValue,
String pType)
添加查询条件
|
void |
addQuery(String pName,
Object pValue,
String pType,
boolean isOr)
添加查询条件
|
void |
distinct(boolean distinct)
设置distinct
|
protected String |
getGroupByValue() |
protected String |
getHavingValue() |
protected String |
getLimitValue() |
protected String |
getOrderByValue() |
protected String |
getSelection() |
protected String[] |
getSelectionArgs() |
protected String |
getTable() |
protected String |
getWhere() |
void |
groupBy(String groupBy)
设置groupBy
|
void |
having(String having)
设置having
|
protected boolean |
isDistinctValue() |
void |
limit(long limit)
设置limit
|
void |
offset(long offset)
设置offset
|
void |
orderBy(String orderBy)
设置 orderByValue
|
public QueryBuilder(Class<?> clazz)
public void addQuery(String pName, Object pValue, String pType)
pName - 字段名称pValue - 字段值pType - 查询类型{}public void addQuery(String pName, Object pValue, String pType, boolean isOr)
pName - 字段名称pValue - 字段值pType - 查询类型{}isOr - public void addQuery(String pName, Object pValue1, Object pValue2, String pType, boolean isOr)
pName - pValue1 - pValue2 - pType - isOr - protected String getSelection()
protected String[] getSelectionArgs()
protected String getWhere()
protected boolean isDistinctValue()
public void distinct(boolean distinct)
distinct - protected String getTable()
protected String getOrderByValue()
public void orderBy(String orderBy)
orderBy - protected String getGroupByValue()
public void groupBy(String groupBy)
groupBy - protected String getHavingValue()
public void having(String having)
having - protected String getLimitValue()
public void limit(long limit)
limit - public void offset(long offset)
offset -