public abstract class DBObject extends Object implements IEntity
Modifier and Type | Field and Description |
---|---|
protected boolean |
_recordUpdate |
protected Example |
query |
protected Map<DBField,Object> |
updateValueMap |
Constructor and Description |
---|
DBObject() |
Modifier and Type | Method and Description |
---|---|
void |
applyUpdate()
将UpdateValueMap中的值更新到实体字段中取(如果不相等)同时清除掉updateValueMap中的值
|
protected void |
beforeGet(String fieldname) |
protected void |
beforeSet(String fieldname) |
void |
bindRowid(String rowid)
指定rowid
|
protected int |
calculateHashCode() |
void |
clearQuery() |
void |
clearUpdate()
清除待更新数据
|
void |
close() |
int |
fieldIndex(String fieldName)
获取字段索引
|
Map<String,Object> |
getTail() |
boolean |
hasQuery() |
boolean |
hasUsed(DBField field)
判断该字段是否被赋值过
|
protected boolean |
isEquals(Object obj) |
boolean |
needUpdate()
判断是否需要更新
|
void |
prepareUpdate(DBField field,
Object newValue)
准备更新数据
|
Object |
pull(int fieldIndex)
拉取
获取类的属性的值 |
Object |
pull(String fieldName) |
boolean |
push(int fieldIndex,
Object value)
推
将一个值保存到类的属性中 |
boolean |
push(String fieldName,
Object value) |
String |
rowid()
如果是oracle得到rowid
|
void |
setTail(Map<String,Object> tail) |
void |
startUpdate()
打开字段更新记录开关
|
void |
stopUpdate()
关闭字段更新记录开关
|
void |
touchUsedFlag(DBField field,
boolean flag)
将某个字段标记为是否赋值过
|
Map<DBField,Object> |
updateValueMap()
获取目前的updateMap
|
Example |
useQuery()
使用查询
|
protected transient boolean _recordUpdate
protected transient Example query
public final Example useQuery()
public final boolean hasQuery()
public final void clearQuery()
public final void startUpdate()
IEntity
startUpdate
in interface IEntity
public final void stopUpdate()
IEntity
stopUpdate
in interface IEntity
public final boolean hasUsed(DBField field)
IEntity
public final void clearUpdate()
IDML
clearUpdate
in interface IDML
public final Map<DBField,Object> updateValueMap()
IDML
updateValueMap
in interface IDML
public final void prepareUpdate(DBField field, Object newValue)
IDML
prepareUpdate
in interface IDML
public final void applyUpdate()
IDML
applyUpdate
in interface IDML
public final boolean needUpdate()
IDML
needUpdate
in interface IDML
protected final int calculateHashCode()
protected final void beforeSet(String fieldname)
protected final void beforeGet(String fieldname)
protected final boolean isEquals(Object obj)
public void touchUsedFlag(DBField field, boolean flag)
IEntity
touchUsedFlag
in interface IEntity
field
- 字段flag
- true表示这个字段赋值过,false表示没有public void close() throws Exception
close
in interface AutoCloseable
Exception
public int fieldIndex(String fieldName)
fieldIndex
in interface IAssignValue
fieldName
- public boolean push(int fieldIndex, Object value)
push
in interface IAssignValue
fieldIndex
- 属性名称value
- 属性值public boolean push(String fieldName, Object value)
push
in interface IAssignValue
public Object pull(int fieldIndex)
pull
in interface IAssignValue
fieldIndex
- public Object pull(String fieldName)
pull
in interface IAssignValue
Copyright © 2020. All rights reserved.