Example usage for org.hibernate.type.descriptor.sql SqlTypeDescriptor getSqlType

List of usage examples for org.hibernate.type.descriptor.sql SqlTypeDescriptor getSqlType

Introduction

In this page you can find the example usage for org.hibernate.type.descriptor.sql SqlTypeDescriptor getSqlType.

Prototype

int getSqlType();

Source Link

Document

Return the java.sql.Types JDBC type-code for the column mapped by this type.

Usage

From source file:ee.ria.xroad.common.db.CustomPostgreSQLDialect.java

License:Open Source License

@Override
public SqlTypeDescriptor remapSqlTypeDescriptor(SqlTypeDescriptor sqlTypeDescriptor) {
    if (sqlTypeDescriptor.getSqlType() == java.sql.Types.BLOB) {
        return BinaryTypeDescriptor.INSTANCE;
    }//from w w  w .j  a v  a2  s  .c  o  m

    return super.remapSqlTypeDescriptor(sqlTypeDescriptor);
}

From source file:io.github.jhipster.domain.util.FixedPostgreSQL82Dialect.java

License:Apache License

@Override
public SqlTypeDescriptor remapSqlTypeDescriptor(SqlTypeDescriptor sqlTypeDescriptor) {
    if (sqlTypeDescriptor.getSqlType() == java.sql.Types.BLOB) {
        return BinaryTypeDescriptor.INSTANCE;
    }//from w  w w .j  a va2 s.c  o m
    return super.remapSqlTypeDescriptor(sqlTypeDescriptor);
}