public static String loadOracleSrid ( final String srid , final Database database ) { final String oracleSrid ; final JdbcConnection jdbcConnection = ( JdbcConnection ) database . getConnection ( ) ; final Connection connection = jdbcConnection . getUnderlyingConnection ( ) ; Statement statement = null ; try { statement = connection . createStatement ( ) ; final ResultSet resultSet = statement . executeQuery ( "SELECT " + EPSG_TO_ORACLE_FUNCTION + "(" + srid + ") FROM dual" ) ; resultSet . next ( ) ; oracleSrid = resultSet . getString ( 1 ) ; } catch ( final SQLException e ) { throw new UnexpectedLiquibaseException ( "Failed to find the Oracle SRID for EPSG:" + srid , e ) ; } finally { try { statement . close ( ) ; } catch ( final SQLException ignore ) { } } return oracleSrid ; }
Queries to the database to convert the given EPSG SRID to the corresponding Oracle SRID .