public class CustomConversions extends Object
Converter that can be used for mapping objects to (
WritingConverter) and from (ReadingConverter) solr representation.| Constructor and Description |
|---|
CustomConversions()
Create new instance
|
CustomConversions(List converters)
Create new instance registering given converters
|
| Modifier and Type | Method and Description |
|---|---|
Class<?> |
getCustomWriteTarget(Class<?> source)
find most recent write target for given class
|
Class<?> |
getCustomWriteTarget(Class<?> sourceType,
Class<?> targetType)
find most recent write target for given source and targetType
|
boolean |
hasCustomReadTarget(Class<?> sourceType,
Class<?> targetType)
check if custom read target available for given types
|
boolean |
hasCustomWriteTarget(Class<?> sourceType,
Class<?> targetType)
check if custom write target available for given types
|
boolean |
isSimpleType(Class<?> clazz) |
void |
registerConvertersIn(GenericConversionService conversionService)
Register custom converters within given
GenericConversionService |
public CustomConversions()
public CustomConversions(List converters)
converters - public void registerConvertersIn(GenericConversionService conversionService)
GenericConversionServiceconversionService - must not be nullpublic boolean isSimpleType(Class<?> clazz)
clazz - public Class<?> getCustomWriteTarget(Class<?> source)
source - must not be nullpublic Class<?> getCustomWriteTarget(Class<?> sourceType, Class<?> targetType)
sourceType - targetType - public boolean hasCustomReadTarget(Class<?> sourceType, Class<?> targetType)
sourceType - targetType - Copyright © 2011-2015–2017 Pivotal Software, Inc.. All rights reserved.