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()
IEntitystartUpdate in interface IEntitypublic final void stopUpdate()
IEntitystopUpdate in interface IEntitypublic final boolean hasUsed(DBField field)
IEntitypublic final void clearUpdate()
IDMLclearUpdate in interface IDMLpublic final Map<DBField,Object> updateValueMap()
IDMLupdateValueMap in interface IDMLpublic final void prepareUpdate(DBField field, Object newValue)
IDMLprepareUpdate in interface IDMLpublic final void applyUpdate()
IDMLapplyUpdate in interface IDMLpublic final boolean needUpdate()
IDMLneedUpdate in interface IDMLprotected 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)
IEntitytouchUsedFlag in interface IEntityfield - 字段flag - true表示这个字段赋值过,false表示没有public void close()
throws Exception
close in interface AutoCloseableExceptionpublic int fieldIndex(String fieldName)
fieldIndex in interface IAssignValuefieldName - public boolean push(int fieldIndex,
Object value)
push in interface IAssignValuefieldIndex - 属性名称value - 属性值public boolean push(String fieldName, Object value)
push in interface IAssignValuepublic Object pull(int fieldIndex)
pull in interface IAssignValuefieldIndex - public Object pull(String fieldName)
pull in interface IAssignValueCopyright © 2020. All rights reserved.