Entity.MetacaseInsensitive| Constructor and Description |
|---|
ActiveEntity()
构造
|
ActiveEntity(Db db,
Entity entity)
构造
|
ActiveEntity(Db db,
String tableName)
构造
|
ActiveEntity(Entity entity)
构造
|
ActiveEntity(String tableName)
构造
|
| Modifier and Type | Method and Description |
|---|---|
ActiveEntity |
add()
根据Entity中现有字段条件从数据库中增加一条数据
|
ActiveEntity |
addFieldNames(String... fieldNames)
添加字段列表
|
ActiveEntity |
clone() |
ActiveEntity |
del()
根据现有Entity中的条件删除与之匹配的数据库记录
|
ActiveEntity |
load()
根据Entity中现有字段条件从数据库中加载一个Entity对象
|
static ActiveEntity |
of()
创建ActiveEntity
|
static ActiveEntity |
of(String tableName)
创建ActiveEntity
|
static <T> ActiveEntity |
parse(T bean)
将PO对象转为Entity
|
static <T> ActiveEntity |
parse(T bean,
boolean isToUnderlineCase,
boolean ignoreNullValue)
将PO对象转为ActiveEntity
|
<T> ActiveEntity |
parseBean(T bean)
将值对象转换为Entity
类名会被当作表名,小写第一个字母 |
<T> ActiveEntity |
parseBean(T bean,
boolean isToUnderlineCase,
boolean ignoreNullValue)
将值对象转换为Entity
类名会被当作表名,小写第一个字母 |
static <T> ActiveEntity |
parseWithUnderlineCase(T bean)
将PO对象转为ActiveEntity,并采用下划线法转换字段
|
ActiveEntity |
set(String field,
Object value)
设置列
|
ActiveEntity |
setFieldNames(Iterable<String> fieldNames)
设置字段列表,用于限制加入的字段的值
|
ActiveEntity |
setFieldNames(String... fieldNames)
设置字段列表,用于限制加入的字段的值
|
ActiveEntity |
setFields(SerSupplier<?>... fields)
通过lambda批量设置值
|
ActiveEntity |
setIgnoreNull(String field,
Object value)
设置列,当键或值为null时忽略
|
ActiveEntity |
setTableName(String tableName)
设置表名
|
ActiveEntity |
update(String primaryKey)
根据现有Entity中的条件删除与之匹配的数据库记录
|
addCondition, filterNew, getBlob, getClob, getDate, getFieldNames, getMeta, getRowId, getRowId, getSqlTime, getSqlTimestamp, getStr, getStr, getTableName, of, ofWithUnderlineCase, removeNew, setMeta, toStringcustomKey, get, getBean, getByPath, getByPath, getObj, ofEntries, ofKvs, removeEqual, toBean, toBean, toBeanIgnoreCase, toBeanIgnoreCasecustomValuecompute, computeIfAbsent, computeIfPresent, containsKey, get, getOrDefault, merge, put, putAll, putIfAbsent, remove, remove, replace, replaceclear, containsValue, entrySet, equals, forEach, getRaw, hashCode, isEmpty, iterator, keySet, replaceAll, size, valuesfinalize, getClass, notify, notifyAll, wait, wait, waitget, get, get, getBigDecimal, getBigDecimal, getBigInteger, getBigInteger, getBool, getBool, getByte, getByte, getBytes, getBytes, getChar, getChar, getDate, getDouble, getDouble, getEnum, getEnum, getFloat, getFloat, getInt, getInt, getLocalDate, getLocalDate, getLocalDateTime, getLocalDateTime, getLocalTime, getLocalTime, getLong, getLong, getNumber, getNumber, getObj, getShort, getShort, getSqlTime, getSqlTimestamp, getStrforEach, spliteratorpublic ActiveEntity()
public ActiveEntity(String tableName)
tableName - 表名public ActiveEntity(Entity entity)
entity - 非动态实体public static ActiveEntity of()
public static ActiveEntity of(String tableName)
tableName - 表名public static <T> ActiveEntity parse(T bean)
T - Bean对象类型bean - Bean对象public static <T> ActiveEntity parse(T bean, boolean isToUnderlineCase, boolean ignoreNullValue)
T - Bean对象类型bean - Bean对象isToUnderlineCase - 是否转换为下划线模式ignoreNullValue - 是否忽略值为空的字段public static <T> ActiveEntity parseWithUnderlineCase(T bean)
T - Bean对象类型bean - Bean对象public ActiveEntity setTableName(String tableName)
EntitysetTableName in class EntitytableName - 表名public ActiveEntity setFieldNames(Iterable<String> fieldNames)
EntitysetFieldNames in class EntityfieldNames - 字段列表public ActiveEntity setFieldNames(String... fieldNames)
EntitysetFieldNames in class EntityfieldNames - 字段列表public ActiveEntity setFields(SerSupplier<?>... fields)
public ActiveEntity addFieldNames(String... fieldNames)
EntityaddFieldNames in class EntityfieldNames - 字段列表public <T> ActiveEntity parseBean(T bean)
Entitypublic <T> ActiveEntity parseBean(T bean, boolean isToUnderlineCase, boolean ignoreNullValue)
Entitypublic ActiveEntity set(String field, Object value)
Dictpublic ActiveEntity setIgnoreNull(String field, Object value)
DictsetIgnoreNull in class Entityfield - 属性value - 值public ActiveEntity clone()
public ActiveEntity add()
public ActiveEntity load()
public ActiveEntity del()
public ActiveEntity update(String primaryKey)
primaryKey - 主键名Copyright © 2025. All rights reserved.