public interface OperateHandlerChain extends OperateHandler
Assembler中用于从不同类型的数据源中根据配置获取所需要的数据,
并将数据填充到不同类型的对象中。| 限定符和类型 | 方法和说明 |
|---|---|
OperateHandlerChain |
addHandler(OperateHandler handler)
添加处理器节点
|
List<OperateHandler> |
handlers()
获取处理器链
|
default Object |
readFromSource(Object source,
AssembleProperty property,
Operation operation)
从数据源中获取数据。
|
default boolean |
sourceCanRead(Object source,
AssembleProperty property,
Operation operation)
处理器链中是否存在可以从数据源中读取数据的节点
|
default boolean |
targetCanWrite(Object sourceData,
Object target,
AssembleProperty property,
AssembleOperation operation)
处理器链中是否存在可以将数据源数据写入待处理对象的节点
|
default void |
writeToTarget(Object sourceData,
Object target,
AssembleProperty property,
AssembleOperation operation)
将数据源中获取的数据写入待处理对象。
|
comparator, compareTo, getOrderList<OperateHandler> handlers()
OperateHandlerChain addHandler(OperateHandler handler)
handler - 处理器节点default boolean sourceCanRead(Object source, AssembleProperty property, Operation operation)
sourceCanRead 在接口中 OperateHandlersource - 数据源property - 待处理字段operation - 字段配置default boolean targetCanWrite(Object sourceData, Object target, AssembleProperty property, AssembleOperation operation)
targetCanWrite 在接口中 OperateHandlersourceData - 从数据源获取的数据target - 待处理对象property - 待处理字段operation - 字段配置default Object readFromSource(Object source, AssembleProperty property, Operation operation)
readFromSource 在接口中 OperateHandlersource - 数据源property - 待处理字段operation - 字段配置default void writeToTarget(Object sourceData, Object target, AssembleProperty property, AssembleOperation operation)
writeToTarget 在接口中 OperateHandlersourceData - 从数据源获取的数据target - 待处理对象property - 待处理字段operation - 字段配置Copyright © 2022. All rights reserved.