Class ResultSetBuilder

  • All Implemented Interfaces:
    org.orbisgis.data.api.dsl.IResultSetBuilder

    public class ResultSetBuilder
    extends Object
    implements org.orbisgis.data.api.dsl.IResultSetBuilder
    Implementation of the IResultSetBuilder interface.
    Author:
    Erwan Bocher (CNRS), Sylvain PALOMINOS (UBS Lab-STICC / Chaire GEOTERA 2020)
    • Constructor Detail

      • ResultSetBuilder

        public ResultSetBuilder​(org.orbisgis.data.api.datasource.IJdbcDataSource dataSource)
        Main constructor.
        Parameters:
        dataSource - IJdbcDataSource used to get the ResultSet.
      • ResultSetBuilder

        public ResultSetBuilder​(org.orbisgis.data.api.datasource.IJdbcDataSource dataSource,
                                org.orbisgis.data.api.dsl.IResultSetProperties properties)
        Main constructor.
        Parameters:
        dataSource - IJdbcDataSource used to get the ResultSet.
    • Method Detail

      • forwardOnly

        public org.orbisgis.data.api.dsl.IResultSetBuilder forwardOnly()
        Specified by:
        forwardOnly in interface org.orbisgis.data.api.dsl.IResultSetBuilder
      • scrollInsensitive

        public org.orbisgis.data.api.dsl.IResultSetBuilder scrollInsensitive()
        Specified by:
        scrollInsensitive in interface org.orbisgis.data.api.dsl.IResultSetBuilder
      • scrollSensitive

        public org.orbisgis.data.api.dsl.IResultSetBuilder scrollSensitive()
        Specified by:
        scrollSensitive in interface org.orbisgis.data.api.dsl.IResultSetBuilder
      • readOnly

        public org.orbisgis.data.api.dsl.IResultSetBuilder readOnly()
        Specified by:
        readOnly in interface org.orbisgis.data.api.dsl.IResultSetBuilder
      • updatable

        public org.orbisgis.data.api.dsl.IResultSetBuilder updatable()
        Specified by:
        updatable in interface org.orbisgis.data.api.dsl.IResultSetBuilder
      • holdCursorOverCommit

        public org.orbisgis.data.api.dsl.IResultSetBuilder holdCursorOverCommit()
        Specified by:
        holdCursorOverCommit in interface org.orbisgis.data.api.dsl.IResultSetBuilder
      • closeCursorAtCommit

        public org.orbisgis.data.api.dsl.IResultSetBuilder closeCursorAtCommit()
        Specified by:
        closeCursorAtCommit in interface org.orbisgis.data.api.dsl.IResultSetBuilder
      • fetchForward

        public org.orbisgis.data.api.dsl.IResultSetBuilder fetchForward()
        Specified by:
        fetchForward in interface org.orbisgis.data.api.dsl.IResultSetBuilder
      • fetchReverse

        public org.orbisgis.data.api.dsl.IResultSetBuilder fetchReverse()
        Specified by:
        fetchReverse in interface org.orbisgis.data.api.dsl.IResultSetBuilder
      • fetchUnknown

        public org.orbisgis.data.api.dsl.IResultSetBuilder fetchUnknown()
        Specified by:
        fetchUnknown in interface org.orbisgis.data.api.dsl.IResultSetBuilder
      • fetchSize

        public org.orbisgis.data.api.dsl.IResultSetBuilder fetchSize​(int size)
        Specified by:
        fetchSize in interface org.orbisgis.data.api.dsl.IResultSetBuilder
      • timeout

        public org.orbisgis.data.api.dsl.IResultSetBuilder timeout​(int timeout)
        Specified by:
        timeout in interface org.orbisgis.data.api.dsl.IResultSetBuilder
      • maxRow

        public org.orbisgis.data.api.dsl.IResultSetBuilder maxRow​(int maxRow)
        Specified by:
        maxRow in interface org.orbisgis.data.api.dsl.IResultSetBuilder
      • cursorName

        public org.orbisgis.data.api.dsl.IResultSetBuilder cursorName​(String name)
        Specified by:
        cursorName in interface org.orbisgis.data.api.dsl.IResultSetBuilder
      • poolable

        public org.orbisgis.data.api.dsl.IResultSetBuilder poolable()
        Specified by:
        poolable in interface org.orbisgis.data.api.dsl.IResultSetBuilder
      • maxFieldSize

        public org.orbisgis.data.api.dsl.IResultSetBuilder maxFieldSize​(int size)
        Specified by:
        maxFieldSize in interface org.orbisgis.data.api.dsl.IResultSetBuilder
      • execute

        public boolean execute​(String sql)
                        throws SQLException
        Specified by:
        execute in interface org.orbisgis.data.api.dsl.IResultSetBuilder
        Throws:
        SQLException
      • execute

        public boolean execute​(groovy.lang.GString sql)
                        throws SQLException
        Specified by:
        execute in interface org.orbisgis.data.api.dsl.IResultSetBuilder
        Throws:
        SQLException
      • executeBatch

        public int[] executeBatch​(String[] queries)
                           throws SQLException
        Specified by:
        executeBatch in interface org.orbisgis.data.api.dsl.IResultSetBuilder
        Throws:
        SQLException
      • executeBatch

        public int[] executeBatch​(groovy.lang.GString[] queries)
                           throws SQLException
        Specified by:
        executeBatch in interface org.orbisgis.data.api.dsl.IResultSetBuilder
        Throws:
        SQLException
      • executeLargeBatch

        public long[] executeLargeBatch​(String[] queries)
                                 throws SQLException
        Specified by:
        executeLargeBatch in interface org.orbisgis.data.api.dsl.IResultSetBuilder
        Throws:
        SQLException
      • executeLargeBatch

        public long[] executeLargeBatch​(groovy.lang.GString[] queries)
                                 throws SQLException
        Specified by:
        executeLargeBatch in interface org.orbisgis.data.api.dsl.IResultSetBuilder
        Throws:
        SQLException
      • executeUpdate

        public int executeUpdate​(String sql)
                          throws SQLException
        Specified by:
        executeUpdate in interface org.orbisgis.data.api.dsl.IResultSetBuilder
        Throws:
        SQLException
      • executeUpdate

        public int executeUpdate​(groovy.lang.GString sql)
                          throws SQLException
        Specified by:
        executeUpdate in interface org.orbisgis.data.api.dsl.IResultSetBuilder
        Throws:
        SQLException
      • executeLargeUpdate

        public long executeLargeUpdate​(String sql)
                                throws SQLException
        Specified by:
        executeLargeUpdate in interface org.orbisgis.data.api.dsl.IResultSetBuilder
        Throws:
        SQLException
      • executeLargeUpdate

        public long executeLargeUpdate​(groovy.lang.GString sql)
                                throws SQLException
        Specified by:
        executeLargeUpdate in interface org.orbisgis.data.api.dsl.IResultSetBuilder
        Throws:
        SQLException
      • getTable

        public org.orbisgis.data.api.dataset.IJdbcTable<?> getTable​(String nameOrQuery)
                                                             throws Exception
        Specified by:
        getTable in interface org.orbisgis.data.api.dsl.IResultSetBuilder
        Throws:
        Exception
      • getSpatialTable

        public org.orbisgis.data.api.dataset.IJdbcSpatialTable<?> getSpatialTable​(String nameOrQuery)
                                                                           throws Exception
        Specified by:
        getSpatialTable in interface org.orbisgis.data.api.dsl.IResultSetBuilder
        Throws:
        Exception
      • getTable

        public org.orbisgis.data.api.dataset.ITable<?,​?> getTable​(groovy.lang.GString nameOrQuery)
                                                                 throws Exception
        Specified by:
        getTable in interface org.orbisgis.data.api.dsl.IResultSetBuilder
        Throws:
        Exception
      • getSpatialTable

        public org.orbisgis.data.api.dataset.ISpatialTable<?> getSpatialTable​(groovy.lang.GString nameOrQuery)
                                                                       throws Exception
        Specified by:
        getSpatialTable in interface org.orbisgis.data.api.dsl.IResultSetBuilder
        Throws:
        Exception
      • getTable

        public org.orbisgis.data.api.dataset.ITable<?,​?> getTable​(String query,
                                                                        List<Object> params)
                                                                 throws Exception
        Specified by:
        getTable in interface org.orbisgis.data.api.dsl.IResultSetBuilder
        Throws:
        Exception
      • getSpatialTable

        public org.orbisgis.data.api.dataset.ISpatialTable<?> getSpatialTable​(String query,
                                                                              List<Object> params)
                                                                       throws Exception
        Specified by:
        getSpatialTable in interface org.orbisgis.data.api.dsl.IResultSetBuilder
        Throws:
        Exception