Class PojoSearchQueryElementRegistry
- java.lang.Object
-
- org.hibernate.search.mapper.pojo.search.definition.impl.PojoSearchQueryElementRegistry
-
- All Implemented Interfaces:
AutoCloseable,ProjectionRegistry
public final class PojoSearchQueryElementRegistry extends Object implements ProjectionRegistry, AutoCloseable
-
-
Constructor Summary
Constructors Constructor Description PojoSearchQueryElementRegistry(Map<Class<?>,CompositeProjectionDefinition<?>> compositeProjectionDefinitions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()<T> CompositeProjectionDefinition<T>composite(Class<T> objectClass)<T> Optional<CompositeProjectionDefinition<T>>compositeOptional(Class<T> objectClass)
-
-
-
Constructor Detail
-
PojoSearchQueryElementRegistry
public PojoSearchQueryElementRegistry(Map<Class<?>,CompositeProjectionDefinition<?>> compositeProjectionDefinitions)
-
-
Method Detail
-
composite
public <T> CompositeProjectionDefinition<T> composite(Class<T> objectClass)
- Specified by:
compositein interfaceProjectionRegistry- Type Parameters:
T- The type of objects returned by the projection.- Parameters:
objectClass- The type of objects returned by the projection. The class is expected to be mapped (generally through annotations) in such a way that it defines the inner projections.- Returns:
- A definition of the projection.
-
compositeOptional
public <T> Optional<CompositeProjectionDefinition<T>> compositeOptional(Class<T> objectClass)
- Specified by:
compositeOptionalin interfaceProjectionRegistry- Type Parameters:
T- The type of objects returned by the projection.- Parameters:
objectClass- The type of objects returned by the projection. The class is expected to be mapped (generally through annotations) in such a way that it defines the inner projections.- Returns:
- A definition of the projection,
or
Optional.empty()if no projection definition is available for the given object class.
-
close
public void close() throws Exception- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-
-