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