com.vladmihalcea.hibernate.type.array.internal.ArraySqlTypeDescriptor 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.array.internal;
import org.hibernate.type.descriptor.ValueBinder;
import org.hibernate.type.descriptor.ValueExtractor;
import org.hibernate.type.descriptor.WrapperOptions;
import org.hibernate.type.descriptor.java.JavaType;
import org.hibernate.type.descriptor.jdbc.BasicBinder;
import org.hibernate.type.descriptor.jdbc.BasicExtractor;
import org.hibernate.type.descriptor.jdbc.JdbcType;
import java.sql.*;
/**
* @author Vlad Mihalcea
*/
public class ArraySqlTypeDescriptor implements JdbcType {
public static final ArraySqlTypeDescriptor INSTANCE = new ArraySqlTypeDescriptor();
@Override
public int getJdbcTypeCode() {
return Types.ARRAY;
}
@Override
public ValueBinder getBinder(final JavaType javaType) {
return new BasicBinder(javaType, this) {
@Override
protected void doBind(PreparedStatement st, X value, int index, WrapperOptions options) throws SQLException {
AbstractArrayTypeDescriptor