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

org.hibernate.agroal.internal.StrategyRegistrationProviderImpl Maven / Gradle / Ivy

There is a newer version: 7.0.0.Beta1
Show newest version
/*
 * Hibernate, Relational Persistence for Idiomatic Java
 *
 * 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.agroal.internal;

import java.util.Collections;

import org.hibernate.boot.registry.selector.SimpleStrategyRegistrationImpl;
import org.hibernate.boot.registry.selector.StrategyRegistration;
import org.hibernate.boot.registry.selector.StrategyRegistrationProvider;
import org.hibernate.engine.jdbc.connections.spi.ConnectionProvider;

/**
 * Provides the {@link AgroalConnectionProvider} to the
 * {@link org.hibernate.boot.registry.selector.spi.StrategySelector} service.
 *
 * @author Luis Barreiro
 */
public final class StrategyRegistrationProviderImpl implements StrategyRegistrationProvider {

	@Override
	public Iterable getStrategyRegistrations() {
		final SimpleStrategyRegistrationImpl strategyRegistration = new SimpleStrategyRegistrationImpl<>(
				ConnectionProvider.class,
				AgroalConnectionProvider.class,
				AgroalConnectionProvider.class.getSimpleName(),
				"agroal",
				"Agroal",
				// for consistency's sake
				"org.hibernate.connection.AgroalConnectionProvider"
		);
		return Collections.singleton( strategyRegistration );
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy