Package | Description |
---|---|
cn.hutool.db |
Hutool-db是一个在JDBC基础上封装的数据库操作工具类,通过包装,使用ActiveRecord思想操作数据库。
|
Modifier and Type | Method and Description |
---|---|
ActiveEntity |
ActiveEntity.add()
根据Entity中现有字段条件从数据库中增加一条数据
|
ActiveEntity |
ActiveEntity.addFieldNames(String... fieldNames) |
ActiveEntity |
ActiveEntity.clone() |
static ActiveEntity |
ActiveEntity.create()
创建ActiveEntity
|
static ActiveEntity |
ActiveEntity.create(String tableName)
创建ActiveEntity
|
ActiveEntity |
ActiveEntity.del()
根据现有Entity中的条件删除与之匹配的数据库记录
|
ActiveEntity |
ActiveEntity.load()
根据Entity中现有字段条件从数据库中加载一个Entity对象
|
static <T> ActiveEntity |
ActiveEntity.parse(T bean)
将PO对象转为Entity
|
static <T> ActiveEntity |
ActiveEntity.parse(T bean,
boolean isToUnderlineCase,
boolean ignoreNullValue)
将PO对象转为ActiveEntity
|
<T> ActiveEntity |
ActiveEntity.parseBean(T bean) |
<T> ActiveEntity |
ActiveEntity.parseBean(T bean,
boolean isToUnderlineCase,
boolean ignoreNullValue) |
static <T> ActiveEntity |
ActiveEntity.parseWithUnderlineCase(T bean)
将PO对象转为ActiveEntity,并采用下划线法转换字段
|
ActiveEntity |
ActiveEntity.set(String field,
Object value) |
ActiveEntity |
ActiveEntity.setFieldNames(Collection<String> fieldNames) |
ActiveEntity |
ActiveEntity.setFieldNames(String... fieldNames) |
ActiveEntity |
ActiveEntity.setFields(Func0<?>... fields)
通过lambda批量设置值
|
ActiveEntity |
ActiveEntity.setIgnoreNull(String field,
Object value) |
ActiveEntity |
ActiveEntity.setTableName(String tableName) |
ActiveEntity |
ActiveEntity.update(String primaryKey)
根据现有Entity中的条件删除与之匹配的数据库记录
|
Copyright © 2024. All rights reserved.