Class ConstantProjectionDefinition<T>
java.lang.Object
org.hibernate.search.engine.search.projection.definition.spi.AbstractProjectionDefinition<T>
org.hibernate.search.engine.search.projection.definition.spi.ConstantProjectionDefinition<T>
- All Implemented Interfaces:
ProjectionDefinition<T>
,ToStringTreeAppendable
@Incubating
public final class ConstantProjectionDefinition<T>
extends AbstractProjectionDefinition<T>
-
Method Summary
Modifier and TypeMethodDescriptionvoid
appendTo
(ToStringTreeAppender appender) Appends information aboutthis
to the givenappender
.create
(ProjectionDefinitionContext context) Creates a projection with a specific projected type.static <T> BeanHolder
<ConstantProjectionDefinition<T>> empty
(ProjectionCollector.Provider<?, T> collector) static <T> BeanHolder
<ConstantProjectionDefinition<List<T>>> Deprecated.static <T> BeanHolder
<ConstantProjectionDefinition<T>> protected String
type()
Methods inherited from class org.hibernate.search.engine.search.projection.definition.spi.AbstractProjectionDefinition
toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.hibernate.search.engine.search.projection.definition.ProjectionDefinition
create
Methods inherited from interface org.hibernate.search.util.common.spi.ToStringTreeAppendable
toStringTree
-
Method Details
-
nullValue
-
emptyList
@Deprecated(since="8.0") public static <T> BeanHolder<ConstantProjectionDefinition<List<T>>> emptyList()Deprecated.Useempty(ProjectionCollector.Provider)
instead. -
empty
public static <T> BeanHolder<ConstantProjectionDefinition<T>> empty(ProjectionCollector.Provider<?, T> collector) -
type
- Specified by:
type
in classAbstractProjectionDefinition<T>
-
appendTo
Description copied from interface:ToStringTreeAppendable
Appends information aboutthis
to the givenappender
.WARNING: This generally shouldn't be called directly, as
ToStringTreeAppender
will automatically call this method forToStringTreeAppendable
values passed toToStringTreeAppender.attribute(String, Object)
/ToStringTreeAppender.value(Object)
.Implementations should assume that calls to
ToStringTreeAppender.startObject()
/ToStringTreeAppender.endObject()
forthis
are handled by the caller.- Specified by:
appendTo
in interfaceToStringTreeAppendable
- Overrides:
appendTo
in classAbstractProjectionDefinition<T>
- Parameters:
appender
- AToStringTreeAppender
.
-
create
Description copied from interface:ProjectionDefinition
Creates a projection with a specific projected type.- Parameters:
context
- The context in which the definition is applied.- Returns:
- The created
SearchPredicate
. - See Also:
-
empty(ProjectionCollector.Provider)
instead.