@Documented @Target(value=ANNOTATION_TYPE) @Retention(value=RUNTIME) public @interface TypeBridgeMapping
Modifier and Type | Optional Element and Description |
---|---|
TypeBridgeReference |
bridge
Map a type bridge to an annotation type.
|
TypeBridgeAnnotationBuilderReference |
builder
Map a type bridge builder to an annotation type.
|
public abstract TypeBridgeReference bridge
Each time the mapped annotation is encountered, an instance of the type bridge will be created and applied to the location where the annotation was found.
Type 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 TypeBridgeMapping
annotation
as builder()
: either a bridge or a bridge builder can be provided, but never both.
public abstract TypeBridgeAnnotationBuilderReference builder
Each time the mapped annotation is encountered, an instance of the type 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)
.
Type 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 TypeBridgeMapping
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.