code: private static Geometry splitMultiPolygonWithLine(MultiPolygon multiPolygon, LineString lineString) throws SQLException {
          ArrayList<Polygon> allPolygons = new ArrayList<Polygon>();
          for (int i = 0; i < multiPolygon.getNumGeometries(); i++) {
              Collection<Polygon> polygons = splitPolygonizer((Polygon) multiPolygon.getGeometryN(i), lineString);
              if (polygons != null) {
                  allPolygons.addAll(polygons);
              }
          }
          if (!allPolygons.isEmpty()) {
              return FACTORY.buildGeometry(allPolygons);
          }
          return null;
      }
docs: Splits a MultiPolygon using a LineString.
  
  @param multiPolygon
  @param lineString
  @return