Class PojoImplicitReindexingResolverCastedTypeNode<T,U>
java.lang.Object
org.hibernate.search.mapper.pojo.automaticindexing.impl.PojoImplicitReindexingResolverNode<T>
org.hibernate.search.mapper.pojo.automaticindexing.impl.PojoImplicitReindexingResolverCastedTypeNode<T,U>
- Type Parameters:
T- The type of "dirty" objects received as input.U- The type the input objects will be casted to, if possible.
- All Implemented Interfaces:
AutoCloseable,ToStringTreeAppendable
public class PojoImplicitReindexingResolverCastedTypeNode<T,U>
extends PojoImplicitReindexingResolverNode<T>
A
PojoImplicitReindexingResolverNode working at the type level, but applying a cast before anything else.
This node may delegate to a marking node
to mark the input as "to reindex" as well as delegate to
property nodes for deeper resolution.
This node will ignore entities that cannot be cast to type U.
-
Constructor Summary
ConstructorsConstructorDescriptionPojoImplicitReindexingResolverCastedTypeNode(PojoCaster<? super U> caster, PojoImplicitReindexingResolverNode<? super U> nested) -
Method Summary
Modifier and TypeMethodDescriptionvoidappendTo(ToStringTreeAppender appender) Appends information aboutthisto the givenappender.voidclose()voidresolveEntitiesToReindex(PojoReindexingCollector collector, T dirty, PojoImplicitReindexingResolverRootContext context) Add all entities that should be reindexed tocollector, taking into account the given "dirtiness state".Methods inherited from class org.hibernate.search.mapper.pojo.automaticindexing.impl.PojoImplicitReindexingResolverNode
noOp, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.hibernate.search.util.common.spi.ToStringTreeAppendable
toStringTree
-
Constructor Details
-
PojoImplicitReindexingResolverCastedTypeNode
public PojoImplicitReindexingResolverCastedTypeNode(PojoCaster<? super U> caster, PojoImplicitReindexingResolverNode<? super U> nested)
-
-
Method Details
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein classPojoImplicitReindexingResolverNode<T>
-
appendTo
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.- Parameters:
appender- AToStringTreeAppender.
-
resolveEntitiesToReindex
public void resolveEntitiesToReindex(PojoReindexingCollector collector, T dirty, PojoImplicitReindexingResolverRootContext context) Description copied from class:PojoImplicitReindexingResolverNodeAdd all entities that should be reindexed tocollector, taking into account the given "dirtiness state".- Specified by:
resolveEntitiesToReindexin classPojoImplicitReindexingResolverNode<T>- Parameters:
collector- A collector for entities that should be reindexed.dirty- A value that is dirty to some extent.context- A context representing the root entity, and including in particular information about dirty paths. Resolvers should always pass this context as-is when delegating to other resolvers.
-