F - The type of source values obtained from the backend.V - The type of projected values.public final class ProjectionConverter<F,V> extends Object
| Constructor and Description |
|---|
ProjectionConverter(Class<V> valueType,
FromDocumentFieldValueConverter<F,V> delegate) |
| Modifier and Type | Method and Description |
|---|---|
V |
convert(F value,
FromDocumentFieldValueConvertContext context) |
boolean |
isCompatibleWith(ProjectionConverter<?,?> other) |
boolean |
isConvertedTypeAssignableTo(Class<?> superTypeCandidate)
Check whether converted values can be assigned to the given type.
|
String |
toString() |
Class<V> |
valueType() |
public ProjectionConverter(Class<V> valueType, FromDocumentFieldValueConverter<F,V> delegate)
public boolean isConvertedTypeAssignableTo(Class<?> superTypeCandidate)
superTypeCandidate - A candidate type for assignment of converted values.true if the converted type V is a subtype of superTypeCandidate,
false otherwise.public V convert(F value, FromDocumentFieldValueConvertContext context)
value - The index field value to convert.context - A context that can be
extended
to a more useful type, giving access to such things as a Hibernate ORM Session (if using the Hibernate ORM mapper).public boolean isCompatibleWith(ProjectionConverter<?,?> other)
other - Another DslConverter, never null.true if the given object behaves exactly the same as this object,
i.e. its isConvertedTypeAssignableTo(Class) and convert(Object, FromDocumentFieldValueConvertContext)
methods are guaranteed to always return the same value as this object's
when given the same input. false otherwise, or when in doubt.Copyright © 2006-2020 Red Hat, Inc. and others. Licensed under the GNU Lesser General Public License (LGPL), version 2.1 or later.