org.hibernate.search.scope.impl.V5MigrationOrmSearchScopeAdapter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hibernate-search-v5migrationhelper-orm Show documentation
Show all versions of hibernate-search-v5migrationhelper-orm Show documentation
Helper to migrate from Hibernate Search 5 to 6, providing partial support for Hibernate Search 5 ORM APIs on top of Hibernate Search 6
/*
* Hibernate Search, full-text search for your domain model
*
* License: GNU Lesser General Public License (LGPL), version 2.1 or later
* See the lgpl.txt file in the root directory or .
*/
package org.hibernate.search.scope.impl;
import java.util.Set;
import java.util.stream.Collectors;
import org.hibernate.search.engine.backend.index.IndexManager;
import org.hibernate.search.engine.common.EntityReference;
import org.hibernate.search.engine.search.aggregation.dsl.SearchAggregationFactory;
import org.hibernate.search.engine.search.predicate.dsl.SearchPredicateFactory;
import org.hibernate.search.engine.search.projection.SearchProjection;
import org.hibernate.search.engine.search.projection.dsl.SearchProjectionFactory;
import org.hibernate.search.engine.search.sort.dsl.SearchSortFactory;
import org.hibernate.search.mapper.orm.entity.SearchIndexedEntity;
import org.hibernate.search.mapper.orm.scope.SearchScope;
import org.hibernate.search.scope.spi.V5MigrationSearchScope;
public class V5MigrationOrmSearchScopeAdapter implements V5MigrationSearchScope {
private final SearchScope> delegate;
public V5MigrationOrmSearchScopeAdapter(SearchScope> delegate) {
this.delegate = delegate;
}
@Override
public Set> targetTypes() {
return delegate.includedTypes().stream().map( SearchIndexedEntity::javaClass ).collect( Collectors.toSet() );
}
@Override
public Set indexManagers() {
return delegate.includedTypes().stream().map( SearchIndexedEntity::indexManager ).collect( Collectors.toSet() );
}
@Override
public SearchPredicateFactory predicate() {
return delegate.predicate();
}
@Override
public SearchSortFactory sort() {
return delegate.sort();
}
@Override
public SearchProjectionFactory, ?> projection() {
return delegate.projection();
}
@Override
public SearchProjection
© 2015 - 2025 Weber Informatics LLC | Privacy Policy