public class Entity extends DTDMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
构造器和说明 |
---|
Entity()
--------------------------------------------------------------- Constructor start
|
Entity(String tableName)
构造
|
限定符和类型 | 方法和说明 |
---|---|
Entity |
addFieldNames(String... fieldNames)
添加字段列表
|
Entity |
clone() |
static Entity |
create()
创建Entity
|
static Entity |
create(String tableName)
创建Entity
|
Blob |
getBlob(String field)
获得Blob类型结果
|
Clob |
getClob(String field)
获得Clob类型结果
|
Date |
getDate(String field) |
Set<String> |
getFieldNames() |
RowId |
getRowId()
获得rowid
|
RowId |
getRowId(String field)
获得rowid
|
String |
getStr(String field) |
String |
getStr(String field,
Charset charset)
获得字符串值
支持Clob、Blob、RowId |
String |
getTableName() |
Time |
getTime(String field) |
Timestamp |
getTimestamp(String field) |
static <T> Entity |
parse(T bean)
将PO对象转为Entity
|
static <T> Entity |
parse(T bean,
boolean isToUnderlineCase,
boolean ignoreNullValue)
将PO对象转为Entity
|
<T> Entity |
parseBean(T bean)
将值对象转换为Entity
类名会被当作表名,小写第一个字母 |
<T> Entity |
parseBean(T bean,
boolean isToUnderlineCase,
boolean ignoreNullValue)
将值对象转换为Entity
类名会被当作表名,小写第一个字母 |
static <T> Entity |
parseWithUnderlineCase(T bean)
将PO对象转为Entity,并采用下划线法转换字段
|
Object |
put(String key,
Object value)
PUT方法做了过滤限制,如果此实体限制了属性名,则忽略限制名列表外的字段名
|
Entity |
set(String field,
Object value) |
Entity |
setFieldNames(List<String> fieldNames)
设置字段列表
|
Entity |
setFieldNames(String... fieldNames)
设置字段列表
|
Entity |
setIgnoreNull(String field,
Object value)
设置列,当键或值为null时忽略
|
Entity |
setTableName(String tableName)
设置表名
|
<T> T |
toBeanIgnoreCase(Class<T> clazz)
填充Value Object对象,忽略大小写
|
<T> T |
toBeanIgnoreCase(T bean)
转换为Bean对象
|
String |
toString() |
clear, containsKey, convertKey, get, get, getBigDecimal, getBigInteger, getBool, getByte, getBytes, getChar, getDouble, getEnum, getFloat, getInt, getLong, getNumber, getObj, getShort, putAll, remove
containsValue, entrySet, forEach, getOrDefault, keySet, removeEldestEntry, replaceAll, values
compute, computeIfAbsent, computeIfPresent, isEmpty, merge, putIfAbsent, remove, replace, replace, size
equals, hashCode
compute, computeIfAbsent, computeIfPresent, equals, hashCode, isEmpty, merge, putIfAbsent, remove, replace, replace, size
public Entity()
public Entity(String tableName)
tableName
- 数据表名public static Entity create()
public static <T> Entity parse(T bean)
T
- Bean对象类型bean
- Bean对象public static <T> Entity parse(T bean, boolean isToUnderlineCase, boolean ignoreNullValue)
T
- Bean对象类型bean
- Bean对象isToUnderlineCase
- 是否转换为下划线模式ignoreNullValue
- 是否忽略值为空的字段public static <T> Entity parseWithUnderlineCase(T bean)
T
- Bean对象类型bean
- Bean对象public String getTableName()
public Entity setFieldNames(List<String> fieldNames)
fieldNames
- 字段列表public <T> Entity parseBean(T bean)
T
- Bean对象类型bean
- Bean对象public <T> Entity parseBean(T bean, boolean isToUnderlineCase, boolean ignoreNullValue)
T
- Bean对象类型bean
- Bean对象isToUnderlineCase
- 是否转换为下划线模式ignoreNullValue
- 是否忽略值为空的字段public Entity setIgnoreNull(String field, Object value)
DTDMap
setIgnoreNull
在类中 DTDMap
field
- 属性value
- 值public Timestamp getTimestamp(String field)
getTimestamp
在类中 DTDMap
field
- 字段名public String getStr(String field, Charset charset)
field
- 字段名charset
- 编码public RowId getRowId()
public <T> T toBeanIgnoreCase(T bean)
T
- Bean类型bean
- Beanpublic <T> T toBeanIgnoreCase(Class<T> clazz)
T
- Bean类型clazz
- Value Object(或者POJO)的类public String toString()
toString
在类中 AbstractMap
Copyright © 2021. All rights reserved.