public final class SQLBeanBuilder extends Object
| 构造器和说明 |
|---|
SQLBeanBuilder(Class<?> beanClass) |
| 限定符和类型 | 方法和说明 |
|---|---|
String |
countAll()
无条件统计
|
String |
countAndByRouters(Symbol symbol,
int... routers)
AND条件统计一个表的记录数
|
String |
countOrByRouters(Symbol symbol,
int... routers)
OR条件统计一个表的记录数
|
String |
deleteByPk(Symbol symbol)
根据主键删除表记录
|
String |
deleteByRouters(Symbol symbol,
int... routers)
根据指定的routers条件删除表中的记录
|
Field[] |
getAllFieldExceptObject()
获取所有的成员变量,包括所有父类,除了Object
|
Class<?> |
getBeanClass() |
Field |
getPkField()
获取主键变量
|
String |
getTableName()
获取当前SQLTable中的表名
|
String |
insertAll(Symbol symbol,
boolean insertPk)
已过时。
|
String |
insertAllPk(Symbol symbol,
boolean insertPk)
已过时。
|
String |
insertAllWithoutPk(Symbol symbol)
插入所有字段,除主键外
|
String |
insertAllWithPk(Symbol symbol)
连同主键一起插入
|
String |
insertRoutersWithoutPk(Symbol symbol,
int... routers)
插入指定的字段,除主键外
|
String |
insertRoutersWithPk(Symbol symbol,
int... routers)
插入指定的字段,连同id一起
|
String |
selectAll()
无条件查询所有字段
|
String |
selectAllByPk(Symbol symbol)
根据主键id查询所有字段
|
String |
selectAllByRoutersAnd(Symbol symbol,
int... routers)
AND条件查询所有字段
|
String |
selectPartByPk(Symbol symbol,
int... routers)
根据主键id查询所选字段
|
String |
selectPartByRoutersAnd(Symbol symbol,
int[] selectColumnsRouters,
int... conditionRouters)
AND条件查询所选择的字段
|
void |
setBeanClass(Class<?> beanClass) |
String |
updateRoutersByPk(Symbol symbol,
int... updateRouters)
根据主键跟新指定routers列
|
String |
updateRoutersByRouterArray(Symbol symbol,
int[] updateRouters,
int[] conditionRouters)
根据指定的条件routers更新指定的routers列
|
String |
updateRoutersByRouters(Symbol symbol,
int[] updateRouters,
int... conditionRouters)
同updateRoutersByRouterArray,参数类型换为不不定式
|
public SQLBeanBuilder(Class<?> beanClass)
public Class<?> getBeanClass()
public void setBeanClass(Class<?> beanClass)
public String getTableName()
public Field getPkField()
public Field[] getAllFieldExceptObject()
public String countAndByRouters(Symbol symbol, int... routers)
routers - 需要and哪些字段来统计记录数StringSQLTableNotFoundException - SQLTableNotFoundExceptionpublic String countOrByRouters(Symbol symbol, int... routers)
routers - 需要or哪些字段来统计记录数StringSQLTableNotFoundException - SQLTableNotFoundExceptionpublic String selectPartByRoutersAnd(Symbol symbol, int[] selectColumnsRouters, int... conditionRouters)
selectColumnsRouters - 需要查询的routerconditionRouters - and条件中的routerStringSQLTableNotFoundException - SQLTableNotFoundExceptionpublic String selectAllByRoutersAnd(Symbol symbol, int... routers)
routers - and条件中含有的routerStringSQLTableNotFoundExceptionpublic String selectAll()
StringSQLTableNotFoundExceptionpublic String selectAllByPk(Symbol symbol)
StringSQLTableNotFoundExceptionpublic String selectPartByPk(Symbol symbol, int... routers)
routers - 需要查询的字段routersString@Deprecated public String insertAllPk(Symbol symbol, boolean insertPk)
insertPk - 是否连同主键一起插入StringSQLTableNotFoundException@Deprecated public String insertAll(Symbol symbol, boolean insertPk)
insertPk - public String insertAllWithPk(Symbol symbol)
StringSQLTableNotFoundExceptionpublic String insertAllWithoutPk(Symbol symbol)
StringSQLTableNotFoundExceptionpublic String insertRoutersWithPk(Symbol symbol, int... routers)
routers - 指定字段的routersStringSQLTableNotFoundExceptionpublic String insertRoutersWithoutPk(Symbol symbol, int... routers)
routers - 指定字段的routersStringSQLTableNotFoundExceptionpublic String updateRoutersByRouterArray(Symbol symbol, int[] updateRouters, int[] conditionRouters)
updateRouters - 指定更新列conditionRouters - 指定更新条件Stringpublic String updateRoutersByRouters(Symbol symbol, int[] updateRouters, int... conditionRouters)
updateRouters - conditionRouters - Stringpublic String updateRoutersByPk(Symbol symbol, int... updateRouters)
updateRouters - 指定routers更新列Stringpublic String deleteByRouters(Symbol symbol, int... routers)
routers - StringSQLTableNotFoundExceptionDeleteSQLConditionsNullExceptionCopyright © 2018. All rights reserved.