Class DefaultRoutingResolver
java.lang.Object
org.springframework.data.elasticsearch.core.routing.DefaultRoutingResolver
- All Implemented Interfaces:
RoutingResolver
Default implementation of the
RoutingResolver
interface. Returns null for the non-bean method and
delegates to the corresponding persistent entity for the bean-method.- Since:
- 4.2
- Author:
- Peter-Josef Meisch
-
Constructor Summary
ConstructorDescriptionDefaultRoutingResolver
(MappingContext<? extends ElasticsearchPersistentEntity<?>, ? extends ElasticsearchPersistentProperty> mappingContext) -
Method Summary
Modifier and TypeMethodDescriptionreturns the routing when no entity is available.<T> String
getRouting
(T bean) Returns the routing for a bean.
-
Constructor Details
-
DefaultRoutingResolver
public DefaultRoutingResolver(MappingContext<? extends ElasticsearchPersistentEntity<?>, ? extends ElasticsearchPersistentProperty> mappingContext)
-
-
Method Details
-
getRouting
Description copied from interface:RoutingResolver
returns the routing when no entity is available.- Specified by:
getRouting
in interfaceRoutingResolver
- Returns:
- the routing value
-
getRouting
Description copied from interface:RoutingResolver
Returns the routing for a bean.- Specified by:
getRouting
in interfaceRoutingResolver
- Parameters:
bean
- the bean to get the routing for- Returns:
- the routing value
-