com.vladmihalcea.hibernate.type.basic.MonthDayIntegerType Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hibernate-types-60 Show documentation
Show all versions of hibernate-types-60 Show documentation
Hibernate ORM 6.0 extra Types
package com.vladmihalcea.hibernate.type.basic;
import com.vladmihalcea.hibernate.type.MutableType;
import com.vladmihalcea.hibernate.type.basic.internal.MonthDayTypeDescriptor;
import com.vladmihalcea.hibernate.type.util.Configuration;
import org.hibernate.type.descriptor.jdbc.IntegerJdbcType;
import java.time.MonthDay;
/**
* Maps a Java {@link java.time.MonthDay} object to a {@code INT} column type.
*
* @author Mladen Savic ([email protected])
*/
public class MonthDayIntegerType extends MutableType {
public static final MonthDayIntegerType INSTANCE = new MonthDayIntegerType();
public MonthDayIntegerType() {
super(
MonthDay.class,
IntegerJdbcType.INSTANCE,
MonthDayTypeDescriptor.INSTANCE
);
}
public MonthDayIntegerType(Configuration configuration) {
super(
MonthDay.class,
IntegerJdbcType.INSTANCE,
MonthDayTypeDescriptor.INSTANCE,
configuration
);
}
public MonthDayIntegerType(org.hibernate.type.spi.TypeBootstrapContext typeBootstrapContext) {
this(new Configuration(typeBootstrapContext.getConfigurationSettings()));
}
public String getName() {
return "monthday-int";
}
}