public final class DataBase extends Object
| 构造器和说明 |
|---|
DataBase(DataSource dataSource,
SQLBuilderEnum dialectEnum) |
| 限定符和类型 | 方法和说明 |
|---|---|
int |
countByExample(Record example)
记录在数据库中是否存在。
|
int |
delete(Record ent)
删除对象(无论目标是否存在)。
|
int |
deleteByExample(Record example)
删除数据库中满足该对象特征的。
|
boolean |
existByID(Record ent)
根据ID判断记录在数据库中是否存在。
|
protected Identify |
getIdentify(Sechma sechma) |
JdbcOperations |
getJdbc()
获取JDBC接口
|
protected SQLBuilder |
getSQLBuilder() |
<T> PageResult<T> |
listByExample(Class<T> recType,
Record example)
从数据库中查询满足该对象特征的。
|
<T> PageResult<T> |
listByExample(Class<T> recType,
Record example,
Paginator paginator)
从数据库中查询满足该对象特征的。
|
<T> PageResult<T> |
listByExample(Class<T> recType,
Record example,
Paginator paginator,
Sechma useSechma)
从数据库中查询满足该对象特征的。
|
PageResult<Record> |
listByExample(Record example)
从数据库中查询满足该对象特征的。
|
PageResult<Record> |
listByExample(Record example,
Paginator paginator)
从数据库中查询满足该对象特征的。
|
Record |
loadData(Record ent)
装载数据。
|
Sechma |
loadSechma(Class<?> sechmaType) |
<T> PageResult<T> |
queryBySQL(Class<T> recType,
String sqlQuery)
根据SQL语句执行查询返回
PageResult。 |
<T> PageResult<T> |
queryBySQL(Class<T> recType,
String sqlQuery,
Map<String,Object> params)
根据SQL语句执行查询返回
PageResult。 |
<T> PageResult<T> |
queryBySQL(Class<T> recType,
String sqlQuery,
Object... params)
根据SQL语句执行查询返回
PageResult。 |
<T> PageResult<T> |
queryBySQL(Class<T> recType,
String sqlQuery,
Paginator paginator)
根据SQL语句执行查询返回
PageResult。 |
<T> PageResult<T> |
queryBySQL(Class<T> recType,
String sqlQuery,
Paginator paginator,
Map<String,Object> params)
根据SQL语句执行查询返回
PageResult。 |
<T> PageResult<T> |
queryBySQL(Class<T> recType,
String sqlQuery,
Paginator paginator,
Object... params)
根据SQL语句执行查询返回
PageResult。 |
<T> PageResult<T> |
queryBySQL(Class<T> recType,
String sqlQuery,
Paginator paginator,
Sechma useSechma,
Map<String,Object> params)
根据SQL语句执行查询返回
PageResult。 |
<T> PageResult<T> |
queryBySQL(Class<T> recType,
String sqlQuery,
Paginator paginator,
Sechma useSechma,
Object... params)
根据SQL语句执行查询返回
PageResult。 |
PageResult<Record> |
queryBySQL(String sqlQuery)
根据SQL语句执行查询返回
PageResult。 |
PageResult<Record> |
queryBySQL(String sqlQuery,
Map<String,Object> params)
根据SQL语句执行查询返回
PageResult。 |
PageResult<Record> |
queryBySQL(String sqlQuery,
Object... params)
根据SQL语句执行查询返回
PageResult。 |
PageResult<Record> |
queryBySQL(String sqlQuery,
Paginator paginator)
根据SQL语句执行查询返回
PageResult。 |
PageResult<Record> |
queryBySQL(String sqlQuery,
Paginator paginator,
Map<String,Object> params)
根据SQL语句执行查询返回
PageResult。 |
PageResult<Record> |
queryBySQL(String sqlQuery,
Paginator paginator,
Object... params)
根据SQL语句执行查询返回
PageResult。 |
boolean |
saveAsNew(Record ent)
保存为新增,无论目标记录是否存在都作为新增。
|
boolean |
saveOrUpdate(Record ent)
保存或新增,如果目标记录存在则更新否则新增。
|
int |
update(Record ent)
仅保存,如果目标记录不存在则引发异常。
|
int |
updateByExample(Record example,
Map<String,Object> dataContainer)
更新数据库中满足该对象特征的。
|
int |
updateByExample(Record example,
Record dataContainer)
更新数据库中满足该对象特征的。
|
public DataBase(DataSource dataSource, SQLBuilderEnum dialectEnum)
public PageResult<Record> queryBySQL(String sqlQuery) throws SQLException
PageResult。SQLExceptionpublic PageResult<Record> queryBySQL(String sqlQuery, Object... params) throws SQLException
PageResult。SQLExceptionpublic PageResult<Record> queryBySQL(String sqlQuery, Map<String,Object> params) throws SQLException
PageResult。SQLExceptionpublic PageResult<Record> queryBySQL(String sqlQuery, Paginator paginator) throws SQLException
PageResult。SQLExceptionpublic PageResult<Record> queryBySQL(String sqlQuery, Paginator paginator, Object... params) throws SQLException
PageResult。SQLExceptionpublic PageResult<Record> queryBySQL(String sqlQuery, Paginator paginator, Map<String,Object> params) throws SQLException
PageResult。SQLExceptionpublic <T> PageResult<T> queryBySQL(Class<T> recType, String sqlQuery) throws SQLException
PageResult。SQLExceptionpublic <T> PageResult<T> queryBySQL(Class<T> recType, String sqlQuery, Object... params) throws SQLException
PageResult。SQLExceptionpublic <T> PageResult<T> queryBySQL(Class<T> recType, String sqlQuery, Map<String,Object> params) throws SQLException
PageResult。SQLExceptionpublic <T> PageResult<T> queryBySQL(Class<T> recType, String sqlQuery, Paginator paginator) throws SQLException
PageResult。SQLExceptionpublic <T> PageResult<T> queryBySQL(Class<T> recType, String sqlQuery, Paginator paginator, Object... params) throws SQLException
PageResult。SQLExceptionpublic <T> PageResult<T> queryBySQL(Class<T> recType, String sqlQuery, Paginator paginator, Map<String,Object> params) throws SQLException
PageResult。SQLExceptionpublic <T> PageResult<T> queryBySQL(Class<T> recType, String sqlQuery, Paginator paginator, Sechma useSechma, Object... params) throws SQLException
PageResult。SQLExceptionpublic <T> PageResult<T> queryBySQL(Class<T> recType, String sqlQuery, Paginator paginator, Sechma useSechma, Map<String,Object> params) throws SQLException
PageResult。SQLExceptionpublic Record loadData(Record ent) throws SQLException
SQLExceptionpublic int delete(Record ent) throws SQLException
SQLExceptionpublic int update(Record ent) throws SQLException
SQLExceptionpublic boolean saveOrUpdate(Record ent) throws SQLException
SQLExceptionpublic boolean saveAsNew(Record ent) throws SQLException
SQLExceptionpublic boolean existByID(Record ent) throws SQLException
SQLExceptionpublic int countByExample(Record example) throws SQLException
SQLExceptionpublic int deleteByExample(Record example) throws SQLException
SQLExceptionpublic int updateByExample(Record example, Map<String,Object> dataContainer) throws SQLException
SQLExceptionpublic int updateByExample(Record example, Record dataContainer) throws SQLException
SQLExceptionpublic PageResult<Record> listByExample(Record example) throws SQLException
SQLExceptionpublic PageResult<Record> listByExample(Record example, Paginator paginator) throws SQLException
SQLExceptionpublic <T> PageResult<T> listByExample(Class<T> recType, Record example) throws SQLException
SQLExceptionpublic <T> PageResult<T> listByExample(Class<T> recType, Record example, Paginator paginator) throws SQLException
SQLExceptionpublic <T> PageResult<T> listByExample(Class<T> recType, Record example, Paginator paginator, Sechma useSechma) throws SQLException
SQLExceptionpublic JdbcOperations getJdbc()
protected SQLBuilder getSQLBuilder()
Copyright © 2015. All rights reserved.