Annotation Interface Merge


@Target(METHOD) @Retention(RUNTIME) @Bean public @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 Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    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 implementing MergeBeanStatusProvider 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 merge
    Alias for targetRef()
  • Element Details

    • value

      @AliasFor("targetRef") String value
      Alias for targetRef()
      Default:
      ""
    • targetRef

      @AliasFor("value") String targetRef
      The Spring bean id of the target collection or map to receive the merge
      Default:
      ""
    • placement

      Placement placement
      Specifies how the annotated collection, map or single bean should be inserted into the target collection or map. Default to Placement.APPEND.
      Default:
      APPEND
    • position

      int position
      The position in the target map or collection the annotated collection, map or single bean should be inserted. Only meaningful when the placement() param is set to Placement.SPECIFIC.
      Default:
      0
    • statusProvider

      Specify a class implementing MergeBeanStatusProvider 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.
      See Also:
      Default:
      org.broadleafcommerce.common.extensibility.context.merge.MergeBeanStatusProvider.class
    • early

      boolean early
      Whether 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