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