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