org.hibernate.cfg.reveng
Class JDBCToHibernateTypeHelper

java.lang.Object
  extended by org.hibernate.cfg.reveng.JDBCToHibernateTypeHelper

public final class JDBCToHibernateTypeHelper
extends Object

Utility class for mapping between sqltypes and hibernate type names.

Author:
max (based on parts from Sql2Java from Middlegen)

Method Summary
static int getJDBCType(String value)
           
static String getJDBCTypeName(int value)
           
static String[] getJDBCTypes()
           
static String getPreferredHibernateType(int sqlType, int size, int precision, int scale, boolean nullable, boolean generatedIdentifier)
           
static boolean typeHasLength(int sqlType)
           
static boolean typeHasScaleAndPrecision(int sqlType)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getPreferredHibernateType

public static String getPreferredHibernateType(int sqlType,
                                               int size,
                                               int precision,
                                               int scale,
                                               boolean nullable,
                                               boolean generatedIdentifier)

getJDBCTypes

public static String[] getJDBCTypes()

getJDBCType

public static int getJDBCType(String value)

getJDBCTypeName

public static String getJDBCTypeName(int value)

typeHasScaleAndPrecision

public static boolean typeHasScaleAndPrecision(int sqlType)
Parameters:
table -
schema -
catalog -
Throws:
SQLException

typeHasLength

public static boolean typeHasLength(int sqlType)