@Documented @Target(value={}) @Retention(value=RUNTIME) public @interface RoutingKeyBridgeRef
RoutingKeyBridgeMapping
.
Either a bridge or an annotation bridge builder can be provided, but never both. Reference can be obtained using either a name or a type.
If a direct bridge is provided, using the methods name()
or type()
,
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.
If an annotation bridge builder is provided, using the methods builderName()
or builderType()
,
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.
Modifier and Type | Optional Element and Description |
---|---|
String |
builderName
Provide the annotation bridge builder name to get the bridge reference.
|
Class<? extends AnnotationBridgeBuilder<? extends RoutingKeyBridge,?>> |
builderType
Provide the annotation bridge builder type to get the bridge reference.
|
String |
name
Provide the bridge name to get the bridge reference.
|
Class<? extends RoutingKeyBridge> |
type
Provide the bridge type to get the bridge reference.
|
public abstract String name
public abstract Class<? extends RoutingKeyBridge> type
public abstract String builderName
public abstract Class<? extends AnnotationBridgeBuilder<? extends RoutingKeyBridge,?>> builderType
Copyright © 2006-2019 Red Hat, Inc. and others. Licensed under the GNU Lesser General Public License (LGPL), version 2.1 or later.