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

com.vladmihalcea.hibernate.type.basic.YearMonthIntegerType Maven / Gradle / Ivy

There is a newer version: 2.21.1
Show newest version
package com.vladmihalcea.hibernate.type.basic;

import com.vladmihalcea.hibernate.type.MutableType;
import com.vladmihalcea.hibernate.type.basic.internal.YearMonthTypeDescriptor;
import com.vladmihalcea.hibernate.type.util.Configuration;
import org.hibernate.type.descriptor.jdbc.IntegerJdbcType;

import java.time.YearMonth;

/**
 * Maps a Java {@link YearMonth} object to an {@code INT} column type.
 * 

* For more details about how to use it, check out this article on vladmihalcea.com. * * @author Vlad Mihalcea */ public class YearMonthIntegerType extends MutableType { public static final YearMonthIntegerType INSTANCE = new YearMonthIntegerType(); public YearMonthIntegerType() { super( YearMonth.class, IntegerJdbcType.INSTANCE, YearMonthTypeDescriptor.INSTANCE ); } public YearMonthIntegerType(Configuration configuration) { super( YearMonth.class, IntegerJdbcType.INSTANCE, YearMonthTypeDescriptor.INSTANCE, configuration ); } public YearMonthIntegerType(org.hibernate.type.spi.TypeBootstrapContext typeBootstrapContext) { this(new Configuration(typeBootstrapContext.getConfigurationSettings())); } public String getName() { return "yearmonth-int"; } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy