private static Map<Integer, String> buildJdbcTypeMap() { HashMap<Integer, String> map = new HashMap<Integer, String>(); Field[] fields = java.sql.Types.class.getFields(); if ( fields == null ) { throw new HibernateException( "Unexpected problem extracting JDBC type mapping codes from java.sql.Types" ); } for ( Field field : fields ) { try { final int code = field.getInt( null ); String old = map.put( code, field.getName() ); if ( old != null ) { LOG.JavaSqlTypesMappedSameCodeMultipleTimes( code, old, field.getName() ); } } catch ( IllegalAccessException e ) { throw new HibernateException( "Unable to access JDBC type mapping [" + field.getName() + "]", e ); } } return Collections.unmodifiableMap( map ); }
private static Map<Integer, String> buildJdbcTypeMap() { HashMap<Integer, String> map = new HashMap<Integer, String>(); Field[] fields = Types.class.getFields(); if ( fields == null ) { throw new HibernateException( "Unexpected problem extracting JDBC type mapping codes from java.sql.Types" ); } for ( Field field : fields ) { try { final int code = field.getInt( null ); String old = map.put( code, field.getName() ); if (old != null) LOG.JavaSqlTypesMappedSameCodeMultipleTimes(code, old, field.getName()); } catch ( IllegalAccessException e ) { throw new HibernateException( "Unable to access JDBC type mapping [" + field.getName() + "]", e ); } } return Collections.unmodifiableMap( map ); }
private static Map<Integer, String> buildJdbcTypeMap() { HashMap<Integer, String> map = new HashMap<Integer, String>(); Field[] fields = Types.class.getFields(); if ( fields == null ) { throw new HibernateException( "Unexpected problem extracting JDBC type mapping codes from java.sql.Types" ); } for ( Field field : fields ) { try { final int code = field.getInt( null ); String old = map.put( code, field.getName() ); if (old != null) LOG.JavaSqlTypesMappedSameCodeMultipleTimes(code, old, field.getName()); } catch ( IllegalAccessException e ) { throw new HibernateException( "Unable to access JDBC type mapping [" + field.getName() + "]", e ); } } return Collections.unmodifiableMap( map ); }
private static Map<Integer, String> buildJdbcTypeMap() { HashMap<Integer, String> map = new HashMap<Integer, String>(); Field[] fields = java.sql.Types.class.getFields(); if ( fields == null ) { throw new HibernateException( "Unexpected problem extracting JDBC type mapping codes from java.sql.Types" ); } for ( Field field : fields ) { try { final int code = field.getInt( null ); String old = map.put( code, field.getName() ); if ( old != null ) { LOG.JavaSqlTypesMappedSameCodeMultipleTimes( code, old, field.getName() ); } } catch ( IllegalAccessException e ) { throw new HibernateException( "Unable to access JDBC type mapping [" + field.getName() + "]", e ); } } return Collections.unmodifiableMap( map ); }