All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.hibernate.search.impl.V5MigrationOrmSearchIntegratorAdapter Maven / Gradle / Ivy

Go to download

Helper to migrate from Hibernate Search 5 to 6, providing partial support for Hibernate Search 5 ORM APIs on top of Hibernate Search 6

There is a newer version: 8.0.0.Alpha1
Show newest version
/*
 * 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.impl;

import org.hibernate.search.mapper.orm.mapping.SearchMapping;
import org.hibernate.search.scope.impl.V5MigrationOrmSearchScopeAdapter;
import org.hibernate.search.scope.spi.V5MigrationSearchScope;
import org.hibernate.search.spi.SearchIntegrator;
import org.hibernate.search.util.common.impl.CollectionHelper;

public class V5MigrationOrmSearchIntegratorAdapter implements SearchIntegrator {
	private final SearchMapping delegate;

	public V5MigrationOrmSearchIntegratorAdapter(SearchMapping delegate) {
		this.delegate = delegate;
	}

	@Override
	public V5MigrationSearchScope scope(Class... targetTypes) {
		return new V5MigrationOrmSearchScopeAdapter( delegate.scope( CollectionHelper.asSet( targetTypes ) ) );
	}

	public SearchMapping toSearchMapping() {
		return delegate;
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy