Interface Connection


  • public interface Connection
    A channel of communication with a DataSource.
    • Method Detail

      • executeQuery

        FeatureCollection executeQuery​(String query,
                                       Collection exceptions,
                                       TaskMonitor monitor)
        Returns from a DataSource a dataset specified using a query string (the format of which is implementation-dependent). Callers: be sure to call DataSource#setCoordinateSystem on the returned FeatureCollection.
        Parameters:
        query - identifies the dataset; may take the form of a SQL statement, a table name, null (if there is only one dataset), or other format
        exceptions - a Collection to hold exceptions that occurred (so that processing can continue).
        Returns:
        null if a FeatureCollection could not be created because of a serious problem (indicated in the exceptions)
      • executeQuery

        FeatureCollection executeQuery​(String query,
                                       TaskMonitor monitor)
                                throws Exception
        Returns from a DataSource a dataset specified using a query string (the format of which is implementation-dependent). If an exception occurs, processing is stopped and the exception thrown. Callers: be sure to call DataSource#setCoordinateSystem on the returned FeatureCollection.
        Throws:
        Exception
      • executeUpdate

        void executeUpdate​(String query,
                           FeatureCollection featureCollection,
                           TaskMonitor monitor)
                    throws Exception
        Modifies data in the DataSource accordinate to a query string (the format of which is implementation-dependent).
        Throws:
        Exception
      • close

        void close()
        Ends the connection, performing any necessary cleanup.