org.hibernate.community.dialect.CommunityDialectResolver Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hibernate-community-dialects Show documentation
Show all versions of hibernate-community-dialects Show documentation
Hibernate's community supported dialects
The newest version!
/*
* SPDX-License-Identifier: LGPL-2.1-or-later
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.community.dialect;
import org.hibernate.dialect.Dialect;
import org.hibernate.engine.jdbc.dialect.spi.DialectResolutionInfo;
import org.hibernate.engine.jdbc.dialect.spi.DialectResolver;
/**
* The DialectResolver implementation for community maintained dialects
*
* @author Christian Beikov
*/
public class CommunityDialectResolver implements DialectResolver {
@Override
public Dialect resolveDialect(DialectResolutionInfo info) {
for ( CommunityDatabase database : CommunityDatabase.values() ) {
if ( database.matchesResolutionInfo( info ) ) {
return database.createDialect( info );
}
}
return null;
}
}