Annotation Interface Merge
Provides a convenience annotation for declaring a bean merge into an existing collection of beans (presumably a
pre-existing Broadleaf Commerce collection).
Merges may be declared for a single member, collection or map. Targets may be collections or maps. Please note,
if the target is a map, the source element must be a MapFactoryBean. However, if the target is a collection, the source
map be a single bean, a ListFactoryBean, or a SetFactoryBean.
- Author:
- Jeff Fischer
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionboolean
Whether or not this merge should take place early, before entityManagerFactory configuration.Specifies how the annotated collection, map or single bean should be inserted into the target collection or map.int
The position in the target map or collection the annotated collection, map or single bean should be inserted.Specify a class implementingMergeBeanStatusProvider
that can be used to conditionally determine if the merge should take place.The Spring bean id of the target collection or map to receive the mergeAlias fortargetRef()
-
Element Details
-
value
Alias fortargetRef()
- Default:
- ""
-
targetRef
The Spring bean id of the target collection or map to receive the merge- Default:
- ""
-
placement
Placement placementSpecifies how the annotated collection, map or single bean should be inserted into the target collection or map. Default toPlacement.APPEND
.- Default:
- APPEND
-
position
int positionThe position in the target map or collection the annotated collection, map or single bean should be inserted. Only meaningful when theplacement()
param is set toPlacement.SPECIFIC
.- Default:
- 0
-
statusProvider
Class<MergeBeanStatusProvider> statusProviderSpecify a class implementingMergeBeanStatusProvider
that can be used to conditionally determine if the merge should take place. The class will be instantiated and executed at runtime during bean post processing.- Default:
- org.broadleafcommerce.common.extensibility.context.merge.MergeBeanStatusProvider.class
-
early
boolean earlyWhether or not this merge should take place early, before entityManagerFactory configuration. This is useful if the merge should take place before entity processing. Usually declared as true in conjunction with merges that impact entity load time weaving. The default is false.- Default:
- false
-