mirror of
https://gitee.com/dromara/hutool.git
synced 2025-05-04 04:37:59 +08:00
格式调整
This commit is contained in:
parent
0723813452
commit
f40b5a04b8
@ -9,7 +9,7 @@ import cn.hutool.core.map.MapUtil;
|
|||||||
/**
|
/**
|
||||||
* 动态实体类<br>
|
* 动态实体类<br>
|
||||||
* 提供了针对自身实体的增删改方法
|
* 提供了针对自身实体的增删改方法
|
||||||
*
|
*
|
||||||
* @author Looly
|
* @author Looly
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@ -21,7 +21,7 @@ public class ActiveEntity extends Entity {
|
|||||||
// --------------------------------------------------------------- Static method start
|
// --------------------------------------------------------------- Static method start
|
||||||
/**
|
/**
|
||||||
* 创建ActiveEntity
|
* 创建ActiveEntity
|
||||||
*
|
*
|
||||||
* @return ActiveEntity
|
* @return ActiveEntity
|
||||||
*/
|
*/
|
||||||
public static ActiveEntity create() {
|
public static ActiveEntity create() {
|
||||||
@ -30,7 +30,7 @@ public class ActiveEntity extends Entity {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建ActiveEntity
|
* 创建ActiveEntity
|
||||||
*
|
*
|
||||||
* @param tableName 表名
|
* @param tableName 表名
|
||||||
* @return ActiveEntity
|
* @return ActiveEntity
|
||||||
*/
|
*/
|
||||||
@ -40,7 +40,7 @@ public class ActiveEntity extends Entity {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 将PO对象转为Entity
|
* 将PO对象转为Entity
|
||||||
*
|
*
|
||||||
* @param <T> Bean对象类型
|
* @param <T> Bean对象类型
|
||||||
* @param bean Bean对象
|
* @param bean Bean对象
|
||||||
* @return ActiveEntity
|
* @return ActiveEntity
|
||||||
@ -51,7 +51,7 @@ public class ActiveEntity extends Entity {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 将PO对象转为ActiveEntity
|
* 将PO对象转为ActiveEntity
|
||||||
*
|
*
|
||||||
* @param <T> Bean对象类型
|
* @param <T> Bean对象类型
|
||||||
* @param bean Bean对象
|
* @param bean Bean对象
|
||||||
* @param isToUnderlineCase 是否转换为下划线模式
|
* @param isToUnderlineCase 是否转换为下划线模式
|
||||||
@ -64,7 +64,7 @@ public class ActiveEntity extends Entity {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 将PO对象转为ActiveEntity,并采用下划线法转换字段
|
* 将PO对象转为ActiveEntity,并采用下划线法转换字段
|
||||||
*
|
*
|
||||||
* @param <T> Bean对象类型
|
* @param <T> Bean对象类型
|
||||||
* @param bean Bean对象
|
* @param bean Bean对象
|
||||||
* @return ActiveEntity
|
* @return ActiveEntity
|
||||||
@ -84,7 +84,7 @@ public class ActiveEntity extends Entity {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 构造
|
* 构造
|
||||||
*
|
*
|
||||||
* @param tableName 表名
|
* @param tableName 表名
|
||||||
*/
|
*/
|
||||||
public ActiveEntity(String tableName) {
|
public ActiveEntity(String tableName) {
|
||||||
@ -93,7 +93,7 @@ public class ActiveEntity extends Entity {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 构造
|
* 构造
|
||||||
*
|
*
|
||||||
* @param entity 非动态实体
|
* @param entity 非动态实体
|
||||||
*/
|
*/
|
||||||
public ActiveEntity(Entity entity) {
|
public ActiveEntity(Entity entity) {
|
||||||
@ -102,7 +102,7 @@ public class ActiveEntity extends Entity {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 构造
|
* 构造
|
||||||
*
|
*
|
||||||
* @param db {@link Db}
|
* @param db {@link Db}
|
||||||
* @param tableName 表名
|
* @param tableName 表名
|
||||||
*/
|
*/
|
||||||
@ -113,7 +113,7 @@ public class ActiveEntity extends Entity {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 构造
|
* 构造
|
||||||
*
|
*
|
||||||
* @param db {@link Db}
|
* @param db {@link Db}
|
||||||
* @param entity 非动态实体
|
* @param entity 非动态实体
|
||||||
*/
|
*/
|
||||||
@ -123,17 +123,17 @@ public class ActiveEntity extends Entity {
|
|||||||
this.db = db;
|
this.db = db;
|
||||||
}
|
}
|
||||||
// -------------------------------------------------------------------------- Constructor end
|
// -------------------------------------------------------------------------- Constructor end
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ActiveEntity setTableName(String tableName) {
|
public ActiveEntity setTableName(String tableName) {
|
||||||
return (ActiveEntity) super.setTableName(tableName);
|
return (ActiveEntity) super.setTableName(tableName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ActiveEntity setFieldNames(Collection<String> fieldNames) {
|
public ActiveEntity setFieldNames(Collection<String> fieldNames) {
|
||||||
return (ActiveEntity) super.setFieldNames(fieldNames);
|
return (ActiveEntity) super.setFieldNames(fieldNames);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ActiveEntity setFieldNames(String... fieldNames) {
|
public ActiveEntity setFieldNames(String... fieldNames) {
|
||||||
return (ActiveEntity) super.setFieldNames(fieldNames);
|
return (ActiveEntity) super.setFieldNames(fieldNames);
|
||||||
@ -153,27 +153,27 @@ public class ActiveEntity extends Entity {
|
|||||||
public ActiveEntity addFieldNames(String... fieldNames) {
|
public ActiveEntity addFieldNames(String... fieldNames) {
|
||||||
return (ActiveEntity) super.addFieldNames(fieldNames);
|
return (ActiveEntity) super.addFieldNames(fieldNames);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public <T> ActiveEntity parseBean(T bean) {
|
public <T> ActiveEntity parseBean(T bean) {
|
||||||
return (ActiveEntity) super.parseBean(bean);
|
return (ActiveEntity) super.parseBean(bean);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public <T> ActiveEntity parseBean(T bean, boolean isToUnderlineCase, boolean ignoreNullValue) {
|
public <T> ActiveEntity parseBean(T bean, boolean isToUnderlineCase, boolean ignoreNullValue) {
|
||||||
return (ActiveEntity) super.parseBean(bean, isToUnderlineCase, ignoreNullValue);
|
return (ActiveEntity) super.parseBean(bean, isToUnderlineCase, ignoreNullValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ActiveEntity set(String field, Object value) {
|
public ActiveEntity set(String field, Object value) {
|
||||||
return (ActiveEntity) super.set(field, value);
|
return (ActiveEntity) super.set(field, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ActiveEntity setIgnoreNull(String field, Object value) {
|
public ActiveEntity setIgnoreNull(String field, Object value) {
|
||||||
return (ActiveEntity) super.setIgnoreNull(field, value);
|
return (ActiveEntity) super.setIgnoreNull(field, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ActiveEntity clone() {
|
public ActiveEntity clone() {
|
||||||
return (ActiveEntity) super.clone();
|
return (ActiveEntity) super.clone();
|
||||||
@ -182,7 +182,7 @@ public class ActiveEntity extends Entity {
|
|||||||
// -------------------------------------------------------------------------- CRUD start
|
// -------------------------------------------------------------------------- CRUD start
|
||||||
/**
|
/**
|
||||||
* 根据Entity中现有字段条件从数据库中增加一条数据
|
* 根据Entity中现有字段条件从数据库中增加一条数据
|
||||||
*
|
*
|
||||||
* @return this
|
* @return this
|
||||||
*/
|
*/
|
||||||
public ActiveEntity add() {
|
public ActiveEntity add() {
|
||||||
@ -196,7 +196,7 @@ public class ActiveEntity extends Entity {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据Entity中现有字段条件从数据库中加载一个Entity对象
|
* 根据Entity中现有字段条件从数据库中加载一个Entity对象
|
||||||
*
|
*
|
||||||
* @return this
|
* @return this
|
||||||
*/
|
*/
|
||||||
public ActiveEntity load() {
|
public ActiveEntity load() {
|
||||||
@ -213,7 +213,7 @@ public class ActiveEntity extends Entity {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据现有Entity中的条件删除与之匹配的数据库记录
|
* 根据现有Entity中的条件删除与之匹配的数据库记录
|
||||||
*
|
*
|
||||||
* @return this
|
* @return this
|
||||||
*/
|
*/
|
||||||
public ActiveEntity del() {
|
public ActiveEntity del() {
|
||||||
@ -227,7 +227,7 @@ public class ActiveEntity extends Entity {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据现有Entity中的条件删除与之匹配的数据库记录
|
* 根据现有Entity中的条件删除与之匹配的数据库记录
|
||||||
*
|
*
|
||||||
* @param primaryKey 主键名
|
* @param primaryKey 主键名
|
||||||
* @return this
|
* @return this
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user