public final class PassThroughToIndexFieldValueConverter<F> extends Object implements ToIndexFieldValueConverter<F,F>
Constructor and Description |
---|
PassThroughToIndexFieldValueConverter(Class<F> valueType) |
Modifier and Type | Method and Description |
---|---|
F |
convert(F value,
ToIndexFieldValueConvertContext context) |
F |
convertUnknown(Object value,
ToIndexFieldValueConvertContext context)
Convert an input value of unknown type that may not have the required type
V . |
boolean |
isCompatibleWith(ToIndexFieldValueConverter<?,?> other) |
String |
toString() |
public F convert(F value, ToIndexFieldValueConvertContext context)
convert
in interface ToIndexFieldValueConverter<F,F>
value
- The source value to convert.context
- A context that can be
extended
to a more useful type, giving access to such things as a Hibernate ORM SessionFactory (if using the Hibernate ORM mapper).public F convertUnknown(Object value, ToIndexFieldValueConvertContext context)
ToIndexFieldValueConverter
V
.
Called when passing values to the predicate DSL in particular.
convertUnknown
in interface ToIndexFieldValueConverter<F,F>
value
- The value to convert.context
- A context that can be
extended
to a more useful type, giving access to such things as a Hibernate ORM SessionFactory (if using the Hibernate ORM mapper).public boolean isCompatibleWith(ToIndexFieldValueConverter<?,?> other)
isCompatibleWith
in interface ToIndexFieldValueConverter<F,F>
other
- Another ToIndexFieldValueConverter
, never null
.true
if the given object behaves exactly the same as this object,
i.e. its ToIndexFieldValueConverter.convert(Object, ToIndexFieldValueConvertContext)
and ToIndexFieldValueConverter.convertUnknown(Object, ToIndexFieldValueConvertContext)
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.