|
||||||||||
| 上一个 下一个 | 框架 无框架 | |||||||||
| 使用 Entity 的软件包 | |
|---|---|
| com.xiaoleilu.hutool.db | |
| com.xiaoleilu.hutool.db.dialect | |
| com.xiaoleilu.hutool.db.dialect.impl | |
| com.xiaoleilu.hutool.db.handler | |
| com.xiaoleilu.hutool.db 中 Entity 的使用 |
|---|
| 返回 Entity 的 com.xiaoleilu.hutool.db 中的方法 | |
|---|---|
static Entity |
Entity.create(String tableName)
|
Entity |
Entity.set(String attr,
Object value)
设置列 |
Entity |
Entity.setTableName(String tableName)
设置表名 |
| 参数类型为 Entity 的 com.xiaoleilu.hutool.db 中的方法 | ||
|---|---|---|
static String |
DbUtil.buildEqualsWhere(Entity entity,
List<Object> paramValues)
构件相等条件的where语句 如果没有条件语句,泽返回空串,表示没有条件 |
|
int |
SqlConnRunner.count(Connection conn,
Entity where)
结果的条目数 |
|
int |
SqlRunner.count(Entity where)
结果的条目数 |
|
int |
Session.count(Entity where)
结果的条目数 |
|
int |
SqlConnRunner.del(Connection conn,
Entity where)
删除数据 此方法不会关闭Connection |
|
int |
SqlRunner.del(Entity where)
删除数据 |
|
int |
Session.del(Entity where)
删除数据 |
|
|
SqlRunner.find(Collection<String> fields,
Entity where,
RsHandler<T> rsh)
查询 |
|
|
Session.find(Collection<String> fields,
Entity where,
RsHandler<T> rsh)
查询 |
|
|
SqlConnRunner.find(Connection conn,
Collection<String> fields,
Entity where,
RsHandler<T> rsh)
查询 此方法不会关闭Connection |
|
Long |
SqlConnRunner.insert(Connection conn,
Entity record)
插入数据 此方法不会关闭Connection |
|
Long |
SqlRunner.insert(Entity record)
插入数据 |
|
Long |
Session.insert(Entity record)
插入数据 |
|
|
SqlRunner.page(Collection<String> fields,
Entity where,
int page,
int numPerPage,
RsHandler<T> rsh)
分页查询 |
|
|
Session.page(Collection<String> fields,
Entity where,
int page,
int numPerPage,
RsHandler<T> rsh)
分页查询 |
|
|
SqlConnRunner.page(Connection conn,
Collection<String> fields,
Entity where,
int page,
int numPerPage,
RsHandler<T> rsh)
分页查询 此方法不会关闭Connection |
|
int |
SqlConnRunner.update(Connection conn,
Entity record,
Entity where)
更新数据 此方法不会关闭Connection |
|
int |
SqlRunner.update(Entity record,
Entity where)
更新数据 |
|
int |
Session.update(Entity record,
Entity where)
更新数据 |
|
| com.xiaoleilu.hutool.db.dialect 中 Entity 的使用 |
|---|
| 参数类型为 Entity 的 com.xiaoleilu.hutool.db.dialect 中的方法 | |
|---|---|
PreparedStatement |
Dialect.psForCount(Connection conn,
Entity where)
构建用于查询行数的PreparedStatement |
PreparedStatement |
Dialect.psForDelete(Connection conn,
Entity entity)
构建用于删除的PreparedStatement |
PreparedStatement |
Dialect.psForFind(Connection conn,
Collection<String> fields,
Entity where)
构建用于获取多条记录的PreparedStatement |
PreparedStatement |
Dialect.psForInsert(Connection conn,
Entity entity)
构建用于插入的PreparedStatement |
PreparedStatement |
Dialect.psForPage(Connection conn,
Collection<String> fields,
Entity where,
int page,
int numPerPage)
构建用于分页查询的PreparedStatement |
PreparedStatement |
Dialect.psForUpdate(Connection conn,
Entity entity,
Entity where)
构建用于更新的PreparedStatement |
| com.xiaoleilu.hutool.db.dialect.impl 中 Entity 的使用 |
|---|
| com.xiaoleilu.hutool.db.handler 中 Entity 的使用 |
|---|
| 返回 Entity 的 com.xiaoleilu.hutool.db.handler 中的方法 | |
|---|---|
Entity |
SingleEntityHandler.handle(ResultSet rs)
|
static Entity |
HandleHelper.handleRow(int columnCount,
ResultSetMetaData meta,
ResultSet rs)
处理单条数据 |
| 返回变量类型为 Entity 的类型的 com.xiaoleilu.hutool.db.handler 中的方法 | |
|---|---|
List<Entity> |
EntityHandler.handle(ResultSet rs)
|
|
||||||||||
| 上一个 下一个 | 框架 无框架 | |||||||||