public final class PassThroughFromIndexFieldValueConverter<F> extends Object implements FromIndexFieldValueConverter<F,F>
Constructor and Description |
---|
PassThroughFromIndexFieldValueConverter(Class<F> fieldType) |
Modifier and Type | Method and Description |
---|---|
F |
convert(F value,
FromIndexFieldValueConvertContext context) |
boolean |
isCompatibleWith(FromIndexFieldValueConverter<?,?> other) |
boolean |
isConvertedTypeAssignableTo(Class<?> superTypeCandidate)
Check whether converted values can be assigned to the given type.
|
public F convert(F value, FromIndexFieldValueConvertContext context)
convert
in interface FromIndexFieldValueConverter<F,F>
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 isConvertedTypeAssignableTo(Class<?> superTypeCandidate)
FromIndexFieldValueConverter
This method is generally implemented like this:
return superTypeCandidate.isAssignableFrom( TheConvertedType.class )
.
isConvertedTypeAssignableTo
in interface FromIndexFieldValueConverter<F,F>
superTypeCandidate
- A candidate type for assignment of converted values.true
if the converted type V
is a subtype of superTypeCandidate
,
false
otherwise.public boolean isCompatibleWith(FromIndexFieldValueConverter<?,?> other)
isCompatibleWith
in interface FromIndexFieldValueConverter<F,F>
other
- Another ToIndexFieldValueConverter
, never null
.true
if the given object behaves exactly the same as this object,
i.e. its FromIndexFieldValueConverter.isConvertedTypeAssignableTo(Class)
and FromIndexFieldValueConverter.convert(Object, FromIndexFieldValueConvertContext)
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-2018 Red Hat, Inc. and others. Licensed under the GNU Lesser General Public License (LGPL), version 2.1 or later.