| 限定符和类型 | 方法和说明 |
|---|---|
void |
Container.process(List<Object> targets,
List<AssembleOperation> operations)
根据指定配置处理数据
|
void |
EnumDictContainer.process(List<Object> targets,
List<AssembleOperation> operations) |
void |
KeyValueContainer.process(List<Object> targets,
List<AssembleOperation> operations) |
| 限定符和类型 | 方法和说明 |
|---|---|
protected List<PairEntry<K,String>> |
BaseContainer.getKeyEntersFromTarget(Object target,
List<AssembleOperation> operations)
从对象中获取所需要的数据源id
|
protected List<PairEntry<K,String>> |
BaseContainer.getKeyEntersFromTargets(List<Object> targets,
List<AssembleOperation> operations)
将对象集合转为所需要的数据源id
|
void |
BaseContainer.process(List<Object> targets,
List<AssembleOperation> operations) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
BeanReflexAssembler.execute(Object target,
Object source,
AssembleOperation operation) |
Object |
BeanReflexAssembler.getKey(Object target,
AssembleOperation operation) |
protected void |
BeanReflexAssembler.processIfArraySource(Class<?> targetClass,
Object target,
Object[] source,
AssembleProperty property,
AssembleOperation operation)
若数据源类型为数组,则将数组值填充至目标实例的指定属性中
|
protected void |
BeanReflexAssembler.processIfCollectionSource(Class<?> targetClass,
Object target,
Collection<?> source,
AssembleProperty property,
AssembleOperation operation)
若数据源类型为集合,则将数组值填充至目标实例的指定属性中
|
protected void |
BeanReflexAssembler.processIfNonProperties(Class<?> targetClass,
Object target,
Object source,
AssembleOperation operation)
若未配置任何字段,则直接使用数据源填充注解字段
|
protected void |
BeanReflexAssembler.processIfObjectSource(Class<?> targetClass,
Object target,
Class<?> sourceClass,
Object source,
AssembleProperty property,
AssembleOperation operation)
若数据源类型为对象或Map集合:
1.若数据源存在引用字段,则将数据源对应字段的值填充至目标实例的指定属性中;
2.若数据源不存在引用字段,则将数据源对象填充至目标实例指定属性中;
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
JacksonAssembler.execute(Object target,
Object source,
AssembleOperation operation) |
protected com.fasterxml.jackson.databind.JsonNode |
JacksonAssembler.findKeyNode(com.fasterxml.jackson.databind.JsonNode target,
AssembleOperation operation)
先寻找ObjectMapper的命名规则处理后的key字段名对应的节点,若不存在,则再根据别名寻找至少一个存在的别名字段对应的节点
|
Object |
JacksonAssembler.getKey(Object target,
AssembleOperation operation)
找到JsonNode中注解字段对应的节点,并返回其
JsonNode.asText()。 |
protected String |
JacksonAssembler.getTranslatedKeyPropertyName(AssembleOperation operation)
将key字段名按ObjectMapper的配置转换
|
protected void |
JacksonAssembler.processIfNonProperties(com.fasterxml.jackson.databind.node.ObjectNode target,
com.fasterxml.jackson.databind.JsonNode source,
AssembleOperation operation)
若无具体字段配置,则将注解字段以及别名在目标节点中对应的字段节点全部替换为从容器中获取的数据源对应节点
|
protected void |
JacksonAssembler.processPropertyIfArraySourceNode(com.fasterxml.jackson.databind.node.ObjectNode target,
com.fasterxml.jackson.databind.node.ArrayNode source,
AssembleProperty property,
AssembleOperation operation)
若数据源节点为集合类型,则根据字段配置将其字段替换或追加到当前目标节点中
|
protected void |
JacksonAssembler.processPropertyIfObjectSourceNode(com.fasterxml.jackson.databind.node.ObjectNode target,
com.fasterxml.jackson.databind.node.ObjectNode source,
AssembleProperty property,
AssembleOperation operation)
若数据源节点为对象类型,则根据字段配置将其字段替换或追加到当前目标节点中
|
protected void |
JacksonAssembler.processPropertyIfValueSourceNode(com.fasterxml.jackson.databind.node.ObjectNode target,
com.fasterxml.jackson.databind.node.ValueNode source,
AssembleProperty property,
AssembleOperation operation)
若数据源节点为值类型,则根据字段配置将其字段替换或追加到当前目标节点中
|
| 限定符和类型 | 方法和说明 |
|---|---|
protected void |
UnorderedOperationExecutor.execute(org.springframework.util.MultiValueMap<Container,PairEntry<AssembleOperation,?>> pendingOperations) |
protected void |
UnorderedOperationExecutor.processAssembleOperations(Collection<?> targets,
OperationConfiguration configuration,
org.springframework.util.MultiValueMap<Container,PairEntry<AssembleOperation,?>> pendingProcessors) |
protected void |
UnorderedOperationExecutor.processDisassembleOperations(Collection<?> targets,
OperationConfiguration configuration,
org.springframework.util.MultiValueMap<Container,PairEntry<AssembleOperation,?>> pendingOperations) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
Assembler.execute(Object target,
Object source,
AssembleOperation operation)
根据配置完成装配操作
|
Object |
Assembler.getKey(Object target,
AssembleOperation operation)
从实例中获取所需的key字段数据
|
| 限定符和类型 | 类和说明 |
|---|---|
class |
BeanAssembleOperation |
| 限定符和类型 | 方法和说明 |
|---|---|
protected AssembleOperation |
BeanOperateConfigurationParser.createAssembleOperation(Field property,
Assemble annotation,
BeanOperationConfiguration configuration)
|
| 限定符和类型 | 方法和说明 |
|---|---|
protected List<AssembleOperation> |
BeanOperateConfigurationParser.parseAssemblerAnnotation(Field property,
BeanOperationConfiguration configuration)
解析
Assemble注解 |
| 限定符和类型 | 方法和说明 |
|---|---|
List<AssembleOperation> |
OperationConfiguration.getAssembleOperations()
获取待处理的装配操作
|
| 限定符和类型 | 方法和说明 |
|---|---|
default int |
AssembleOperation.compareTo(AssembleOperation o) |
Copyright © 2022. All rights reserved.