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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidappendTo(ToStringTreeAppender appender)Appends information aboutthisto the givenappender.SearchProjection<T>create(SearchProjectionFactory<?,?> factory, ProjectionDefinitionContext context)Creates a projection with a specific projected type.static <T> BeanHolder<ConstantProjectionDefinition<List<T>>>emptyList()static <T> BeanHolder<ConstantProjectionDefinition<T>>nullValue()protected Stringtype()-
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.util.common.spi.ToStringTreeAppendable
toStringTree
-
-
-
-
Method Detail
-
nullValue
public static <T> BeanHolder<ConstantProjectionDefinition<T>> nullValue()
-
emptyList
public static <T> BeanHolder<ConstantProjectionDefinition<List<T>>> emptyList()
-
type
protected String type()
- Specified by:
typein classAbstractProjectionDefinition<T>
-
appendTo
public void appendTo(ToStringTreeAppender appender)
Description copied from interface:ToStringTreeAppendableAppends information aboutthisto the givenappender.WARNING: This generally shouldn't be called directly, as
ToStringTreeAppenderwill automatically call this method forToStringTreeAppendablevalues passed toToStringTreeAppender.attribute(String, Object)/ToStringTreeAppender.value(Object).Implementations should assume that calls to
ToStringTreeAppender.startObject()/ToStringTreeAppender.endObject()forthisare handled by the caller.- Specified by:
appendToin interfaceToStringTreeAppendable- Overrides:
appendToin classAbstractProjectionDefinition<T>- Parameters:
appender- AToStringTreeAppender.
-
create
public SearchProjection<T> create(SearchProjectionFactory<?,?> factory, ProjectionDefinitionContext context)
Description copied from interface:ProjectionDefinitionCreates a projection with a specific projected type.- Parameters:
factory- A projection factory. If the projection is used in the context of an object field, this factory expects field paths to be provided relative to that same object field. This factory is only valid in the present context and must not be used afterProjectionDefinition.create(SearchProjectionFactory, ProjectionDefinitionContext)returns.context- The context in which the definition is applied.- Returns:
- The created
SearchPredicate. - See Also:
SearchPredicateFactory,ProjectionDefinitionContext
-
-