org.hibernate.type.internal.SimpleBasicValueMapper Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hibernate-core Show documentation
Show all versions of hibernate-core Show documentation
Hibernate's core ORM functionality
/*
* 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 http://www.gnu.org/licenses/lgpl-2.1.html
*/
package org.hibernate.type.internal;
import org.hibernate.metamodel.model.convert.spi.BasicValueConverter;
import org.hibernate.metamodel.model.domain.spi.BasicValueMapper;
import org.hibernate.sql.SqlExpressableType;
import org.hibernate.type.descriptor.java.MutabilityPlan;
import org.hibernate.type.descriptor.java.spi.BasicJavaDescriptor;
/**
* @author Steve Ebersole
*/
public class SimpleBasicValueMapper implements BasicValueMapper {
private final BasicJavaDescriptor domainJtd;
private final SqlExpressableType jdbcType;
private final BasicValueConverter valueConverter;
private final MutabilityPlan mutabilityPlan;
public SimpleBasicValueMapper(
BasicJavaDescriptor domainJtd,
SqlExpressableType jdbcType,
BasicValueConverter valueConverter,
MutabilityPlan mutabilityPlan) {
this.domainJtd = domainJtd;
this.jdbcType = jdbcType;
this.valueConverter = valueConverter;
this.mutabilityPlan = mutabilityPlan;
}
@Override
public BasicJavaDescriptor getDomainJavaDescriptor() {
return domainJtd;
}
@Override
public SqlExpressableType getSqlExpressableType() {
return jdbcType;
}
@Override
public BasicValueConverter getValueConverter() {
return valueConverter;
}
@Override
public MutabilityPlan getMutabilityPlan() {
return mutabilityPlan;
}
}