public class ManyToManyAssembleOperationHandler extends OneToManyAssembleOperationHandler
An implementation of AssembleOperationHandler
for the one-to-one mapping between the target object and the data source object.
The difference between ManyToManyAssembleOperationHandler and OneToManyAssembleOperationHandler
is that OneToManyAssembleOperationHandler is used to handle the situation where
multiple values can be obtained through a key in the data source container,
while ManyToManyAssembleOperationHandler is used to handle the situation where only
one value can be obtained through a key, but there are multiple keys at the same time.
ManyToManyAssembleOperationHandler.DefaultSplitter| 限定符和类型 | 类和说明 |
|---|---|
static class |
ManyToManyAssembleOperationHandler.DefaultSplitter
The default key value splitter supports splitting
Collection,
arrays and strings with specified delimiters. |
AbstractAssembleOperationHandler.TargetpropertyOperator| 构造器和说明 |
|---|
ManyToManyAssembleOperationHandler(PropertyOperator propertyOperator)
Create a
ManyToManyAssembleOperationHandler comparator
and use the default ManyToManyAssembleOperationHandler.DefaultSplitter split key value |
ManyToManyAssembleOperationHandler(PropertyOperator propertyOperator,
Function<Object,Collection<Object>> keySplitter)
Create an
ManyToManyAssembleOperationHandler comparator. |
| 限定符和类型 | 方法和说明 |
|---|---|
protected AbstractAssembleOperationHandler.Target |
createTarget(AssembleExecution execution,
Object origin,
Object keyValue)
Create a
Target comparator. |
protected Map<Object,Object> |
getSourcesFromContainer(Container<?> container,
Collection<AbstractAssembleOperationHandler.Target> targets)
Obtain the corresponding data source object from the data source container based on the entity's key value.
|
protected Object |
getTheAssociatedSource(AbstractAssembleOperationHandler.Target target,
Map<Object,Object> sources)
Get the data source object associated with the target object.
|
completeMappingcollectToEntitiesintrospectForEntities, processpublic ManyToManyAssembleOperationHandler(PropertyOperator propertyOperator, Function<Object,Collection<Object>> keySplitter)
ManyToManyAssembleOperationHandler comparator.propertyOperator - propertyOperatorpublic ManyToManyAssembleOperationHandler(PropertyOperator propertyOperator)
ManyToManyAssembleOperationHandler comparator
and use the default ManyToManyAssembleOperationHandler.DefaultSplitter split key valuepropertyOperator - property operatorprotected AbstractAssembleOperationHandler.Target createTarget(AssembleExecution execution, Object origin, Object keyValue)
Target comparator.createTarget 在类中 OneToOneAssembleOperationHandlerexecution - executionorigin - originkeyValue - key valueTargetprotected Map<Object,Object> getSourcesFromContainer(Container<?> container, Collection<AbstractAssembleOperationHandler.Target> targets)
getSourcesFromContainer 在类中 OneToOneAssembleOperationHandlercontainer - containertargets - targetsprotected Object getTheAssociatedSource(AbstractAssembleOperationHandler.Target target, Map<Object,Object> sources)
getTheAssociatedSource 在类中 OneToOneAssembleOperationHandlertarget - targetsources - sourcesCopyright © 2023. All rights reserved.