@Documented @Target(value=ANNOTATION_TYPE) @Retention(value=RUNTIME) public @interface RoutingKeyBridgeMapping
Modifier and Type | Optional Element and Description |
---|---|
RoutingKeyBridgeReference |
bridge
Map a routing key bridge to an annotation type.
|
RoutingKeyBridgeAnnotationBuilderReference |
builder
Map a routing key bridge builder to an annotation type.
|
public abstract RoutingKeyBridgeReference bridge
Each time the mapped annotation is encountered, an instance of the routing key bridge will be created and applied to the location where the annotation was found.
Routing key bridges mapped this way cannot be parameterized:
any attribute of the mapped annotation will be ignored.
See builder()
to take advantage of the annotation attributes.
This attribute cannot be used in the same RoutingKeyBridgeMapping
annotation
as builder()
: either a bridge or a bridge builder can be provided, but never both.
public abstract RoutingKeyBridgeAnnotationBuilderReference builder
Each time the mapped annotation is encountered, an instance of the routing key bridge builder will be created.
The builder will be passed the annotation through its
AnnotationBridgeBuilder.initialize(Annotation)
method,
and then the bridge will be retrieved by calling BridgeBuilder.build(org.hibernate.search.mapper.pojo.bridge.mapping.BridgeBuildContext)
.
Routing key bridges mapped this way can be parameterized:
the bridge will be able to take any attribute of the mapped annotation into account
in its AnnotationBridgeBuilder.initialize(Annotation)
method.
This attribute cannot be used in the same RoutingKeyBridgeMapping
annotation
as bridge()
: either a bridge or a bridge builder can be provided, but never both.
Copyright © 2006-2018 Red Hat, Inc. and others. Licensed under the GNU Lesser General Public License (LGPL), version 2.1 or later.