public final class VarObject extends DBObject implements Map<String,Object>
_recordUpdate, query, updateValueMap| Modifier | Constructor and Description |
|---|---|
protected |
VarObject() |
|
VarObject(TableMapping meta) |
|
VarObject(TableMapping meta,
boolean recordField) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value) |
Set<Map.Entry<String,Object>> |
entrySet() |
boolean |
equals(Object obj) |
Object |
get(Object key) |
Object |
get(String key)
得到一个字段值
|
Boolean |
getBoolean(String key)
得到字段值,类型转换为Boolean
|
Byte |
getByte(String key) |
Collection<VarObject> |
getCollection(String key)
得到字段值,并转换为Collection
|
<T> Collection<T> |
getCollection(String key,
Class<T> clz)
得到字段值,并转换为Collection
|
Double |
getDouble(String key)
得到字段值,类型转换为Double
|
Integer |
getInteger(String key)
得到字段值,类型转换为Integer
|
List<VarObject> |
getList(String key)
得到字段值,并转换为List
|
<T> List<T> |
getList(String key,
Class<T> clz)
得到字段值,并转换为List
|
Long |
getLong(String key)
得到字段值,类型转换为Long
|
Short |
getShort(String key) |
String |
getString(String key)
得到字段值,类型转换为String
|
int |
hashCode() |
boolean |
isEmpty() |
Set<String> |
keySet() |
Object |
put(String key,
Object value) |
void |
putAll(Map<? extends String,?> m) |
Object |
remove(Object key) |
VarObject |
set(String key,
Object value)
设置字段的值,增加了字段名和数据类型的校验,可以安全地设置数值
|
int |
size() |
String |
toString() |
Collection<Object> |
values() |
applyUpdate, beforeGet, beforeSet, bindRowid, calculateHashCode, clearQuery, clearUpdate, close, fieldIndex, getTail, hasQuery, hasUsed, isEquals, needUpdate, prepareUpdate, pull, pull, push, push, rowid, setTail, startUpdate, stopUpdate, touchUsedFlag, updateValueMap, useQueryclone, finalize, getClass, notify, notifyAll, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAllprotected VarObject()
public VarObject(TableMapping meta)
public VarObject(TableMapping meta, boolean recordField)
public List<VarObject> getList(String key)
key - ClassCastException - 当目标类型不能转换为List时public Collection<VarObject> getCollection(String key)
key - ClassCastException - 当目标类型不能转换为Collection时public <T> List<T> getList(String key, Class<T> clz)
key - clz - public <T> Collection<T> getCollection(String key, Class<T> clz)
key - ClassCastException - 当目标类型不能转换为Collection时public VarObject set(String key, Object value)
key - value - public boolean containsKey(Object key)
containsKey in interface Map<String,Object>public boolean containsValue(Object value)
containsValue in interface Map<String,Object>public int hashCode()
public boolean equals(Object obj)
Copyright © 2020. All rights reserved.