code: public static String[] getAuthorityAndSRID(Connection connection, TableLocation table, String fieldName)
              throws SQLException{
          ResultSet geomResultSet = getGeometryColumnsView(connection, table.getCatalog(), table.getSchema(),
                  table.getTable());
          int srid = 0;
          while (geomResultSet.next()) {
              if (geomResultSet.getString("f_geometry_column").equals(fieldName)) {
                  srid = geomResultSet.getInt("srid");
                  break;
              }
          }
          geomResultSet.close();
          String authority = null;
          String sridCode = null;
          if (srid != 0) {
              PreparedStatement ps = connection.prepareStatement("SELECT AUTH_NAME FROM PUBLIC.SPATIAL_REF_SYS " +
                      " WHERE SRID = ?");
              ps.setInt(1, srid);
              ResultSet rs = null;
              try {
                  rs = ps.executeQuery();
                  if (rs.next()) {
                      authority = rs.getString(1);
                      sridCode=String.valueOf(srid);
                  }
              } finally {
                  if (rs != null) {
                      rs.close();
                  }
                  ps.close();
              }
          }
          return new String[]{authority, sridCode};
      }
docs: Return an array of two string that correspond to the authority name and its SRID code.
  If the SRID does not exist return the array {null, null}
  
  @param connection Active connection
  @param table Table name
  @param fieldName Field to analyse
  
  @return Array of two string that correspond to the authority name  and its SRID code
  
  @throws SQLException