public class ExpressibleOperateHandlerChain extends Object implements OperateHandlerChain
| 构造器和说明 |
|---|
ExpressibleOperateHandlerChain() |
| 限定符和类型 | 方法和说明 |
|---|---|
OperateHandlerChain |
addHandler(OperateHandler handler)
添加处理器节点
|
int |
getOrder()
排序值,值越小则优先级越高,排序越靠前
一般情况下,实例若存在 Order注解,则其对应的方法返回值应当与注解值保持一致,
若不一致时,应当以Order为准。 |
List<OperateHandler> |
handlers()
获取处理器链
|
Object |
readFromSource(Object source,
AssembleProperty property,
Operation operation)
从数据源中获取数据。
|
boolean |
sourceCanRead(Object source,
AssembleProperty property,
Operation operation)
处理器链中是否存在可以从数据源中读取数据的节点
|
boolean |
targetCanWrite(Object sourceData,
Object target,
AssembleProperty property,
AssembleOperation operation)
处理器链中是否存在可以将数据源数据写入待处理对象的节点
|
void |
writeToTarget(Object sourceData,
Object target,
AssembleProperty property,
AssembleOperation operation)
将数据源中获取的数据写入待处理对象。
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcomparator, compareTopublic int getOrder()
OrderlyOrder注解,则其对应的方法返回值应当与注解值保持一致,
若不一致时,应当以Order为准。public List<OperateHandler> handlers()
OperateHandlerChainhandlers 在接口中 OperateHandlerChainpublic OperateHandlerChain addHandler(OperateHandler handler)
OperateHandlerChainaddHandler 在接口中 OperateHandlerChainhandler - 处理器节点public boolean sourceCanRead(Object source, AssembleProperty property, Operation operation)
OperateHandlerChainsourceCanRead 在接口中 OperateHandlersourceCanRead 在接口中 OperateHandlerChainsource - 数据源property - 待处理字段operation - 字段配置public boolean targetCanWrite(Object sourceData, Object target, AssembleProperty property, AssembleOperation operation)
OperateHandlerChaintargetCanWrite 在接口中 OperateHandlertargetCanWrite 在接口中 OperateHandlerChainsourceData - 从数据源获取的数据target - 待处理对象property - 待处理字段operation - 字段配置public Object readFromSource(Object source, AssembleProperty property, Operation operation)
OperateHandlerChainreadFromSource 在接口中 OperateHandlerreadFromSource 在接口中 OperateHandlerChainsource - 数据源property - 待处理字段operation - 字段配置public void writeToTarget(Object sourceData, Object target, AssembleProperty property, AssembleOperation operation)
OperateHandlerChainwriteToTarget 在接口中 OperateHandlerwriteToTarget 在接口中 OperateHandlerChainsourceData - 从数据源获取的数据target - 待处理对象property - 待处理字段operation - 字段配置Copyright © 2022. All rights reserved.