code: public static ResultSet explode(Connection connection, String tableName, String fieldName) throws SQLException {
          ExplodeResultSet rowSource = new ExplodeResultSet(connection,
                  TableLocation.parse(tableName, JDBCUtilities.isH2DataBase(connection.getMetaData())).toString(),fieldName);
          return rowSource.getResultSet();
      }
docs: Explode Geometry Collection into multiple geometries
  @param connection
  @param tableName the name of the input table
  @param fieldName the name of geometry field. If null the first geometry column is used.
  @return
  @throws java.sql.SQLException