com.bstek.dorado.data.entity
public abstract class EntityEnhancer extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected EntityDataType |
dataType |
protected static java.lang.Object |
UNDISPOSED_VALUE |
Constructor and Description |
---|
EntityEnhancer(EntityDataType dataType) |
Modifier and Type | Method and Description |
---|---|
void |
clearOldValues()
清除当前保存的所有初始值。
|
static void |
disableGetterInterception()
禁用dorado对数据实体中属性的read方法的动态代理。
注意,此方法并不禁止对EL表达式进行求值的动态代理。 |
protected abstract java.util.Set<java.lang.String> |
doGetPropertySet(java.lang.Object entity,
boolean excludeExProperties) |
static void |
enableGetterInterception()
启用dorado对数据实体中属性的read方法的动态代理。
|
EntityDataType |
getDataType() |
int |
getEntityId() |
java.util.Map<java.lang.String,java.lang.Object> |
getExProperties() |
protected java.util.Map<java.lang.String,java.lang.Object> |
getExProperties(boolean create) |
static long |
getLastTimeStamp() |
java.util.Map<java.lang.String,java.lang.Object> |
getOldValues()
返回原始值的Map集合。该Map中的键值为属性名,值为相应的原始值。
|
java.util.Map<java.lang.String,java.lang.Object> |
getOldValues(boolean create)
返回原始值的Map集合。该Map中的键值为属性名,值为相应的原始值。
|
java.util.Set<java.lang.String> |
getPropertySet(java.lang.Object entity,
boolean excludeExProperties) |
java.lang.Class<?> |
getPropertyType(java.lang.Object entity,
java.lang.String property) |
EntityState |
getState() |
long |
getTimeStamp() |
static boolean |
hasGetterResultSkiped()
返回最后一次读取实体对象属性时是否发生了属性方法拦截器被跳过的现象。
|
protected java.lang.Object |
interceptReadMethod(java.lang.Object entity,
java.lang.String property,
java.lang.Object originResult,
boolean isExProp) |
protected boolean |
interceptWriteMethod(java.lang.Object entity,
java.lang.String property,
java.lang.Object newValue,
boolean isExProp) |
protected abstract java.lang.Object |
internalReadProperty(java.lang.Object entity,
java.lang.String property) |
protected java.lang.Object |
internalReadProperty(java.lang.Object entity,
java.lang.String property,
boolean isExProp) |
protected abstract void |
internalWriteProperty(java.lang.Object entity,
java.lang.String property,
java.lang.Object value) |
protected void |
internalWriteProperty(java.lang.Object entity,
java.lang.String property,
java.lang.Object value,
boolean isExProp) |
static boolean |
isGetterInterceptionDisabled()
是否禁用了数据实体中属性的read方法中的部分动态代理。
|
boolean |
isLoaded(java.lang.String property) |
protected boolean |
isPropertyHasRead(java.lang.String property) |
boolean |
isStateLocked() |
boolean |
loadIfNecessary(java.lang.Object entity,
java.lang.String property) |
protected void |
markPropertyHasRead(java.lang.String property) |
static int |
newEntityId() |
static long |
newTimeStamp() |
abstract java.lang.Object |
readProperty(java.lang.Object entity,
java.lang.String property,
boolean ignoreInterceptors) |
static void |
resetHasPropertyResultSkiped()
重置用于标识是否发生了属性方法拦截器被跳过的标志。
|
void |
setDataType(EntityDataType dataType) |
void |
setEntityId(int entityId) |
static void |
setHasGetterResultSkiped()
设置发生了属性方法拦截器被跳过的标志。
|
void |
setState(EntityState state) |
void |
setStateLocked(boolean stateLocked) |
void |
setTimeStamp(long timeStamp) |
abstract void |
writeProperty(java.lang.Object entity,
java.lang.String property,
java.lang.Object value) |
protected static final java.lang.Object UNDISPOSED_VALUE
protected EntityDataType dataType
public EntityEnhancer(EntityDataType dataType)
public void setDataType(EntityDataType dataType)
public EntityDataType getDataType()
public static void disableGetterInterception()
public static void enableGetterInterception()
public static boolean isGetterInterceptionDisabled()
public static boolean hasGetterResultSkiped()
public static void setHasGetterResultSkiped()
public static void resetHasPropertyResultSkiped()
public static int newEntityId()
public static long getLastTimeStamp()
public static long newTimeStamp()
public int getEntityId()
public void setEntityId(int entityId)
public long getTimeStamp()
public void setTimeStamp(long timeStamp)
public EntityState getState()
public void setState(EntityState state)
public boolean isStateLocked()
public void setStateLocked(boolean stateLocked)
protected abstract java.util.Set<java.lang.String> doGetPropertySet(java.lang.Object entity, boolean excludeExProperties)
public java.util.Set<java.lang.String> getPropertySet(java.lang.Object entity, boolean excludeExProperties)
protected java.util.Map<java.lang.String,java.lang.Object> getExProperties(boolean create)
public java.util.Map<java.lang.String,java.lang.Object> getExProperties()
public java.util.Map<java.lang.String,java.lang.Object> getOldValues(boolean create)
create
- 如果原始值集合上不存在,则创建一个全新的原始值集合。public java.util.Map<java.lang.String,java.lang.Object> getOldValues()
public void clearOldValues()
public boolean isLoaded(java.lang.String property)
public boolean loadIfNecessary(java.lang.Object entity, java.lang.String property) throws java.lang.Throwable
java.lang.Throwable
protected void markPropertyHasRead(java.lang.String property)
protected boolean isPropertyHasRead(java.lang.String property)
protected abstract java.lang.Object internalReadProperty(java.lang.Object entity, java.lang.String property) throws java.lang.Exception
java.lang.Exception
protected abstract void internalWriteProperty(java.lang.Object entity, java.lang.String property, java.lang.Object value) throws java.lang.Exception
java.lang.Exception
protected final java.lang.Object internalReadProperty(java.lang.Object entity, java.lang.String property, boolean isExProp) throws java.lang.Exception
java.lang.Exception
protected final void internalWriteProperty(java.lang.Object entity, java.lang.String property, java.lang.Object value, boolean isExProp) throws java.lang.Exception
java.lang.Exception
protected java.lang.Object interceptReadMethod(java.lang.Object entity, java.lang.String property, java.lang.Object originResult, boolean isExProp) throws java.lang.Throwable
java.lang.Throwable
protected boolean interceptWriteMethod(java.lang.Object entity, java.lang.String property, java.lang.Object newValue, boolean isExProp) throws java.lang.Exception
java.lang.Exception
public java.lang.Class<?> getPropertyType(java.lang.Object entity, java.lang.String property)
public abstract java.lang.Object readProperty(java.lang.Object entity, java.lang.String property, boolean ignoreInterceptors) throws java.lang.Throwable
java.lang.Throwable
public abstract void writeProperty(java.lang.Object entity, java.lang.String property, java.lang.Object value) throws java.lang.Throwable
java.lang.Throwable
Copyright © 2001-2011 www.BSTEK.com All Rights Reserved.